@thibezer/ui-components-kit 2.15.0 → 2.17.1
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/CHANGELOG.md +57 -0
- package/README.md +1 -1
- package/dist/botao.cjs +1 -1
- package/dist/botao.js +1 -1
- package/dist/camadas.cjs +89 -89
- package/dist/camadas.js +1376 -1320
- package/dist/campo-texto.cjs +1 -1
- package/dist/campo-texto.js +1 -1
- package/dist/canvas.cjs +24 -24
- package/dist/canvas.js +757 -751
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/components/ui-avatar/ui-avatar.d.ts +7 -0
- package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-colecao.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-drag-drop.d.ts +3 -1
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +1 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +7 -0
- package/dist/components/ui-mapa/ui-mapa.d.ts +1 -0
- package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +6 -0
- package/dist/components/ui-skeleton/ui-skeleton.d.ts +9 -0
- package/dist/components/ui-stat/ui-stat.d.ts +12 -0
- package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +2 -1
- package/dist/components/ui-tabela-propriedades/propriedades-persistencia.d.ts +63 -0
- package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +1 -0
- package/dist/components/ui-tabela-propriedades/tipos.d.ts +16 -0
- package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +40 -1
- package/dist/core/degrade.d.ts +34 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +33 -24
- package/dist/cores.cjs +1 -1
- package/dist/cores.js +2 -2
- package/dist/custom-elements.json +6896 -5351
- package/dist/data.cjs +1 -1
- package/dist/data.js +89 -79
- package/dist/degrade-CIxvOTUv.cjs +1 -0
- package/dist/degrade-gDa5sW__.js +119 -0
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +2 -2
- package/dist/forms.cjs +1 -1
- package/dist/forms.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +215 -196
- package/dist/mapa.cjs +1 -1
- package/dist/mapa.js +1 -1
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/register.cjs +1 -1
- package/dist/register.js +12 -12
- package/dist/seletor-mapa-base.cjs +10 -10
- package/dist/seletor-mapa-base.js +34 -28
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +83 -73
- package/dist/tipos-elementos.d.ts +33 -3
- package/dist/tipos-vue.d.ts +30 -3
- package/dist/tools.cjs +1 -1
- package/dist/tools.js +1 -1
- package/dist/ui-badge-1UU8vT-b.js +198 -0
- package/dist/ui-badge-CKKKPdt8.cjs +28 -0
- package/dist/ui-badge-DE58YSBY.cjs +28 -0
- package/dist/ui-badge-KgmI3jOD.js +201 -0
- package/dist/ui-botao-Dz8YvmiA.cjs +12 -0
- package/dist/ui-botao-bU_bf6SU.js +166 -0
- package/dist/ui-botao-xTbH5mpH.cjs +12 -0
- package/dist/ui-botao-zLkcMMyP.js +168 -0
- package/dist/ui-campo-texto-DVU_sWV1.cjs +16 -0
- package/dist/ui-campo-texto-Dliyt9qr.cjs +16 -0
- package/dist/ui-campo-texto-W5M0gNE4.js +377 -0
- package/dist/ui-campo-texto-btevggO3.js +379 -0
- package/dist/ui-card-BYyYxxY1.cjs +20 -0
- package/dist/ui-card-CojoGXaT.js +144 -0
- package/dist/ui-card-DFnRp9bl.js +146 -0
- package/dist/ui-card-DrWVJQKw.cjs +20 -0
- package/dist/ui-controle-cores-B1w_Yl69.cjs +32 -0
- package/dist/ui-controle-cores-BRjMvmMn.js +291 -0
- package/dist/ui-controle-cores-Bq_XUrIQ.cjs +32 -0
- package/dist/ui-controle-cores-BtA6yzu3.js +291 -0
- package/dist/ui-kit.css +1 -1
- package/dist/ui-linha-2kY7TNUJ.cjs +38 -0
- package/dist/ui-linha-DAz6DBcl.cjs +38 -0
- package/dist/ui-linha-DkxwMhD-.js +749 -0
- package/dist/ui-linha-KFF86FW5.js +752 -0
- package/dist/ui-modal-4nU-tXjO.cjs +18 -0
- package/dist/ui-modal-BrXzVZ65.js +216 -0
- package/dist/ui-modal-BwB9fksp.js +214 -0
- package/dist/ui-modal-lARKzEVZ.cjs +18 -0
- package/dist/ui-paleta-ferramentas-Bu6JaT0s.js +1245 -0
- package/dist/ui-paleta-ferramentas-D3Jhwt26.cjs +21 -0
- package/dist/ui-seletor-cor-CMuuW-Ym.cjs +83 -0
- package/dist/ui-seletor-cor-DFIQ1sin.js +405 -0
- package/dist/ui-skeleton-BLEV6h3k.js +653 -0
- package/dist/ui-skeleton-B_XTaGrX.cjs +52 -0
- package/dist/ui-skeleton-DEHwpDqa.js +648 -0
- package/dist/ui-skeleton-sIphhOSx.cjs +52 -0
- package/dist/ui-switch-BXIDwC-Y.cjs +66 -0
- package/dist/ui-switch-Ctxk-jKS.js +1212 -0
- package/dist/ui-switch-DAIgOhqr.cjs +66 -0
- package/dist/ui-switch-_F8yubdX.js +1203 -0
- package/dist/ui-tabela-propriedades-2bq2nX-b.js +3202 -0
- package/dist/ui-tabela-propriedades-CJyo568n.js +3517 -0
- package/dist/ui-tabela-propriedades-CnfW9DZG.cjs +142 -0
- package/dist/ui-tabela-propriedades-Wa34hfIr.cjs +142 -0
- package/package.json +187 -187
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var I = (r, s, t) => s in r ? M(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
|
|
3
|
+
var o = (r, s, t) => I(r, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
+
import { L as v } from "./listener-bag-DQgv7OON.js";
|
|
5
|
+
import { d as b, S as _ } from "./ssr-safe-5cWfJP-s.js";
|
|
6
|
+
import { U as $ } from "./ui-bus-CUd99VJi.js";
|
|
7
|
+
const B = ':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-drawer__backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000000a6;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:calc(var(--ui-z-drawer, 700) - 1);opacity:0;pointer-events:none;transition:opacity .25s ease}:host([aberto]) .ui-drawer__backdrop,:host([open]) .ui-drawer__backdrop{opacity:1;pointer-events:auto}.ui-drawer__painel{position:fixed;z-index:var(--ui-z-drawer, 700);background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));box-shadow:var(--ui-sombra-lg, 0 16px 40px rgba(0, 0, 0, .7));display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility .2s ease;box-sizing:border-box;color:var(--ui-cor-texto, #e1e1e6)}:host(:not([posicao])) .ui-drawer__painel,:host([posicao="direita"]) .ui-drawer__painel,:host([position="right"]) .ui-drawer__painel{top:0;right:0;bottom:0;width:var(--ui-drawer-largura, 480px);max-width:92vw;height:100vh;transform:translate(100%);border-left:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16))}:host([aberto]:not([posicao])) .ui-drawer__painel,:host([open]:not([posicao])) .ui-drawer__painel,:host([aberto][posicao="direita"]) .ui-drawer__painel,:host([open][posicao="direita"]) .ui-drawer__painel,:host([aberto][position="right"]) .ui-drawer__painel,:host([open][position="right"]) .ui-drawer__painel{transform:translate(0);opacity:1;visibility:visible;pointer-events:auto}:host([posicao="esquerda"]) .ui-drawer__painel,:host([position="left"]) .ui-drawer__painel{top:0;left:0;bottom:0;width:var(--ui-drawer-largura, 480px);max-width:92vw;height:100vh;transform:translate(-100%);border-right:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16))}:host([aberto][posicao="esquerda"]) .ui-drawer__painel,:host([open][posicao="esquerda"]) .ui-drawer__painel,:host([aberto][position="left"]) .ui-drawer__painel,:host([open][position="left"]) .ui-drawer__painel{transform:translate(0);opacity:1;visibility:visible;pointer-events:auto}:host([posicao="baixo"]) .ui-drawer__painel,:host([position="bottom"]) .ui-drawer__painel{bottom:0;left:0;right:0;width:100vw;max-height:85vh;transform:translateY(100%);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-top-left-radius:14px;border-top-right-radius:14px}:host([aberto][posicao="baixo"]) .ui-drawer__painel,:host([open][posicao="baixo"]) .ui-drawer__painel,:host([aberto][position="bottom"]) .ui-drawer__painel,:host([open][position="bottom"]) .ui-drawer__painel{transform:translateY(0);opacity:1;visibility:visible;pointer-events:auto}:host([posicao="cima"]) .ui-drawer__painel,:host([position="top"]) .ui-drawer__painel{top:0;left:0;right:0;width:100vw;max-height:85vh;transform:translateY(-100%);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-bottom-left-radius:14px;border-bottom-right-radius:14px}:host([aberto][posicao="cima"]) .ui-drawer__painel,:host([open][posicao="cima"]) .ui-drawer__painel,:host([aberto][position="top"]) .ui-drawer__painel,:host([open][position="top"]) .ui-drawer__painel{transform:translateY(0);opacity:1;visibility:visible;pointer-events:auto}.ui-drawer__header{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));flex-shrink:0}.ui-drawer__titulo-container{display:flex;flex-direction:column;gap:2px}.ui-drawer__titulo{margin:0;font-size:16px;font-weight:600;color:var(--ui-cor-texto, #ffffff)}.ui-drawer__descricao{margin:0;font-size:13px;color:var(--ui-cor-texto-secundario, #888899)}.ui-drawer__close{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-size:16px;cursor:pointer;padding:6px;border-radius:6px;line-height:1;display:flex;align-items:center;justify-content:center;transition:color .15s ease,background-color .15s ease}.ui-drawer__close svg,.ui-drawer__close ::slotted(svg){shape-rendering:geometricPrecision}.ui-drawer__close:hover{color:var(--ui-cor-texto, #ffffff);background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-drawer__close:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-cor-primaria, #00E08A)}.ui-drawer__body{padding:20px;overflow-y:auto;flex:1;box-sizing:border-box}.ui-drawer__footer{padding:14px 20px;border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;align-items:center;justify-content:flex-end;gap:10px;background-color:var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15));flex-shrink:0}@starting-style{:host([aberto]:not([posicao])) .ui-drawer__painel,:host([open]:not([posicao])) .ui-drawer__painel,:host([aberto][posicao="direita"]) .ui-drawer__painel,:host([open][posicao="direita"]) .ui-drawer__painel{transform:translate(100%);opacity:0}:host([aberto][posicao="esquerda"]) .ui-drawer__painel,:host([open][posicao="esquerda"]) .ui-drawer__painel{transform:translate(-100%);opacity:0}:host([aberto][posicao="baixo"]) .ui-drawer__painel,:host([open][posicao="baixo"]) .ui-drawer__painel{transform:translateY(100%);opacity:0}:host([aberto]) .ui-drawer__backdrop,:host([open]) .ui-drawer__backdrop{opacity:0}}', k = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), ui-campo-texto, ui-botao, ui-botao-primario, ui-checkbox, ui-switch, ui-lista-flutuante, ui-radio, ui-select, ui-segmented';
|
|
8
|
+
function A(r, s) {
|
|
9
|
+
let t = Array.from(r.querySelectorAll(k));
|
|
10
|
+
t = t.filter((a) => {
|
|
11
|
+
try {
|
|
12
|
+
return window.getComputedStyle(a).display !== "none";
|
|
13
|
+
} catch {
|
|
14
|
+
return !0;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const i = r.querySelectorAll("slot"), e = [];
|
|
18
|
+
return i.forEach((a) => {
|
|
19
|
+
a.assignedElements({ flatten: !0 }).forEach((l) => {
|
|
20
|
+
l instanceof HTMLElement && (l.matches(k) && e.push(l), e.push(...Array.from(l.querySelectorAll(k))));
|
|
21
|
+
});
|
|
22
|
+
}), [...t, ...e].filter((a) => !a.hasAttribute("disabled") && a.getAttribute("aria-hidden") !== "true");
|
|
23
|
+
}
|
|
24
|
+
function O(r) {
|
|
25
|
+
if (typeof document > "u") return !0;
|
|
26
|
+
const s = Array.from(
|
|
27
|
+
document.querySelectorAll("ui-drawer[aberto], ui-drawer[open], ui-sheet[aberto], ui-sheet[open]")
|
|
28
|
+
);
|
|
29
|
+
return s[s.length - 1] === r;
|
|
30
|
+
}
|
|
31
|
+
function H(r, s, t, i) {
|
|
32
|
+
if (s.length === 0) {
|
|
33
|
+
r.preventDefault();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const e = s[0], a = s[s.length - 1], n = t.getRootNode(), l = n == null ? void 0 : n.activeElement;
|
|
37
|
+
r.shiftKey ? (l === e || !t.contains(l) && !i.contains(l)) && (r.preventDefault(), a.focus()) : (l === a || !t.contains(l) && !i.contains(l)) && (r.preventDefault(), e.focus());
|
|
38
|
+
}
|
|
39
|
+
function F() {
|
|
40
|
+
if (typeof document > "u") return;
|
|
41
|
+
document.querySelectorAll(
|
|
42
|
+
"ui-modal[aberto], ui-modal[open], ui-dialog[aberto], ui-dialog[open], ui-drawer[aberto], ui-drawer[open], ui-sheet[aberto], ui-sheet[open]"
|
|
43
|
+
).length > 0 ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
44
|
+
}
|
|
45
|
+
class g extends _ {
|
|
46
|
+
constructor() {
|
|
47
|
+
super();
|
|
48
|
+
o(this, "backdropElement");
|
|
49
|
+
o(this, "painelElement");
|
|
50
|
+
o(this, "tituloElement");
|
|
51
|
+
o(this, "descricaoElement");
|
|
52
|
+
o(this, "closeElement");
|
|
53
|
+
o(this, "listeners", new v());
|
|
54
|
+
o(this, "_elementoGatilho", null);
|
|
55
|
+
o(this, "_focables", []);
|
|
56
|
+
o(this, "handleSlotChange", () => {
|
|
57
|
+
this.syncState();
|
|
58
|
+
});
|
|
59
|
+
o(this, "handleBackdropClick", (t) => {
|
|
60
|
+
t.stopPropagation(), this.hasAttribute("estatico") || this.hasAttribute("static") || this.fechar();
|
|
61
|
+
});
|
|
62
|
+
o(this, "handleCloseClick", (t) => {
|
|
63
|
+
t.stopPropagation(), this.fechar();
|
|
64
|
+
});
|
|
65
|
+
o(this, "handleKeyDown", (t) => {
|
|
66
|
+
this.aberto && O(this) && (t.key === "Escape" ? this.hasAttribute("estatico") || this.hasAttribute("static") || (this.fechar(), t.stopImmediatePropagation()) : t.key === "Tab" && (this._focables = A(this.shadowRoot), H(t, this._focables, this, this.shadowRoot)));
|
|
67
|
+
});
|
|
68
|
+
const t = this.attachShadow({ mode: "open" });
|
|
69
|
+
t.innerHTML = `
|
|
70
|
+
<style>${B}</style>
|
|
71
|
+
<div class="ui-drawer__backdrop" part="fundo"></div>
|
|
72
|
+
<aside class="ui-drawer__painel" part="painel" role="dialog" aria-modal="true" tabindex="-1">
|
|
73
|
+
<div class="ui-drawer__header" part="cabecalho">
|
|
74
|
+
<div class="ui-drawer__titulo-container">
|
|
75
|
+
<h3 class="ui-drawer__titulo" part="titulo"></h3>
|
|
76
|
+
<p class="ui-drawer__descricao" part="descricao" style="display: none;"></p>
|
|
77
|
+
</div>
|
|
78
|
+
<button type="button" class="ui-drawer__close" part="fechar" aria-label="Fechar painel lateral" title="Fechar">✕</button>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ui-drawer__body" part="corpo">
|
|
81
|
+
<slot></slot>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="ui-drawer__footer" part="rodape">
|
|
84
|
+
<slot name="rodape"></slot>
|
|
85
|
+
<slot name="footer"></slot>
|
|
86
|
+
</div>
|
|
87
|
+
</aside>
|
|
88
|
+
`, this.backdropElement = t.querySelector(".ui-drawer__backdrop"), this.painelElement = t.querySelector(".ui-drawer__painel"), this.tituloElement = t.querySelector(".ui-drawer__titulo"), this.descricaoElement = t.querySelector(".ui-drawer__descricao"), this.closeElement = t.querySelector(".ui-drawer__close");
|
|
89
|
+
}
|
|
90
|
+
static get observedAttributes() {
|
|
91
|
+
return [
|
|
92
|
+
"aberto",
|
|
93
|
+
"open",
|
|
94
|
+
"posicao",
|
|
95
|
+
"position",
|
|
96
|
+
"titulo",
|
|
97
|
+
"title",
|
|
98
|
+
"descricao",
|
|
99
|
+
"description",
|
|
100
|
+
"largura",
|
|
101
|
+
"width",
|
|
102
|
+
"estatico",
|
|
103
|
+
"static"
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
connectedCallback() {
|
|
107
|
+
this.listeners.cleanup(), this.listeners.add(this.backdropElement, "click", this.handleBackdropClick), this.listeners.add(this.closeElement, "click", this.handleCloseClick), this.listeners.add(window, "keydown", this.handleKeyDown), this.shadowRoot.querySelectorAll("slot").forEach((i) => {
|
|
108
|
+
this.listeners.add(i, "slotchange", this.handleSlotChange);
|
|
109
|
+
}), this.syncState();
|
|
110
|
+
}
|
|
111
|
+
disconnectedCallback() {
|
|
112
|
+
this.listeners.cleanup(), g.atualizarScrollLock();
|
|
113
|
+
}
|
|
114
|
+
attributeChangedCallback(t, i, e) {
|
|
115
|
+
(t === "aberto" || t === "open") && e !== null && (document.activeElement && document.activeElement !== document.body && (this._elementoGatilho = document.activeElement), setTimeout(() => {
|
|
116
|
+
this._focables = A(this.shadowRoot), this._focables.length > 0 ? this._focables[0].focus() : this.painelElement.focus();
|
|
117
|
+
}, 0)), this.syncState();
|
|
118
|
+
}
|
|
119
|
+
get aberto() {
|
|
120
|
+
return this.hasAttribute("aberto") || this.hasAttribute("open");
|
|
121
|
+
}
|
|
122
|
+
set aberto(t) {
|
|
123
|
+
t ? this.setAttribute("aberto", "") : (this.removeAttribute("aberto"), this.removeAttribute("open")), this.syncState();
|
|
124
|
+
}
|
|
125
|
+
get posicao() {
|
|
126
|
+
const t = (this.getAttribute("posicao") || this.getAttribute("position") || "direita").toLowerCase();
|
|
127
|
+
return t === "esquerda" || t === "left" ? "esquerda" : t === "baixo" || t === "bottom" ? "baixo" : t === "cima" || t === "top" ? "cima" : "direita";
|
|
128
|
+
}
|
|
129
|
+
set posicao(t) {
|
|
130
|
+
this.setAttribute("posicao", t);
|
|
131
|
+
}
|
|
132
|
+
abrir() {
|
|
133
|
+
this.aberto || (document.activeElement && document.activeElement !== document.body && (this._elementoGatilho = document.activeElement), this.aberto = !0, this.dispatchEvent(
|
|
134
|
+
new CustomEvent("ui-abrir", {
|
|
135
|
+
bubbles: !0,
|
|
136
|
+
composed: !0
|
|
137
|
+
})
|
|
138
|
+
), setTimeout(() => {
|
|
139
|
+
this._focables = A(this.shadowRoot), this._focables.length > 0 ? this._focables[0].focus() : this.painelElement.focus();
|
|
140
|
+
}, 0));
|
|
141
|
+
}
|
|
142
|
+
fechar() {
|
|
143
|
+
this.aberto && (this.aberto = !1, this.dispatchEvent(
|
|
144
|
+
new CustomEvent("ui-fechar", {
|
|
145
|
+
bubbles: !0,
|
|
146
|
+
composed: !0
|
|
147
|
+
})
|
|
148
|
+
), this._elementoGatilho && (this._elementoGatilho.focus(), this._elementoGatilho = null));
|
|
149
|
+
}
|
|
150
|
+
alternar() {
|
|
151
|
+
this.aberto ? this.fechar() : this.abrir();
|
|
152
|
+
}
|
|
153
|
+
syncState() {
|
|
154
|
+
var l, c;
|
|
155
|
+
const t = this.aberto, i = this.getAttribute("titulo") || this.getAttribute("title") || "", e = this.getAttribute("descricao") || this.getAttribute("description") || "", a = this.getAttribute("largura") || this.getAttribute("width"), n = (l = this.shadowRoot) == null ? void 0 : l.querySelector(".ui-drawer__footer");
|
|
156
|
+
if (this.painelElement.setAttribute("aria-hidden", String(!t)), i ? (this.tituloElement.textContent = i, this.tituloElement.style.display = "block") : this.tituloElement.style.display = "none", e ? (this.descricaoElement.textContent = e, this.descricaoElement.style.display = "block") : this.descricaoElement.style.display = "none", a ? this.style.setProperty("--ui-drawer-largura", isNaN(Number(a)) ? a : `${a}px`) : this.style.removeProperty("--ui-drawer-largura"), n) {
|
|
157
|
+
const u = Array.from(((c = this.shadowRoot) == null ? void 0 : c.querySelectorAll('slot[name="rodape"], slot[name="footer"]')) || []).some((m) => m.assignedNodes({ flatten: !0 }).some((f) => f.nodeType === Node.ELEMENT_NODE || f.textContent && f.textContent.trim() !== "")) || this.querySelector('[slot="rodape"], [slot="footer"]') !== null;
|
|
158
|
+
n.style.display = u ? "flex" : "none";
|
|
159
|
+
}
|
|
160
|
+
g.atualizarScrollLock();
|
|
161
|
+
}
|
|
162
|
+
static atualizarScrollLock() {
|
|
163
|
+
F();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
class j extends g {
|
|
167
|
+
}
|
|
168
|
+
class G extends g {
|
|
169
|
+
}
|
|
170
|
+
class U extends g {
|
|
171
|
+
}
|
|
172
|
+
b("ui-drawer", g);
|
|
173
|
+
b("ui-sheet", j);
|
|
174
|
+
b("ui-painel-lateral", G);
|
|
175
|
+
b("ui-gaveta", U);
|
|
176
|
+
const Y = ':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-alerta{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-radius:var(--ui-raio-borda, 8px);border:1px solid transparent;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box;position:relative;transition:opacity .2s ease,transform .2s ease;line-height:1.4}.ui-alerta__icone{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px;line-height:1}.ui-alerta__icone svg,.ui-alerta__icone ::slotted(svg),.ui-alerta__icone ::slotted(ui-icone){shape-rendering:geometricPrecision}.ui-alerta__conteudo{flex:1}.ui-alerta__titulo{font-size:14px;font-weight:600;margin:0 0 2px;line-height:1.2}.ui-alerta__mensagem{font-size:13px;margin:0;opacity:.9}.ui-alerta__close{background:transparent;border:none;color:currentColor;opacity:.7;font-size:14px;cursor:pointer;padding:2px 6px;border-radius:var(--ui-raio-sm, 4px);line-height:1;flex-shrink:0;margin-top:-2px;margin-right:-4px;transition:opacity .15s ease,background-color .15s ease}.ui-alerta__close:hover{opacity:1;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent)}.ui-alerta--sucesso{background-color:color-mix(in srgb,var(--ui-cor-texto-sucesso, #00E08A) 12%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-sucesso, #00E08A) 30%,transparent);color:var(--ui-cor-texto-sucesso, #00E08A)}.ui-alerta--sucesso .ui-alerta__mensagem{color:var(--ui-cor-texto, #e1e1e6)}.ui-alerta--erro{background-color:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 12%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 30%,transparent);color:var(--ui-cor-texto-erro, #ff5555)}.ui-alerta--erro .ui-alerta__mensagem{color:var(--ui-cor-texto, #e1e1e6)}.ui-alerta--alerta{background-color:color-mix(in srgb,var(--ui-cor-texto-alerta, #ffb86c) 12%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-alerta, #ffb86c) 30%,transparent);color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-alerta--alerta .ui-alerta__mensagem{color:var(--ui-cor-texto, #e1e1e6)}.ui-alerta--info{background-color:color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 12%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 30%,transparent);color:var(--ui-cor-texto-info, #33b5ff)}.ui-alerta--info .ui-alerta__mensagem{color:var(--ui-cor-texto, #e1e1e6)}.ui-alerta__acoes{display:flex;align-items:center;flex-shrink:0;margin-left:4px}.ui-alerta__botao-acao{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent);color:inherit;font-family:inherit;font-size:12px;font-weight:600;padding:4px 10px;border-radius:5px;cursor:pointer;line-height:1;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,transform .1s ease}.ui-alerta__botao-acao:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent)}.ui-alerta__botao-acao:active{transform:scale(.96)}.ui-alerta__botao-acao:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-cor-fundo, #0b0b0d),0 0 0 4px var(--ui-cor-primaria, #00E08A)}.ui-alerta__botao-acao--primario{background:color-mix(in srgb,var(--ui-cor-texto-sucesso, #00E08A) 15%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-sucesso, #00E08A) 35%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-alerta__botao-acao--primario:hover{background:color-mix(in srgb,var(--ui-cor-texto-sucesso, #00E08A) 25%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-sucesso, #00E08A) 50%,transparent)}.ui-alerta__botao-acao--destrutivo{background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 15%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 35%,transparent);color:var(--ui-cor-texto-erro, #ff5555)}.ui-alerta__botao-acao--destrutivo:hover{background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 25%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 50%,transparent)}:host(ui-toast){display:block;width:100%;box-sizing:border-box;pointer-events:auto;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .25s ease}.ui-toast__banner{box-shadow:var(--ui-sombra-lg, 0 10px 30px rgba(0, 0, 0, .3)),0 0 0 1px var(--ui-cor-borda, rgba(255, 255, 255, .1));animation:ui-toast-slide .3s cubic-bezier(.16,1,.3,1);position:relative;overflow:hidden;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.ui-toast__banner.ui-alerta--sucesso{background-color:color-mix(in srgb,color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 88%,var(--ui-cor-texto-sucesso, #00E08A) 12%) 60%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-sucesso, #00E08A) 40%,transparent)}.ui-toast__banner.ui-alerta--erro{background-color:color-mix(in srgb,color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 88%,var(--ui-cor-texto-erro, #ff5555) 12%) 60%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 40%,transparent)}.ui-toast__banner.ui-alerta--alerta{background-color:color-mix(in srgb,color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 88%,var(--ui-cor-texto-alerta, #ffb86c) 12%) 60%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-alerta, #ffb86c) 40%,transparent)}.ui-toast__banner.ui-alerta--info{background-color:color-mix(in srgb,color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 88%,var(--ui-cor-texto-info, #33b5ff) 12%) 60%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 40%,transparent)}.ui-toast__progresso{position:absolute;bottom:0;left:0;right:0;height:2px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);overflow:hidden}.ui-toast__progresso-barra{width:100%;height:100%;background:currentColor;opacity:.7;transform-origin:left;animation:ui-toast-timer linear forwards}:host(ui-toast:hover) .ui-toast__progresso-barra,:host(ui-toast:focus-within) .ui-toast__progresso-barra{animation-play-state:paused}@keyframes ui-toast-timer{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes ui-toast-slide{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@starting-style{:host(ui-toast){opacity:0;transform:translateY(12px) scale(.96)}}:host(.squarecircle) .ui-alerta,:host(.squarecircles) .ui-alerta,:host(.ui-squarecircle) .ui-alerta,:host(.ui-squarecircles) .ui-alerta,:host([formato="squarecircle"]) .ui-alerta,:host([formato="squarecircles"]) .ui-alerta,:host([formato="squircle"]) .ui-alerta{border-radius:var(--ui-raio-lg, 10px)}', q = {
|
|
177
|
+
sucesso: '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>',
|
|
178
|
+
erro: '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>',
|
|
179
|
+
alerta: '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>',
|
|
180
|
+
info: '<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>'
|
|
181
|
+
};
|
|
182
|
+
class L extends _ {
|
|
183
|
+
constructor() {
|
|
184
|
+
super();
|
|
185
|
+
o(this, "alertaElement");
|
|
186
|
+
o(this, "iconeElement");
|
|
187
|
+
o(this, "tituloElement");
|
|
188
|
+
o(this, "mensagemElement");
|
|
189
|
+
o(this, "mensagemTextoElement");
|
|
190
|
+
o(this, "closeElement");
|
|
191
|
+
o(this, "acoesElement");
|
|
192
|
+
o(this, "botaoAcaoElement");
|
|
193
|
+
o(this, "progressoContainer");
|
|
194
|
+
o(this, "progressoBarra");
|
|
195
|
+
o(this, "listeners", new v());
|
|
196
|
+
const t = this.attachShadow({ mode: "open" });
|
|
197
|
+
t.innerHTML = `
|
|
198
|
+
<style>${Y}</style>
|
|
199
|
+
<div class="ui-alerta" part="base" role="alert">
|
|
200
|
+
<span class="ui-alerta__icone" part="icone"></span>
|
|
201
|
+
<div class="ui-alerta__conteudo" part="conteudo">
|
|
202
|
+
<h4 class="ui-alerta__titulo" part="titulo" style="display: none;"></h4>
|
|
203
|
+
<p class="ui-alerta__mensagem" part="mensagem">
|
|
204
|
+
<span class="ui-alerta__mensagem-texto" style="display: none;"></span>
|
|
205
|
+
<slot></slot>
|
|
206
|
+
</p>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="ui-alerta__acoes" style="display: none;">
|
|
209
|
+
<button type="button" class="ui-alerta__botao-acao" part="acao"></button>
|
|
210
|
+
</div>
|
|
211
|
+
<button class="ui-alerta__close" part="fechar" type="button" aria-label="Fechar alerta" style="display: none;" title="Fechar">✕</button>
|
|
212
|
+
<div class="ui-toast__progresso" part="progresso" style="display: none;">
|
|
213
|
+
<div class="ui-toast__progresso-barra"></div>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
`, this.alertaElement = t.querySelector(".ui-alerta"), this.iconeElement = t.querySelector(".ui-alerta__icone"), this.tituloElement = t.querySelector(".ui-alerta__titulo"), this.mensagemElement = t.querySelector(".ui-alerta__mensagem"), this.mensagemTextoElement = t.querySelector(".ui-alerta__mensagem-texto"), this.closeElement = t.querySelector(".ui-alerta__close"), this.acoesElement = t.querySelector(".ui-alerta__acoes"), this.botaoAcaoElement = t.querySelector(".ui-alerta__botao-acao"), this.progressoContainer = t.querySelector(".ui-toast__progresso"), this.progressoBarra = t.querySelector(".ui-toast__progresso-barra");
|
|
217
|
+
}
|
|
218
|
+
static get observedAttributes() {
|
|
219
|
+
return [
|
|
220
|
+
"tipo",
|
|
221
|
+
"variante",
|
|
222
|
+
"variant",
|
|
223
|
+
"titulo",
|
|
224
|
+
"title",
|
|
225
|
+
"mensagem",
|
|
226
|
+
"fechavel",
|
|
227
|
+
"dismissible"
|
|
228
|
+
];
|
|
229
|
+
}
|
|
230
|
+
connectedCallback() {
|
|
231
|
+
this.listeners.cleanup(), this.listeners.add(this.closeElement, "click", () => this.fechar()), this.syncState();
|
|
232
|
+
}
|
|
233
|
+
disconnectedCallback() {
|
|
234
|
+
this.listeners.cleanup();
|
|
235
|
+
}
|
|
236
|
+
attributeChangedCallback(t, i, e) {
|
|
237
|
+
this.syncState();
|
|
238
|
+
}
|
|
239
|
+
fechar() {
|
|
240
|
+
this.dispatchEvent(
|
|
241
|
+
new CustomEvent("ui-fechar", {
|
|
242
|
+
bubbles: !0,
|
|
243
|
+
composed: !0
|
|
244
|
+
})
|
|
245
|
+
), this.remove();
|
|
246
|
+
}
|
|
247
|
+
syncState() {
|
|
248
|
+
const t = this.getAttribute("tipo") || this.getAttribute("variante") || this.getAttribute("variant") || "info", i = this.getAttribute("titulo") || this.getAttribute("title"), e = this.getAttribute("mensagem"), a = this.hasAttribute("fechavel") || this.hasAttribute("dismissible");
|
|
249
|
+
this.alertaElement.className = `ui-alerta ui-alerta--${t}`;
|
|
250
|
+
const n = q[t] || q.info;
|
|
251
|
+
this.iconeElement.innerHTML = n, i ? (this.tituloElement.textContent = i, this.tituloElement.style.display = "block") : (this.tituloElement.style.display = "none", this.tituloElement.textContent = ""), e ? (this.mensagemTextoElement.textContent = e, this.mensagemTextoElement.style.display = "inline") : (this.mensagemTextoElement.style.display = "none", this.mensagemTextoElement.textContent = ""), a ? this.closeElement.style.display = "block" : this.closeElement.style.display = "none";
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
b("ui-alerta", L);
|
|
255
|
+
class y extends L {
|
|
256
|
+
constructor() {
|
|
257
|
+
super(...arguments);
|
|
258
|
+
o(this, "timerId", null);
|
|
259
|
+
o(this, "tempoRestante", 4e3);
|
|
260
|
+
o(this, "inicioTimestamp", 0);
|
|
261
|
+
o(this, "isPausado", !1);
|
|
262
|
+
o(this, "acaoConfig");
|
|
263
|
+
o(this, "containerRef", null);
|
|
264
|
+
o(this, "handleAcaoClick", (t) => {
|
|
265
|
+
var i, e, a;
|
|
266
|
+
t.stopPropagation(), (i = this.acaoConfig) != null && i.onClick && this.acaoConfig.onClick(t), this.dispatchEvent(
|
|
267
|
+
new CustomEvent("ui-toast-acao", {
|
|
268
|
+
detail: {
|
|
269
|
+
rotulo: (e = this.acaoConfig) == null ? void 0 : e.rotulo,
|
|
270
|
+
tipo: (a = this.acaoConfig) == null ? void 0 : a.tipo
|
|
271
|
+
},
|
|
272
|
+
bubbles: !0,
|
|
273
|
+
composed: !0
|
|
274
|
+
})
|
|
275
|
+
), this.fechar();
|
|
276
|
+
});
|
|
277
|
+
o(this, "pausarTimer", () => {
|
|
278
|
+
if (this.isPausado || this.tempoRestante <= 0) return;
|
|
279
|
+
this.isPausado = !0, this.timerId && (clearTimeout(this.timerId), this.timerId = null);
|
|
280
|
+
const t = Date.now() - this.inicioTimestamp;
|
|
281
|
+
this.tempoRestante = Math.max(0, this.tempoRestante - t), this.progressoBarra.style.animationPlayState = "paused";
|
|
282
|
+
});
|
|
283
|
+
o(this, "retomarTimer", () => {
|
|
284
|
+
!this.isPausado || this.tempoRestante <= 0 || (this.isPausado = !1, this.progressoBarra.style.animationPlayState = "running", this.iniciarTimer(Math.max(this.tempoRestante, 300)));
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
configurarAcao(t) {
|
|
288
|
+
this.acaoConfig = t, this.botaoAcaoElement.textContent = t.rotulo, this.acoesElement.style.display = "flex";
|
|
289
|
+
const i = t.tipo || "primario";
|
|
290
|
+
this.botaoAcaoElement.className = `ui-alerta__botao-acao ui-alerta__botao-acao--${i}`;
|
|
291
|
+
}
|
|
292
|
+
connectedCallback() {
|
|
293
|
+
super.connectedCallback(), this.containerRef = this.parentElement, this.alertaElement.classList.add("ui-toast__banner"), this.acaoConfig && this.listeners.add(this.botaoAcaoElement, "click", this.handleAcaoClick);
|
|
294
|
+
const t = this.getAttribute("duracao") || this.getAttribute("duration") || "4000", i = parseInt(t, 10);
|
|
295
|
+
this.tempoRestante = isNaN(i) ? 4e3 : i, this.tempoRestante > 0 ? (this.progressoContainer.style.display = "block", this.progressoBarra.style.animationDuration = `${this.tempoRestante}ms`, this.getAttribute("pausar-no-hover") !== "false" && (this.listeners.add(this, "mouseenter", this.pausarTimer), this.listeners.add(this, "mouseleave", this.retomarTimer), this.listeners.add(this, "focusin", this.pausarTimer), this.listeners.add(this, "focusout", this.retomarTimer)), this.iniciarTimer(this.tempoRestante)) : this.progressoContainer.style.display = "none";
|
|
296
|
+
}
|
|
297
|
+
fechar() {
|
|
298
|
+
const t = this.parentElement || this.containerRef;
|
|
299
|
+
super.fechar(), t && t.id.startsWith("ui-toast-container-") && t.children.length === 0 && t.remove();
|
|
300
|
+
}
|
|
301
|
+
disconnectedCallback() {
|
|
302
|
+
super.disconnectedCallback(), this.timerId && (clearTimeout(this.timerId), this.timerId = null), this.containerRef && this.containerRef.id.startsWith("ui-toast-container-") && this.containerRef.children.length === 0 && (this.containerRef.remove(), this.containerRef = null);
|
|
303
|
+
}
|
|
304
|
+
iniciarTimer(t) {
|
|
305
|
+
this.timerId && clearTimeout(this.timerId), this.inicioTimestamp = Date.now(), this.timerId = setTimeout(() => {
|
|
306
|
+
this.fechar();
|
|
307
|
+
}, t);
|
|
308
|
+
}
|
|
309
|
+
static obterContainer(t) {
|
|
310
|
+
const i = `ui-toast-container-${t}`;
|
|
311
|
+
let e = document.getElementById(i);
|
|
312
|
+
return e || (e = document.createElement("div"), e.id = i, e.style.position = "fixed", e.style.setProperty("z-index", "var(--ui-z-toast, 1100)"), e.style.display = "flex", e.style.gap = "10px", e.style.maxWidth = "400px", e.style.width = "calc(100vw - 32px)", e.style.pointerEvents = "none", e.style.boxSizing = "border-box", e.style.transition = "all 0.2s ease", t === "top-right" ? (e.style.top = "20px", e.style.right = "20px", e.style.flexDirection = "column") : t === "top-left" ? (e.style.top = "20px", e.style.left = "20px", e.style.flexDirection = "column") : t === "bottom-left" ? (e.style.bottom = "20px", e.style.left = "20px", e.style.flexDirection = "column-reverse") : t === "top-center" ? (e.style.top = "20px", e.style.left = "50%", e.style.transform = "translateX(-50%)", e.style.flexDirection = "column") : t === "bottom-center" ? (e.style.bottom = "20px", e.style.left = "50%", e.style.transform = "translateX(-50%)", e.style.flexDirection = "column-reverse") : (e.style.bottom = "20px", e.style.right = "20px", e.style.flexDirection = "column-reverse"), document.body.appendChild(e)), e;
|
|
313
|
+
}
|
|
314
|
+
// Utilitário estático para disparo imperativo de Toasts de qualquer lugar no código
|
|
315
|
+
static notificar(t) {
|
|
316
|
+
if (typeof document > "u") return null;
|
|
317
|
+
const i = t.posicao || "bottom-right", e = document.createElement("ui-toast");
|
|
318
|
+
return t.tipo && e.setAttribute("tipo", t.tipo), t.titulo && e.setAttribute("titulo", t.titulo), t.mensagem && e.setAttribute("mensagem", t.mensagem), t.duracao !== void 0 && e.setAttribute("duracao", String(t.duracao)), t.pausarNoHover === !1 && e.setAttribute("pausar-no-hover", "false"), e.setAttribute("posicao", i), t.fechavel !== !1 && e.setAttribute("fechavel", ""), t.acao && e.configurarAcao(t.acao), y.obterContainer(i).appendChild(e), e;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
b("ui-toast", y);
|
|
322
|
+
function X() {
|
|
323
|
+
$.registrarProvedorToast((r) => {
|
|
324
|
+
y.notificar(r);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
X();
|
|
328
|
+
const Q = ":host{display:inline-flex;position:relative;align-items:center;justify-content:center;vertical-align:middle;box-sizing:border-box;--ui-tooltip-texto-distancia: 260px;--ui-tooltip-seta-espaco: 70px}.ui-tooltip__bubble{position:fixed;z-index:var(--ui-z-tooltip, 1200);padding:6px 10px;border-radius:6px;font-size:11px;font-weight:500;background-color:var(--ui-cor-fundo-elevado, #1e1e24);color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));box-shadow:var(--ui-sombra-md, 0 4px 16px rgba(0, 0, 0, .5));white-space:normal;max-width:var(--ui-tooltip-texto-distancia, 260px);width:max-content;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease,visibility .15s ease;line-height:1.35;box-sizing:border-box;-webkit-user-select:none;user-select:none;margin:0}.ui-tooltip__bubble[popover]{margin:0;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));background-color:var(--ui-cor-fundo-elevado, #1e1e24);color:var(--ui-cor-texto, #e1e1e6);padding:6px 10px;overflow:visible;max-width:var(--ui-tooltip-texto-distancia, 260px);width:max-content;white-space:normal}.ui-tooltip__texto{display:inline-block;max-width:100%}.ui-tooltip__arrow{position:absolute;width:0;height:0;border-style:solid}.ui-tooltip--topo .ui-tooltip__arrow{bottom:-5px;left:50%;transform:translate(-50%);border-width:5px 5px 0 5px;border-color:var(--ui-cor-fundo-elevado, #1e1e24) transparent transparent transparent}.ui-tooltip--baixo .ui-tooltip__arrow{top:-5px;left:50%;transform:translate(-50%);border-width:0 5px 5px 5px;border-color:transparent transparent var(--ui-cor-fundo-elevado, #1e1e24) transparent}.ui-tooltip--esquerda .ui-tooltip__arrow{right:-5px;top:50%;transform:translateY(-50%);border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--ui-cor-fundo-elevado, #1e1e24)}.ui-tooltip--direita .ui-tooltip__arrow{left:-5px;top:50%;transform:translateY(-50%);border-width:5px 5px 5px 0;border-color:transparent var(--ui-cor-fundo-elevado, #1e1e24) transparent transparent}.ui-tooltip--visivel .ui-tooltip__bubble{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1)}@starting-style{.ui-tooltip--visivel .ui-tooltip__bubble,.ui-tooltip__bubble:popover-open{opacity:0;transform:scale(.94)}}", x = 8, N = 8, T = {
|
|
329
|
+
topo: "topo",
|
|
330
|
+
top: "topo",
|
|
331
|
+
baixo: "baixo",
|
|
332
|
+
bottom: "baixo",
|
|
333
|
+
esquerda: "esquerda",
|
|
334
|
+
left: "esquerda",
|
|
335
|
+
direita: "direita",
|
|
336
|
+
right: "direita"
|
|
337
|
+
};
|
|
338
|
+
function z(r) {
|
|
339
|
+
const s = (r ?? "").trim().toLowerCase();
|
|
340
|
+
return Object.prototype.hasOwnProperty.call(T, s) ? T[s] : "topo";
|
|
341
|
+
}
|
|
342
|
+
const p = (r) => Number.isFinite(r) ? r : 0;
|
|
343
|
+
function W(r, s, t, i) {
|
|
344
|
+
const e = p(s.width), a = p(s.height), n = p(r.left) + p(r.width) / 2, l = p(r.top) + p(r.height) / 2;
|
|
345
|
+
let c = 0, d = 0;
|
|
346
|
+
t === "topo" ? (c = p(r.top) - a - x, d = n - e / 2) : t === "baixo" ? (c = p(r.bottom) + x, d = n - e / 2) : t === "esquerda" ? (c = l - a / 2, d = p(r.left) - e - x) : (c = l - a / 2, d = p(r.right) + x);
|
|
347
|
+
const u = (m, h, f) => Math.max(N, Math.min(m, p(f) - h - N));
|
|
348
|
+
return {
|
|
349
|
+
top: Math.round(u(c, a, i.altura)),
|
|
350
|
+
left: Math.round(u(d, e, i.largura))
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
function D(r) {
|
|
354
|
+
return r instanceof DOMException && r.name === "InvalidStateError";
|
|
355
|
+
}
|
|
356
|
+
function K(r) {
|
|
357
|
+
const s = r;
|
|
358
|
+
if (typeof s.showPopover == "function")
|
|
359
|
+
try {
|
|
360
|
+
s.showPopover();
|
|
361
|
+
} catch (t) {
|
|
362
|
+
D(t) || console.warn("[ui-tooltip] Não foi possível abrir o balão como popover:", t);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
function V(r) {
|
|
366
|
+
const s = r;
|
|
367
|
+
if (typeof s.hidePopover == "function")
|
|
368
|
+
try {
|
|
369
|
+
s.hidePopover();
|
|
370
|
+
} catch (t) {
|
|
371
|
+
D(t) || console.warn("[ui-tooltip] Não foi possível fechar o balão como popover:", t);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const J = 120;
|
|
375
|
+
class P extends _ {
|
|
376
|
+
constructor() {
|
|
377
|
+
super();
|
|
378
|
+
o(this, "containerElement");
|
|
379
|
+
o(this, "bubbleElement");
|
|
380
|
+
/** Ouvintes do host: valem enquanto o elemento está conectado. */
|
|
381
|
+
o(this, "ouvintesHost", new v());
|
|
382
|
+
/** Ouvintes globais (documento/janela): valem só enquanto o balão está aberto. */
|
|
383
|
+
o(this, "ouvintesAberto", new v());
|
|
384
|
+
o(this, "_timerOcultar", null);
|
|
385
|
+
o(this, "_quadro", null);
|
|
386
|
+
/** Gatilho que recebeu `aria-description` deste tooltip (para remover depois). */
|
|
387
|
+
o(this, "_gatilhoDescrito", null);
|
|
388
|
+
o(this, "posicionarBubble", () => {
|
|
389
|
+
if (!this.aberto) return;
|
|
390
|
+
const t = z(this.getAttribute("posicao") || this.getAttribute("position")), { top: i, left: e } = W(
|
|
391
|
+
this.getBoundingClientRect(),
|
|
392
|
+
this.bubbleElement.getBoundingClientRect(),
|
|
393
|
+
t,
|
|
394
|
+
{ largura: window.innerWidth, altura: window.innerHeight }
|
|
395
|
+
);
|
|
396
|
+
this.bubbleElement.style.top = `${i}px`, this.bubbleElement.style.left = `${e}px`;
|
|
397
|
+
});
|
|
398
|
+
o(this, "handleMouseEnter", () => {
|
|
399
|
+
const t = this.lerGatilho();
|
|
400
|
+
(t === "hover" || t === "passar-mouse") && (this.cancelarOcultar(), this.mostrar());
|
|
401
|
+
});
|
|
402
|
+
o(this, "handleMouseLeave", () => {
|
|
403
|
+
const t = this.lerGatilho();
|
|
404
|
+
(t === "hover" || t === "passar-mouse") && (this.cancelarOcultar(), this._timerOcultar = setTimeout(() => {
|
|
405
|
+
this._timerOcultar = null, this.ocultar();
|
|
406
|
+
}, J));
|
|
407
|
+
});
|
|
408
|
+
/**
|
|
409
|
+
* Escape fecha o tooltip sem mover o foco (WCAG 1.4.13). Ouvido na captura e interrompido,
|
|
410
|
+
* para que dentro de um modal o primeiro Escape feche só o tooltip.
|
|
411
|
+
*/
|
|
412
|
+
o(this, "handleEscape", (t) => {
|
|
413
|
+
t.key !== "Escape" || !this.aberto || (t.stopPropagation(), this.cancelarOcultar(), this.ocultar());
|
|
414
|
+
});
|
|
415
|
+
/** O clique do gatilho continua chegando aos ancestrais: o "clicar fora" já ignora cliques dentro do host. */
|
|
416
|
+
o(this, "handleClick", () => {
|
|
417
|
+
const t = typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches, i = this.lerGatilho();
|
|
418
|
+
(i === "clique" || i === "click" || t) && (this.aberto = !this.aberto);
|
|
419
|
+
});
|
|
420
|
+
o(this, "handleClickOutside", (t) => {
|
|
421
|
+
t.composedPath().includes(this) || this.ocultar();
|
|
422
|
+
});
|
|
423
|
+
const t = this.attachShadow({ mode: "open" });
|
|
424
|
+
t.innerHTML = `
|
|
425
|
+
<style>${Q}</style>
|
|
426
|
+
<div class="ui-tooltip ui-tooltip--topo">
|
|
427
|
+
<slot></slot>
|
|
428
|
+
<div class="ui-tooltip__bubble" part="balao" role="tooltip" popover="manual">
|
|
429
|
+
<span class="ui-tooltip__texto" part="texto"></span>
|
|
430
|
+
<slot name="conteudo"></slot>
|
|
431
|
+
<span class="ui-tooltip__arrow" part="seta"></span>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
`, this.containerElement = t.querySelector(".ui-tooltip"), this.bubbleElement = t.querySelector(".ui-tooltip__bubble"), t.querySelectorAll("slot").forEach((i) => i.addEventListener("slotchange", () => this.sincronizarDescricao()));
|
|
435
|
+
}
|
|
436
|
+
static get observedAttributes() {
|
|
437
|
+
return [
|
|
438
|
+
"texto",
|
|
439
|
+
"text",
|
|
440
|
+
"posicao",
|
|
441
|
+
"position",
|
|
442
|
+
"gatilho",
|
|
443
|
+
"trigger",
|
|
444
|
+
"aberto",
|
|
445
|
+
"open",
|
|
446
|
+
"disabled"
|
|
447
|
+
];
|
|
448
|
+
}
|
|
449
|
+
connectedCallback() {
|
|
450
|
+
this.ouvintesHost.cleanup(), this.ouvintesHost.add(this, "mouseenter", this.handleMouseEnter), this.ouvintesHost.add(this, "mouseleave", this.handleMouseLeave), this.ouvintesHost.add(this, "focusin", this.handleMouseEnter), this.ouvintesHost.add(this, "focusout", this.handleMouseLeave), this.ouvintesHost.add(this, "click", this.handleClick), this.syncState();
|
|
451
|
+
}
|
|
452
|
+
disconnectedCallback() {
|
|
453
|
+
this.ouvintesHost.cleanup(), this.ouvintesAberto.cleanup(), this.cancelarOcultar(), this.cancelarQuadro(), this.removerDescricao(), this.ocultar();
|
|
454
|
+
}
|
|
455
|
+
attributeChangedCallback(t, i, e) {
|
|
456
|
+
this.syncState();
|
|
457
|
+
}
|
|
458
|
+
get aberto() {
|
|
459
|
+
return this.hasAttribute("aberto") || this.hasAttribute("open");
|
|
460
|
+
}
|
|
461
|
+
set aberto(t) {
|
|
462
|
+
t ? this.setAttribute("aberto", "") : (this.removeAttribute("aberto"), this.removeAttribute("open")), this.syncState();
|
|
463
|
+
}
|
|
464
|
+
get disabled() {
|
|
465
|
+
return this.hasAttribute("disabled");
|
|
466
|
+
}
|
|
467
|
+
set disabled(t) {
|
|
468
|
+
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"), this.syncState();
|
|
469
|
+
}
|
|
470
|
+
mostrar() {
|
|
471
|
+
this.disabled || (this.aberto = !0);
|
|
472
|
+
}
|
|
473
|
+
ocultar() {
|
|
474
|
+
this.aberto = !1;
|
|
475
|
+
}
|
|
476
|
+
lerGatilho() {
|
|
477
|
+
return this.getAttribute("gatilho") || this.getAttribute("trigger") || "hover";
|
|
478
|
+
}
|
|
479
|
+
cancelarQuadro() {
|
|
480
|
+
this._quadro !== null && (cancelAnimationFrame(this._quadro), this._quadro = null);
|
|
481
|
+
}
|
|
482
|
+
syncState() {
|
|
483
|
+
var n;
|
|
484
|
+
const t = this.aberto && !this.disabled, i = z(this.getAttribute("posicao") || this.getAttribute("position")), e = this.getAttribute("texto") || this.getAttribute("text") || "", a = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".ui-tooltip__texto");
|
|
485
|
+
this.containerElement.className = `ui-tooltip ui-tooltip--${i}`, a && (a.textContent = e, a.style.display = e ? "inline" : "none"), this.sincronizarDescricao(), t ? this.abrirBalao() : this.fecharBalao();
|
|
486
|
+
}
|
|
487
|
+
abrirBalao() {
|
|
488
|
+
this.ouvintesAberto.size === 0 && (this.ouvintesAberto.add(document, "click", this.handleClickOutside), this.ouvintesAberto.add(document, "keydown", this.handleEscape, !0), this.ouvintesAberto.add(window, "scroll", this.posicionarBubble, { capture: !0, passive: !0 }), this.ouvintesAberto.add(window, "resize", this.posicionarBubble, { passive: !0 })), K(this.bubbleElement), this.containerElement.classList.add("ui-tooltip--visivel"), this.cancelarQuadro(), this._quadro = requestAnimationFrame(() => {
|
|
489
|
+
this._quadro = null, this.posicionarBubble();
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
fecharBalao() {
|
|
493
|
+
this.ouvintesAberto.cleanup(), this.cancelarQuadro(), V(this.bubbleElement), this.containerElement.classList.remove("ui-tooltip--visivel");
|
|
494
|
+
}
|
|
495
|
+
cancelarOcultar() {
|
|
496
|
+
this._timerOcultar && (clearTimeout(this._timerOcultar), this._timerOcultar = null);
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* O balão vive no Shadow DOM, fora do alcance de `aria-describedby` do gatilho (light DOM).
|
|
500
|
+
* O texto é exposto como `aria-description` no gatilho, sem sobrescrever uma descrição do consumidor.
|
|
501
|
+
*/
|
|
502
|
+
sincronizarDescricao() {
|
|
503
|
+
var a;
|
|
504
|
+
if (!this.isConnected) {
|
|
505
|
+
this.removerDescricao();
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
const t = Array.from(this.children).find((n) => !n.hasAttribute("slot")), i = (this.getAttribute("texto") || this.getAttribute("text") || ((a = this.querySelector('[slot="conteudo"]')) == null ? void 0 : a.textContent) || "").replace(/\s+/g, " ").trim();
|
|
509
|
+
this._gatilhoDescrito && this._gatilhoDescrito !== t && this.removerDescricao(), !(!t || this._gatilhoDescrito !== t && (t.hasAttribute("aria-describedby") || t.hasAttribute("aria-description"))) && (i && !this.disabled ? (t.setAttribute("aria-description", i), this._gatilhoDescrito = t) : this.removerDescricao());
|
|
510
|
+
}
|
|
511
|
+
removerDescricao() {
|
|
512
|
+
var t;
|
|
513
|
+
(t = this._gatilhoDescrito) == null || t.removeAttribute("aria-description"), this._gatilhoDescrito = null;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
class Z extends P {
|
|
517
|
+
}
|
|
518
|
+
b("ui-tooltip", P);
|
|
519
|
+
b("ui-popover", Z);
|
|
520
|
+
const tt = ":host{display:block;box-sizing:border-box}:host([inline]){display:inline-block}.ui-skeleton{background:var(--ui-cor-fundo-elevado, #1e1e24);background-image:linear-gradient(90deg,#fff0,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent),#fff0);background-size:200% 100%;background-repeat:no-repeat;border-radius:var(--ui-raio-borda, 6px);position:relative;overflow:hidden;box-sizing:border-box;animation:ui-skeleton-shimmer 1.6s ease-in-out infinite}@keyframes ui-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.ui-skeleton--pulso{background-image:none;animation:ui-skeleton-pulse 1.8s ease-in-out infinite}@keyframes ui-skeleton-pulse{0%,to{opacity:1}50%{opacity:.45}}.ui-skeleton--estatico{animation:none;background-image:none}.ui-skeleton--texto{height:1.1em;border-radius:var(--ui-raio-sm, 4px)}.ui-skeleton--circular{border-radius:50%!important;aspect-ratio:1;width:var(--ui-skeleton-largura, 40px);height:var(--ui-skeleton-altura, 40px)}.ui-skeleton--retangular{border-radius:var(--ui-raio-borda, 6px);min-height:20px}.ui-skeleton__linhas{display:flex;flex-direction:column;gap:8px;width:100%}.ui-skeleton__linhas .ui-skeleton{width:100%}.ui-skeleton__linhas .ui-skeleton:last-child:not(:first-child){width:65%}.ui-skeleton--card{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:var(--ui-raio-borda, 10px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));background:var(--ui-cor-fundo-card, #18181c);animation:none}.ui-skeleton__card-media{width:100%;height:120px;border-radius:6px}.ui-skeleton__card-header{display:flex;align-items:center;gap:10px}.ui-skeleton__card-avatar{width:36px;height:36px;border-radius:50%;flex-shrink:0}.ui-skeleton__card-title{width:50%;height:16px}@media (prefers-reduced-motion: reduce){.ui-skeleton{animation:none!important;background-image:none!important;opacity:.7}}", et = 100;
|
|
521
|
+
class R extends _ {
|
|
522
|
+
constructor() {
|
|
523
|
+
super();
|
|
524
|
+
o(this, "rootElement");
|
|
525
|
+
/** O que este componente escreveu em aria-hidden / role (para não sobrescrever o consumidor). */
|
|
526
|
+
o(this, "_ocultoAuto", !1);
|
|
527
|
+
o(this, "_papelAuto", !1);
|
|
528
|
+
o(this, "_sincronizando", !1);
|
|
529
|
+
const t = this.attachShadow({ mode: "open" });
|
|
530
|
+
t.innerHTML = `
|
|
531
|
+
<style>${tt}</style>
|
|
532
|
+
<div class="ui-skeleton-container"></div>
|
|
533
|
+
`, this.rootElement = t.querySelector(".ui-skeleton-container");
|
|
534
|
+
}
|
|
535
|
+
static get observedAttributes() {
|
|
536
|
+
return [
|
|
537
|
+
"variante",
|
|
538
|
+
"variant",
|
|
539
|
+
"largura",
|
|
540
|
+
"width",
|
|
541
|
+
"altura",
|
|
542
|
+
"height",
|
|
543
|
+
"raio",
|
|
544
|
+
"radius",
|
|
545
|
+
"linhas",
|
|
546
|
+
"lines",
|
|
547
|
+
"count",
|
|
548
|
+
"animado",
|
|
549
|
+
"animated",
|
|
550
|
+
"aria-label"
|
|
551
|
+
];
|
|
552
|
+
}
|
|
553
|
+
connectedCallback() {
|
|
554
|
+
this.sincronizarAcessibilidade(), this.syncState();
|
|
555
|
+
}
|
|
556
|
+
attributeChangedCallback(t, i, e) {
|
|
557
|
+
this._sincronizando || (this.sincronizarAcessibilidade(), this.syncState());
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Decorativo por padrão (`aria-hidden`). Com `aria-label` vira uma região de status anunciável
|
|
561
|
+
* ("Carregando tabela"). O que o consumidor definiu em aria-hidden/role é preservado.
|
|
562
|
+
*/
|
|
563
|
+
sincronizarAcessibilidade() {
|
|
564
|
+
this._sincronizando = !0;
|
|
565
|
+
const t = !!this.getAttribute("aria-label"), i = this.hasAttribute("aria-hidden") && !this._ocultoAuto;
|
|
566
|
+
t ? (this._ocultoAuto && this.removeAttribute("aria-hidden"), this._ocultoAuto = !1, this.hasAttribute("role") || (this.setAttribute("role", "status"), this._papelAuto = !0)) : (this._papelAuto && this.removeAttribute("role"), this._papelAuto = !1, i || (this.setAttribute("aria-hidden", "true"), this._ocultoAuto = !0)), this._sincronizando = !1;
|
|
567
|
+
}
|
|
568
|
+
get variante() {
|
|
569
|
+
const t = (this.getAttribute("variante") || this.getAttribute("variant") || "texto").toLowerCase();
|
|
570
|
+
return t === "circulo" || t === "circular" ? "circular" : t === "retangulo" || t === "retangular" ? "retangular" : t === "card" ? "card" : "texto";
|
|
571
|
+
}
|
|
572
|
+
set variante(t) {
|
|
573
|
+
this.setAttribute("variante", t);
|
|
574
|
+
}
|
|
575
|
+
get animado() {
|
|
576
|
+
const t = (this.getAttribute("animado") || this.getAttribute("animated") || "shimmer").toLowerCase();
|
|
577
|
+
return t === "pulse" || t === "pulso" ? "pulso" : t === "none" || t === "nenhum" || t === "estatico" ? "nenhum" : "shimmer";
|
|
578
|
+
}
|
|
579
|
+
set animado(t) {
|
|
580
|
+
this.setAttribute("animado", t);
|
|
581
|
+
}
|
|
582
|
+
get linhas() {
|
|
583
|
+
const t = parseInt(this.getAttribute("linhas") || this.getAttribute("lines") || this.getAttribute("count") || "1", 10);
|
|
584
|
+
return isNaN(t) || t < 1 ? 1 : Math.min(t, et);
|
|
585
|
+
}
|
|
586
|
+
set linhas(t) {
|
|
587
|
+
this.setAttribute("linhas", String(t));
|
|
588
|
+
}
|
|
589
|
+
syncState() {
|
|
590
|
+
const t = this.variante, i = this.animado, e = this.getAttribute("largura") || this.getAttribute("width"), a = this.getAttribute("altura") || this.getAttribute("height"), n = this.getAttribute("raio") || this.getAttribute("radius"), l = this.linhas;
|
|
591
|
+
this.rootElement.innerHTML = "";
|
|
592
|
+
const c = i === "pulso" ? "ui-skeleton--pulso" : i === "nenhum" ? "ui-skeleton--estatico" : "";
|
|
593
|
+
if (t === "card") {
|
|
594
|
+
const u = document.createElement("div");
|
|
595
|
+
u.className = "ui-skeleton ui-skeleton--card";
|
|
596
|
+
const m = document.createElement("div");
|
|
597
|
+
m.className = `ui-skeleton ui-skeleton__card-media ${c}`;
|
|
598
|
+
const h = document.createElement("div");
|
|
599
|
+
h.className = "ui-skeleton__card-header";
|
|
600
|
+
const f = document.createElement("div");
|
|
601
|
+
f.className = `ui-skeleton ui-skeleton__card-avatar ${c}`;
|
|
602
|
+
const E = document.createElement("div");
|
|
603
|
+
E.className = `ui-skeleton ui-skeleton__card-title ${c}`, h.appendChild(f), h.appendChild(E);
|
|
604
|
+
const w = document.createElement("div");
|
|
605
|
+
w.className = "ui-skeleton__linhas";
|
|
606
|
+
for (let C = 0; C < 2; C++) {
|
|
607
|
+
const S = document.createElement("div");
|
|
608
|
+
S.className = `ui-skeleton ui-skeleton--texto ${c}`, w.appendChild(S);
|
|
609
|
+
}
|
|
610
|
+
u.appendChild(m), u.appendChild(h), u.appendChild(w), this.rootElement.appendChild(u);
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (l > 1 && t === "texto") {
|
|
614
|
+
const u = document.createElement("div");
|
|
615
|
+
u.className = "ui-skeleton__linhas";
|
|
616
|
+
for (let m = 0; m < l; m++) {
|
|
617
|
+
const h = document.createElement("div");
|
|
618
|
+
h.className = `ui-skeleton ui-skeleton--texto ${c}`, a && (h.style.height = isNaN(Number(a)) ? a : `${a}px`), n && (h.style.borderRadius = isNaN(Number(n)) ? n : `${n}px`), u.appendChild(h);
|
|
619
|
+
}
|
|
620
|
+
e && (u.style.width = isNaN(Number(e)) ? e : `${e}px`), this.rootElement.appendChild(u);
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
const d = document.createElement("div");
|
|
624
|
+
d.className = `ui-skeleton ui-skeleton--${t} ${c}`.trim(), e && (d.style.width = isNaN(Number(e)) ? e : `${e}px`), a && (d.style.height = isNaN(Number(a)) ? a : `${a}px`), n && (d.style.borderRadius = isNaN(Number(n)) ? n : `${n}px`), this.rootElement.appendChild(d);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
class it extends R {
|
|
628
|
+
}
|
|
629
|
+
b("ui-skeleton", R);
|
|
630
|
+
b("ui-esqueleto", it);
|
|
631
|
+
export {
|
|
632
|
+
q as I,
|
|
633
|
+
L as U,
|
|
634
|
+
g as a,
|
|
635
|
+
it as b,
|
|
636
|
+
U as c,
|
|
637
|
+
G as d,
|
|
638
|
+
Z as e,
|
|
639
|
+
j as f,
|
|
640
|
+
R as g,
|
|
641
|
+
y as h,
|
|
642
|
+
P as i,
|
|
643
|
+
F as j,
|
|
644
|
+
H as k,
|
|
645
|
+
O as l,
|
|
646
|
+
A as o,
|
|
647
|
+
X as r
|
|
648
|
+
};
|