@thibezer/ui-components-kit 2.8.1 → 2.8.2
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 +22 -103
- package/README.md +8 -32
- package/dist/botao.cjs +1 -1
- package/dist/botao.js +1 -1
- package/dist/camadas.cjs +110 -114
- package/dist/camadas.js +1177 -1343
- package/dist/campo-texto.cjs +1 -1
- package/dist/campo-texto.js +1 -1
- package/dist/canvas.cjs +63 -64
- package/dist/canvas.js +3544 -4025
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/components/ui-avatar/ui-avatar.d.ts +0 -11
- package/dist/components/ui-badge/ui-badge.d.ts +0 -2
- package/dist/components/ui-barra-ferramentas/ferramentas-comum.d.ts +22 -1
- package/dist/components/ui-barra-ferramentas/tipos.d.ts +31 -0
- package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +17 -1
- package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +17 -0
- package/dist/components/ui-camadas/camadas-arraste-controles.d.ts +0 -2
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +11 -4
- package/dist/components/ui-camadas/camadas-drag-drop.d.ts +1 -13
- package/dist/components/ui-camadas/camadas-host.d.ts +0 -1
- package/dist/components/ui-camadas/camadas-mapas-base.d.ts +1 -3
- package/dist/components/ui-camadas/camadas-selecao.d.ts +0 -12
- package/dist/components/ui-camadas/ui-camadas.d.ts +5 -8
- package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +1 -2
- package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +1 -1
- package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +8 -3
- package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +106 -39
- package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +1 -3
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +1 -15
- package/dist/components/ui-checkbox/ui-checkbox.d.ts +1 -4
- package/dist/components/ui-cores/tipos.d.ts +0 -2
- package/dist/components/ui-cores/ui-controle-cores.d.ts +3 -8
- package/dist/components/ui-cores/ui-seletor-cor.d.ts +1 -3
- package/dist/components/ui-mapa/ui-mapa-linha.d.ts +5 -12
- package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +6 -15
- package/dist/components/ui-mapa/ui-mapa.d.ts +1 -14
- package/dist/components/ui-modal/modal-acessibilidade.d.ts +5 -5
- package/dist/components/ui-modal/ui-modal.d.ts +11 -1
- package/dist/components/ui-radio/radio-grupo-registry.d.ts +0 -10
- package/dist/components/ui-radio/ui-radio.d.ts +2 -9
- package/dist/components/ui-skeleton/ui-skeleton.d.ts +0 -9
- package/dist/components/ui-switch/ui-switch.d.ts +1 -3
- package/dist/components/ui-tabela/ui-tabela.d.ts +19 -1
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +1 -24
- package/dist/core/index.d.ts +0 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +18 -28
- package/dist/cores.cjs +1 -1
- package/dist/cores.js +1 -1
- package/dist/custom-elements.json +13585 -18764
- package/dist/data.cjs +1 -1
- package/dist/data.js +2 -2
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +2 -2
- package/dist/form-validacao-BIOXxt-1.js +140 -0
- package/dist/form-validacao-ytRYSF3E.cjs +1 -0
- package/dist/forms.cjs +1 -1
- package/dist/forms.js +2 -2
- package/dist/gerencigeo-canvas/canvas_interacao.d.ts +1 -0
- package/dist/gerencigeo-canvas/feature_metricas.d.ts +9 -0
- package/dist/gerencigeo-canvas/feature_popup.d.ts +0 -2
- package/dist/gerencigeo-canvas/mapa_core.d.ts +0 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +176 -179
- package/dist/mapa.cjs +16 -11
- package/dist/mapa.js +170 -242
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/register.cjs +1 -1
- package/dist/register.js +11 -11
- package/dist/svg-seguro-ChVJ2L2z.js +74 -0
- package/dist/svg-seguro-J2RM1Ssf.cjs +1 -0
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +1 -1
- package/dist/tipos-elementos.d.ts +20 -48
- package/dist/tipos-react.d.ts +0 -2
- package/dist/tipos-vue.d.ts +15 -44
- package/dist/tools.cjs +1 -1
- package/dist/tools.js +1 -1
- package/dist/ui-badge-BxT-sDmV.cjs +28 -0
- package/dist/ui-badge-C0eKBI8E.js +183 -0
- package/dist/ui-botao-BOOnP8ds.cjs +12 -0
- package/dist/ui-botao-DfqSivHl.js +165 -0
- package/dist/ui-botao-OGJV6Vfk.js +165 -0
- package/dist/ui-botao-psS1juof.cjs +12 -0
- package/dist/ui-campo-texto-Cnn2UAkS.cjs +16 -0
- package/dist/{ui-campo-texto-B_OHVGiN.js → ui-campo-texto-Uu2dJE_0.js} +51 -51
- package/dist/ui-card-B86lJXTP.cjs +20 -0
- package/dist/{ui-card-BNYCQ7g-.js → ui-card-C_o5_0cB.js} +42 -50
- package/dist/ui-controle-cores-BS0WYPdi.js +572 -0
- package/dist/ui-controle-cores-Er6ZcQ7U.cjs +111 -0
- package/dist/ui-kit.css +1 -1
- package/dist/ui-modal-CvGFGh1h.cjs +18 -0
- package/dist/{ui-modal-BkYvNP0G.js → ui-modal-DBOtSTbR.js} +140 -116
- package/dist/ui-paleta-ferramentas-CEZYcN4J.js +624 -0
- package/dist/ui-paleta-ferramentas-CU4icLl0.js +1171 -0
- package/dist/{ui-paleta-ferramentas-bDLPbiGA.cjs → ui-paleta-ferramentas-Ccmo-rB5.cjs} +7 -7
- package/dist/ui-paleta-ferramentas-DLwZHIDv.cjs +21 -0
- package/dist/{ui-paleta-ferramentas-Ksh6gMW3.js → ui-paleta-ferramentas-DNN5i6nL.js} +329 -359
- package/dist/ui-paleta-ferramentas-Dbj1kBS9.cjs +18 -0
- package/dist/ui-paleta-ferramentas-DbwdWVtT.js +1173 -0
- package/dist/ui-paleta-ferramentas-bvqxj1Yd.cjs +21 -0
- package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
- package/dist/ui-segmented-DyF5YLsV.js +418 -0
- package/dist/ui-segmented-rn9RxRGM.cjs +19 -0
- package/dist/{ui-linha-nCDh2wPm.js → ui-segmented-wUraId2e.js} +105 -200
- package/dist/ui-skeleton-DI4_9WOX.js +428 -0
- package/dist/{ui-skeleton-DiOxTBZK.cjs → ui-skeleton-SPYqku8P.cjs} +10 -10
- package/dist/{ui-skeleton-B2Rgrv8o.js → ui-skeleton-W9uwIceA.js} +191 -254
- package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
- package/dist/{ui-switch-DO1R0Ce7.js → ui-switch-BcOqOkiV.js} +128 -187
- package/dist/ui-switch-D7iPKDj-.cjs +53 -0
- package/dist/ui-tabela-propriedades-BBr5sqki.cjs +145 -0
- package/dist/{ui-tabela-propriedades-DzZlyNZ_.cjs → ui-tabela-propriedades-BecPqC-e.cjs} +10 -10
- package/dist/{ui-tabela-propriedades-D9Echt2X.js → ui-tabela-propriedades-BokvDD3b.js} +826 -845
- package/dist/ui-tabela-propriedades-Boy7I5yW.js +2412 -0
- package/dist/ui-tabela-propriedades-C-PeuW1i.cjs +141 -0
- package/dist/ui-tabela-propriedades-Df9ajC6M.js +2648 -0
- package/dist/ui-toast-Bp_NlM5G.js +156 -0
- package/dist/ui-toast-DGTZKne5.cjs +20 -0
- package/dist/zero-js-triggers-C_KrvFOQ.js +244 -0
- package/dist/zero-js-triggers-C_gtaojZ.cjs +1 -0
- package/package.json +3 -3
- package/dist/acessibilidade-CSzX-DkG.cjs +0 -1
- package/dist/acessibilidade-CUlSXc2X.js +0 -38
- package/dist/altura-controle-ukMRPckR.cjs +0 -1
- package/dist/altura-controle-vxQiXG4q.js +0 -62
- package/dist/components/ui-barra-ferramentas/paleta-atalhos.d.ts +0 -16
- package/dist/components/ui-barra-ferramentas/paleta-pressao-longa.d.ts +0 -24
- package/dist/components/ui-barra-ferramentas/ribbon-render.d.ts +0 -14
- package/dist/components/ui-barra-ferramentas/ribbon-teclado.d.ts +0 -17
- package/dist/components/ui-camadas/camadas-colecao.d.ts +0 -27
- package/dist/components/ui-camadas/camadas-drop-ops.d.ts +0 -31
- package/dist/components/ui-camadas/camadas-hierarquia.d.ts +0 -10
- package/dist/components/ui-camadas/camadas-lembranca.d.ts +0 -34
- package/dist/components/ui-camadas/camadas-render.d.ts +0 -15
- package/dist/components/ui-camadas/camadas-renomear.d.ts +0 -12
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +0 -17
- package/dist/components/ui-camadas/camadas-thumb.d.ts +0 -1
- package/dist/components/ui-canvas-cad/cad-acessibilidade.d.ts +0 -15
- package/dist/components/ui-canvas-cad/cad-evento-coordenadas.d.ts +0 -22
- package/dist/components/ui-canvas-cad/cad-feicoes-camera.d.ts +0 -26
- package/dist/components/ui-canvas-cad/cad-feicoes-consulta.d.ts +0 -21
- package/dist/components/ui-canvas-cad/cad-feicoes-dados.d.ts +0 -39
- package/dist/components/ui-canvas-cad/cad-feicoes-desenho.d.ts +0 -68
- package/dist/components/ui-canvas-cad/cad-feicoes-edicao.d.ts +0 -37
- package/dist/components/ui-canvas-cad/cad-feicoes-operacoes.d.ts +0 -48
- package/dist/components/ui-canvas-cad/cad-feicoes-ponteiro.d.ts +0 -28
- package/dist/components/ui-canvas-cad/cad-feicoes-selecao-regiao.d.ts +0 -22
- package/dist/components/ui-canvas-cad/cad-feicoes-tipos.d.ts +0 -53
- package/dist/components/ui-canvas-cad/cad-feicoes-versoes.d.ts +0 -33
- package/dist/components/ui-canvas-cad/cad-leaflet-adaptador.d.ts +0 -5
- package/dist/components/ui-canvas-cad/cad-selecao-pontos.d.ts +0 -5
- package/dist/components/ui-canvas-cad/tipos.d.ts +0 -37
- package/dist/components/ui-linha/index.d.ts +0 -1
- package/dist/components/ui-linha/ui-linha.d.ts +0 -48
- package/dist/components/ui-mapa/mapa-atributos.d.ts +0 -14
- package/dist/components/ui-mapa/mapa-basemaps.d.ts +0 -7
- package/dist/components/ui-mapa/mapa-icones.d.ts +0 -4
- package/dist/components/ui-mapa/mapa-leaflet.d.ts +0 -5
- package/dist/components/ui-mapa/mapa-vinculo-pai.d.ts +0 -22
- package/dist/components/ui-mapa/tipos.d.ts +0 -13
- package/dist/components/ui-modal/modal-foco.d.ts +0 -28
- package/dist/components/ui-tabela/tabela-estados.d.ts +0 -16
- package/dist/components/ui-tabela/tabela-rolagem.d.ts +0 -44
- package/dist/components/ui-tabela/tabela-teclado.d.ts +0 -16
- package/dist/components/ui-tooltip/tooltip-popover.d.ts +0 -7
- package/dist/components/ui-tooltip/tooltip-posicionamento.d.ts +0 -29
- package/dist/core/altura-controle.d.ts +0 -34
- package/dist/core/opcoes.d.ts +0 -9
- package/dist/core/rotulo-controle.d.ts +0 -13
- package/dist/form-validacao-BlQFxUVj.js +0 -104
- package/dist/form-validacao-DIeyQVH5.cjs +0 -1
- package/dist/gerencigeo-canvas/popup_gate.d.ts +0 -30
- package/dist/gerencigeo-canvas/zoom_opcoes.d.ts +0 -10
- package/dist/opcoes-CJYLi6kd.js +0 -12
- package/dist/opcoes-CkyDxBuQ.cjs +0 -1
- package/dist/ui-badge-BWhoGgo9.js +0 -197
- package/dist/ui-badge-SIR81R9l.cjs +0 -28
- package/dist/ui-botao-D24oXySA.cjs +0 -12
- package/dist/ui-botao-Dsj08jjw.js +0 -165
- package/dist/ui-campo-texto-DauJCde3.cjs +0 -16
- package/dist/ui-card-BrjBL-yo.cjs +0 -20
- package/dist/ui-controle-cores-DgEza3wF.js +0 -612
- package/dist/ui-controle-cores-uY__TgwW.cjs +0 -117
- package/dist/ui-linha-C6HBnsaw.cjs +0 -19
- package/dist/ui-modal-CUNbpbZ1.cjs +0 -18
- package/dist/ui-switch-D9a8XlVX.cjs +0 -53
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { L as
|
|
5
|
-
import { d as
|
|
6
|
-
import { U as
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
let t = Array.from(
|
|
10
|
-
t = t.filter((
|
|
1
|
+
var N = Object.defineProperty;
|
|
2
|
+
var q = (n, l, t) => l in n ? N(n, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[l] = t;
|
|
3
|
+
var r = (n, l, t) => q(n, typeof l != "symbol" ? l + "" : l, t);
|
|
4
|
+
import { L as C } from "./listener-bag-DQgv7OON.js";
|
|
5
|
+
import { d as h, S as g } from "./ssr-safe-5cWfJP-s.js";
|
|
6
|
+
import { U as z } from "./ui-bus-CUd99VJi.js";
|
|
7
|
+
const R = ':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}}', _ = '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 y(n, l) {
|
|
9
|
+
let t = Array.from(n.querySelectorAll(_));
|
|
10
|
+
t = t.filter((o) => {
|
|
11
11
|
try {
|
|
12
|
-
return window.getComputedStyle(
|
|
12
|
+
return window.getComputedStyle(o).display !== "none";
|
|
13
13
|
} catch {
|
|
14
14
|
return !0;
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
const i =
|
|
18
|
-
return i.forEach((
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const i = n.querySelectorAll("slot"), e = [];
|
|
18
|
+
return i.forEach((o) => {
|
|
19
|
+
o.assignedElements({ flatten: !0 }).forEach((s) => {
|
|
20
|
+
s instanceof HTMLElement && (s.matches(_) && e.push(s), e.push(...Array.from(s.querySelectorAll(_))));
|
|
21
21
|
});
|
|
22
|
-
}), [...t, ...e].filter((
|
|
22
|
+
}), [...t, ...e].filter((o) => !o.hasAttribute("disabled") && o.getAttribute("aria-hidden") !== "true");
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function M(n) {
|
|
25
25
|
if (typeof document > "u") return !0;
|
|
26
|
-
const
|
|
26
|
+
const l = Array.from(
|
|
27
27
|
document.querySelectorAll("ui-drawer[aberto], ui-drawer[open], ui-sheet[aberto], ui-sheet[open]")
|
|
28
28
|
);
|
|
29
|
-
return
|
|
29
|
+
return l[l.length - 1] === n;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
33
|
-
|
|
31
|
+
function D(n, l, t, i) {
|
|
32
|
+
if (l.length === 0) {
|
|
33
|
+
n.preventDefault();
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
const e =
|
|
37
|
-
|
|
36
|
+
const e = l[0], o = l[l.length - 1], a = t.getRootNode(), s = a == null ? void 0 : a.activeElement;
|
|
37
|
+
n.shiftKey ? (s === e || !t.contains(s) && !i.contains(s)) && (n.preventDefault(), o.focus()) : (s === o || !t.contains(s) && !i.contains(s)) && (n.preventDefault(), e.focus());
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function I() {
|
|
40
40
|
if (typeof document > "u") return;
|
|
41
41
|
document.querySelectorAll(
|
|
42
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
43
|
).length > 0 ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
44
44
|
}
|
|
45
|
-
class
|
|
45
|
+
class b extends g {
|
|
46
46
|
constructor() {
|
|
47
47
|
super();
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
r(this, "backdropElement");
|
|
49
|
+
r(this, "painelElement");
|
|
50
|
+
r(this, "tituloElement");
|
|
51
|
+
r(this, "descricaoElement");
|
|
52
|
+
r(this, "closeElement");
|
|
53
|
+
r(this, "listeners", new C());
|
|
54
|
+
r(this, "_elementoGatilho", null);
|
|
55
|
+
r(this, "_focables", []);
|
|
56
|
+
r(this, "handleSlotChange", () => {
|
|
57
57
|
this.syncState();
|
|
58
58
|
});
|
|
59
|
-
|
|
59
|
+
r(this, "handleBackdropClick", (t) => {
|
|
60
60
|
t.stopPropagation(), this.hasAttribute("estatico") || this.hasAttribute("static") || this.fechar();
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
r(this, "handleCloseClick", (t) => {
|
|
63
63
|
t.stopPropagation(), this.fechar();
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
this.aberto &&
|
|
65
|
+
r(this, "handleKeyDown", (t) => {
|
|
66
|
+
this.aberto && M(this) && (t.key === "Escape" ? this.hasAttribute("estatico") || this.hasAttribute("static") || (this.fechar(), t.stopImmediatePropagation()) : t.key === "Tab" && (this._focables = y(this.shadowRoot), D(t, this._focables, this, this.shadowRoot)));
|
|
67
67
|
});
|
|
68
68
|
const t = this.attachShadow({ mode: "open" });
|
|
69
69
|
t.innerHTML = `
|
|
70
|
-
<style>${
|
|
70
|
+
<style>${R}</style>
|
|
71
71
|
<div class="ui-drawer__backdrop" part="fundo"></div>
|
|
72
72
|
<aside class="ui-drawer__painel" part="painel" role="dialog" aria-modal="true" tabindex="-1">
|
|
73
73
|
<div class="ui-drawer__header" part="cabecalho">
|
|
@@ -109,11 +109,11 @@ class g extends v {
|
|
|
109
109
|
}), this.syncState();
|
|
110
110
|
}
|
|
111
111
|
disconnectedCallback() {
|
|
112
|
-
this.listeners.cleanup(),
|
|
112
|
+
this.listeners.cleanup(), b.atualizarScrollLock();
|
|
113
113
|
}
|
|
114
114
|
attributeChangedCallback(t, i, e) {
|
|
115
115
|
(t === "aberto" || t === "open") && e !== null && (document.activeElement && document.activeElement !== document.body && (this._elementoGatilho = document.activeElement), setTimeout(() => {
|
|
116
|
-
this._focables =
|
|
116
|
+
this._focables = y(this.shadowRoot), this._focables.length > 0 ? this._focables[0].focus() : this.painelElement.focus();
|
|
117
117
|
}, 0)), this.syncState();
|
|
118
118
|
}
|
|
119
119
|
get aberto() {
|
|
@@ -136,7 +136,7 @@ class g extends v {
|
|
|
136
136
|
composed: !0
|
|
137
137
|
})
|
|
138
138
|
), setTimeout(() => {
|
|
139
|
-
this._focables =
|
|
139
|
+
this._focables = y(this.shadowRoot), this._focables.length > 0 ? this._focables[0].focus() : this.painelElement.focus();
|
|
140
140
|
}, 0));
|
|
141
141
|
}
|
|
142
142
|
fechar() {
|
|
@@ -151,51 +151,51 @@ class g extends v {
|
|
|
151
151
|
this.aberto ? this.fechar() : this.abrir();
|
|
152
152
|
}
|
|
153
153
|
syncState() {
|
|
154
|
-
var
|
|
155
|
-
const t = this.aberto, i = this.getAttribute("titulo") || this.getAttribute("title") || "", e = this.getAttribute("descricao") || this.getAttribute("description") || "",
|
|
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",
|
|
157
|
-
const u = Array.from(((c = this.shadowRoot) == null ? void 0 : c.querySelectorAll('slot[name="rodape"], slot[name="footer"]')) || []).some((
|
|
158
|
-
|
|
154
|
+
var s, c;
|
|
155
|
+
const t = this.aberto, i = this.getAttribute("titulo") || this.getAttribute("title") || "", e = this.getAttribute("descricao") || this.getAttribute("description") || "", o = this.getAttribute("largura") || this.getAttribute("width"), a = (s = this.shadowRoot) == null ? void 0 : s.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", o ? this.style.setProperty("--ui-drawer-largura", isNaN(Number(o)) ? o : `${o}px`) : this.style.removeProperty("--ui-drawer-largura"), a) {
|
|
157
|
+
const u = Array.from(((c = this.shadowRoot) == null ? void 0 : c.querySelectorAll('slot[name="rodape"], slot[name="footer"]')) || []).some((p) => p.assignedNodes({ flatten: !0 }).some((f) => f.nodeType === Node.ELEMENT_NODE || f.textContent && f.textContent.trim() !== "")) || this.querySelector('[slot="rodape"], [slot="footer"]') !== null;
|
|
158
|
+
a.style.display = u ? "flex" : "none";
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
b.atualizarScrollLock();
|
|
161
161
|
}
|
|
162
162
|
static atualizarScrollLock() {
|
|
163
|
-
|
|
163
|
+
I();
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
class
|
|
166
|
+
class P extends b {
|
|
167
167
|
}
|
|
168
|
-
class
|
|
168
|
+
class $ extends b {
|
|
169
169
|
}
|
|
170
|
-
class
|
|
170
|
+
class B extends b {
|
|
171
171
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const
|
|
172
|
+
h("ui-drawer", b);
|
|
173
|
+
h("ui-sheet", P);
|
|
174
|
+
h("ui-painel-lateral", $);
|
|
175
|
+
h("ui-gaveta", B);
|
|
176
|
+
const O = ':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)}}', A = {
|
|
177
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
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
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
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
181
|
};
|
|
182
|
-
class
|
|
182
|
+
class S extends g {
|
|
183
183
|
constructor() {
|
|
184
184
|
super();
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
185
|
+
r(this, "alertaElement");
|
|
186
|
+
r(this, "iconeElement");
|
|
187
|
+
r(this, "tituloElement");
|
|
188
|
+
r(this, "mensagemElement");
|
|
189
|
+
r(this, "mensagemTextoElement");
|
|
190
|
+
r(this, "closeElement");
|
|
191
|
+
r(this, "acoesElement");
|
|
192
|
+
r(this, "botaoAcaoElement");
|
|
193
|
+
r(this, "progressoContainer");
|
|
194
|
+
r(this, "progressoBarra");
|
|
195
|
+
r(this, "listeners", new C());
|
|
196
196
|
const t = this.attachShadow({ mode: "open" });
|
|
197
197
|
t.innerHTML = `
|
|
198
|
-
<style>${
|
|
198
|
+
<style>${O}</style>
|
|
199
199
|
<div class="ui-alerta" part="base" role="alert">
|
|
200
200
|
<span class="ui-alerta__icone" part="icone"></span>
|
|
201
201
|
<div class="ui-alerta__conteudo" part="conteudo">
|
|
@@ -245,42 +245,42 @@ class L extends v {
|
|
|
245
245
|
), this.remove();
|
|
246
246
|
}
|
|
247
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"),
|
|
248
|
+
const t = this.getAttribute("tipo") || this.getAttribute("variante") || this.getAttribute("variant") || "info", i = this.getAttribute("titulo") || this.getAttribute("title"), e = this.getAttribute("mensagem"), o = this.hasAttribute("fechavel") || this.hasAttribute("dismissible");
|
|
249
249
|
this.alertaElement.className = `ui-alerta ui-alerta--${t}`;
|
|
250
|
-
const
|
|
251
|
-
this.iconeElement.innerHTML =
|
|
250
|
+
const a = A[t] || A.info;
|
|
251
|
+
this.iconeElement.innerHTML = a, 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 = ""), o ? this.closeElement.style.display = "block" : this.closeElement.style.display = "none";
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
|
|
255
|
-
class
|
|
254
|
+
h("ui-alerta", S);
|
|
255
|
+
class x extends S {
|
|
256
256
|
constructor() {
|
|
257
257
|
super(...arguments);
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
var i, e,
|
|
258
|
+
r(this, "timerId", null);
|
|
259
|
+
r(this, "tempoRestante", 4e3);
|
|
260
|
+
r(this, "inicioTimestamp", 0);
|
|
261
|
+
r(this, "isPausado", !1);
|
|
262
|
+
r(this, "acaoConfig");
|
|
263
|
+
r(this, "containerRef", null);
|
|
264
|
+
r(this, "handleAcaoClick", (t) => {
|
|
265
|
+
var i, e, o;
|
|
266
266
|
t.stopPropagation(), (i = this.acaoConfig) != null && i.onClick && this.acaoConfig.onClick(t), this.dispatchEvent(
|
|
267
267
|
new CustomEvent("ui-toast-acao", {
|
|
268
268
|
detail: {
|
|
269
269
|
rotulo: (e = this.acaoConfig) == null ? void 0 : e.rotulo,
|
|
270
|
-
tipo: (
|
|
270
|
+
tipo: (o = this.acaoConfig) == null ? void 0 : o.tipo
|
|
271
271
|
},
|
|
272
272
|
bubbles: !0,
|
|
273
273
|
composed: !0
|
|
274
274
|
})
|
|
275
275
|
), this.fechar();
|
|
276
276
|
});
|
|
277
|
-
|
|
277
|
+
r(this, "pausarTimer", () => {
|
|
278
278
|
if (this.isPausado || this.tempoRestante <= 0) return;
|
|
279
279
|
this.isPausado = !0, this.timerId && (clearTimeout(this.timerId), this.timerId = null);
|
|
280
280
|
const t = Date.now() - this.inicioTimestamp;
|
|
281
281
|
this.tempoRestante = Math.max(0, this.tempoRestante - t), this.progressoBarra.style.animationPlayState = "paused";
|
|
282
282
|
});
|
|
283
|
-
|
|
283
|
+
r(this, "retomarTimer", () => {
|
|
284
284
|
!this.isPausado || this.tempoRestante <= 0 || (this.isPausado = !1, this.progressoBarra.style.animationPlayState = "running", this.iniciarTimer(Math.max(this.tempoRestante, 300)));
|
|
285
285
|
});
|
|
286
286
|
}
|
|
@@ -315,114 +315,62 @@ class y extends L {
|
|
|
315
315
|
static notificar(t) {
|
|
316
316
|
if (typeof document > "u") return null;
|
|
317
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),
|
|
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), x.obterContainer(i).appendChild(e), e;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
|
|
322
|
-
function
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
h("ui-toast", x);
|
|
322
|
+
function F() {
|
|
323
|
+
z.registrarProvedorToast((n) => {
|
|
324
|
+
x.notificar(n);
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
-
|
|
328
|
-
const
|
|
329
|
-
|
|
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 v {
|
|
327
|
+
F();
|
|
328
|
+
const H = ":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)}}", j = 120;
|
|
329
|
+
class L extends g {
|
|
376
330
|
constructor() {
|
|
377
331
|
super();
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
/** Ouvintes globais (documento/janela): valem só enquanto o balão está aberto. */
|
|
383
|
-
o(this, "ouvintesAberto", new _());
|
|
384
|
-
o(this, "_timerOcultar", null);
|
|
385
|
-
o(this, "_quadro", null);
|
|
332
|
+
r(this, "containerElement");
|
|
333
|
+
r(this, "bubbleElement");
|
|
334
|
+
r(this, "_posicionamentoAtivo", !1);
|
|
335
|
+
r(this, "_timerOcultar", null);
|
|
386
336
|
/** Gatilho que recebeu `aria-description` deste tooltip (para remover depois). */
|
|
387
|
-
|
|
388
|
-
|
|
337
|
+
r(this, "_gatilhoDescrito", null);
|
|
338
|
+
r(this, "posicionarBubble", () => {
|
|
389
339
|
if (!this.aberto) return;
|
|
390
|
-
const t =
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
)
|
|
396
|
-
this.bubbleElement.style.top = `${i}px`, this.bubbleElement.style.left = `${e}px`;
|
|
340
|
+
const t = this.getBoundingClientRect(), i = this.bubbleElement.getBoundingClientRect(), e = this.getAttribute("posicao") || this.getAttribute("position") || "topo";
|
|
341
|
+
let o = "topo";
|
|
342
|
+
["topo", "top"].includes(e) ? o = "topo" : ["baixo", "bottom"].includes(e) ? o = "baixo" : ["esquerda", "left"].includes(e) ? o = "esquerda" : ["direita", "right"].includes(e) && (o = "direita");
|
|
343
|
+
let a = 0, s = 0;
|
|
344
|
+
const c = 8;
|
|
345
|
+
o === "topo" ? (a = t.top - i.height - c, s = t.left + t.width / 2 - i.width / 2) : o === "baixo" ? (a = t.bottom + c, s = t.left + t.width / 2 - i.width / 2) : o === "esquerda" ? (a = t.top + t.height / 2 - i.height / 2, s = t.left - i.width - c) : o === "direita" && (a = t.top + t.height / 2 - i.height / 2, s = t.right + c), s = Math.max(8, Math.min(s, window.innerWidth - i.width - 8)), a = Math.max(8, Math.min(a, window.innerHeight - i.height - 8)), this.bubbleElement.style.top = `${Math.round(a)}px`, this.bubbleElement.style.left = `${Math.round(s)}px`;
|
|
397
346
|
});
|
|
398
|
-
|
|
399
|
-
const t = this.
|
|
347
|
+
r(this, "handleMouseEnter", () => {
|
|
348
|
+
const t = this.getAttribute("gatilho") || this.getAttribute("trigger") || "hover";
|
|
400
349
|
(t === "hover" || t === "passar-mouse") && (this.cancelarOcultar(), this.mostrar());
|
|
401
350
|
});
|
|
402
|
-
|
|
403
|
-
const t = this.
|
|
351
|
+
r(this, "handleMouseLeave", () => {
|
|
352
|
+
const t = this.getAttribute("gatilho") || this.getAttribute("trigger") || "hover";
|
|
404
353
|
(t === "hover" || t === "passar-mouse") && (this.cancelarOcultar(), this._timerOcultar = setTimeout(() => {
|
|
405
354
|
this._timerOcultar = null, this.ocultar();
|
|
406
|
-
},
|
|
355
|
+
}, j));
|
|
407
356
|
});
|
|
408
357
|
/**
|
|
409
358
|
* Escape fecha o tooltip sem mover o foco (WCAG 1.4.13). Ouvido na captura e interrompido,
|
|
410
359
|
* para que dentro de um modal o primeiro Escape feche só o tooltip.
|
|
411
360
|
*/
|
|
412
|
-
|
|
361
|
+
r(this, "handleEscape", (t) => {
|
|
413
362
|
t.key !== "Escape" || !this.aberto || (t.stopPropagation(), this.cancelarOcultar(), this.ocultar());
|
|
414
363
|
});
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
(i === "clique" || i === "click" || t) && (this.aberto = !this.aberto);
|
|
364
|
+
r(this, "handleClick", (t) => {
|
|
365
|
+
const i = this.getAttribute("gatilho") || this.getAttribute("trigger") || "hover", e = window.matchMedia("(pointer: coarse)").matches;
|
|
366
|
+
(i === "clique" || i === "click" || e) && (t.stopPropagation(), this.aberto = !this.aberto);
|
|
419
367
|
});
|
|
420
|
-
|
|
368
|
+
r(this, "handleClickOutside", (t) => {
|
|
421
369
|
t.composedPath().includes(this) || this.ocultar();
|
|
422
370
|
});
|
|
423
371
|
const t = this.attachShadow({ mode: "open" });
|
|
424
372
|
t.innerHTML = `
|
|
425
|
-
<style>${
|
|
373
|
+
<style>${H}</style>
|
|
426
374
|
<div class="ui-tooltip ui-tooltip--topo">
|
|
427
375
|
<slot></slot>
|
|
428
376
|
<div class="ui-tooltip__bubble" part="balao" role="tooltip" popover="manual">
|
|
@@ -447,10 +395,10 @@ class P extends v {
|
|
|
447
395
|
];
|
|
448
396
|
}
|
|
449
397
|
connectedCallback() {
|
|
450
|
-
this.
|
|
398
|
+
this.addEventListener("mouseenter", this.handleMouseEnter), this.addEventListener("mouseleave", this.handleMouseLeave), this.addEventListener("focusin", this.handleMouseEnter), this.addEventListener("focusout", this.handleMouseLeave), this.addEventListener("click", this.handleClick), this.syncState();
|
|
451
399
|
}
|
|
452
400
|
disconnectedCallback() {
|
|
453
|
-
this.
|
|
401
|
+
this.removeEventListener("mouseenter", this.handleMouseEnter), this.removeEventListener("mouseleave", this.handleMouseLeave), this.removeEventListener("focusin", this.handleMouseEnter), this.removeEventListener("focusout", this.handleMouseLeave), this.removeEventListener("click", this.handleClick), document.removeEventListener("click", this.handleClickOutside), document.removeEventListener("keydown", this.handleEscape, !0), this.cancelarOcultar(), this.removerDescricao(), this._posicionamentoAtivo && (this._posicionamentoAtivo = !1, window.removeEventListener("scroll", this.posicionarBubble, { capture: !0 }), window.removeEventListener("resize", this.posicionarBubble)), this.ocultar();
|
|
454
402
|
}
|
|
455
403
|
attributeChangedCallback(t, i, e) {
|
|
456
404
|
this.syncState();
|
|
@@ -473,24 +421,27 @@ class P extends v {
|
|
|
473
421
|
ocultar() {
|
|
474
422
|
this.aberto = !1;
|
|
475
423
|
}
|
|
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
424
|
syncState() {
|
|
483
|
-
var
|
|
484
|
-
const t = this.aberto
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
425
|
+
var s;
|
|
426
|
+
const t = this.aberto, i = this.getAttribute("posicao") || this.getAttribute("position") || "topo", e = this.getAttribute("texto") || this.getAttribute("text") || "", o = (s = this.shadowRoot) == null ? void 0 : s.querySelector(".ui-tooltip__texto");
|
|
427
|
+
let a = "topo";
|
|
428
|
+
if (["topo", "top"].includes(i) ? a = "topo" : ["baixo", "bottom"].includes(i) ? a = "baixo" : ["esquerda", "left"].includes(i) ? a = "esquerda" : ["direita", "right"].includes(i) && (a = "direita"), this.containerElement.className = `ui-tooltip ui-tooltip--${a}`, o && (e ? (o.textContent = e, o.style.display = "inline") : o.style.display = "none"), this.sincronizarDescricao(), t) {
|
|
429
|
+
if (document.addEventListener("click", this.handleClickOutside), document.addEventListener("keydown", this.handleEscape, !0), typeof this.bubbleElement.showPopover == "function")
|
|
430
|
+
try {
|
|
431
|
+
this.bubbleElement.showPopover();
|
|
432
|
+
} catch {
|
|
433
|
+
}
|
|
434
|
+
this.containerElement.classList.add("ui-tooltip--visivel"), requestAnimationFrame(() => {
|
|
435
|
+
this.posicionarBubble();
|
|
436
|
+
}), this._posicionamentoAtivo || (this._posicionamentoAtivo = !0, window.addEventListener("scroll", this.posicionarBubble, { capture: !0, passive: !0 }), window.addEventListener("resize", this.posicionarBubble, { passive: !0 }));
|
|
437
|
+
} else {
|
|
438
|
+
if (document.removeEventListener("click", this.handleClickOutside), document.removeEventListener("keydown", this.handleEscape, !0), typeof this.bubbleElement.hidePopover == "function")
|
|
439
|
+
try {
|
|
440
|
+
this.bubbleElement.hidePopover();
|
|
441
|
+
} catch {
|
|
442
|
+
}
|
|
443
|
+
this.containerElement.classList.remove("ui-tooltip--visivel"), this._posicionamentoAtivo && (this._posicionamentoAtivo = !1, window.removeEventListener("scroll", this.posicionarBubble, { capture: !0 }), window.removeEventListener("resize", this.posicionarBubble));
|
|
444
|
+
}
|
|
494
445
|
}
|
|
495
446
|
cancelarOcultar() {
|
|
496
447
|
this._timerOcultar && (clearTimeout(this._timerOcultar), this._timerOcultar = null);
|
|
@@ -500,12 +451,12 @@ class P extends v {
|
|
|
500
451
|
* O texto é exposto como `aria-description` no gatilho, sem sobrescrever uma descrição do consumidor.
|
|
501
452
|
*/
|
|
502
453
|
sincronizarDescricao() {
|
|
503
|
-
var
|
|
454
|
+
var o;
|
|
504
455
|
if (!this.isConnected) {
|
|
505
456
|
this.removerDescricao();
|
|
506
457
|
return;
|
|
507
458
|
}
|
|
508
|
-
const t = Array.from(this.children).find((
|
|
459
|
+
const t = Array.from(this.children).find((a) => !a.hasAttribute("slot")), i = (this.getAttribute("texto") || this.getAttribute("text") || ((o = this.querySelector('[slot="conteudo"]')) == null ? void 0 : o.textContent) || "").replace(/\s+/g, " ").trim();
|
|
509
460
|
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
461
|
}
|
|
511
462
|
removerDescricao() {
|
|
@@ -513,23 +464,19 @@ class P extends v {
|
|
|
513
464
|
(t = this._gatilhoDescrito) == null || t.removeAttribute("aria-description"), this._gatilhoDescrito = null;
|
|
514
465
|
}
|
|
515
466
|
}
|
|
516
|
-
class
|
|
467
|
+
class U extends L {
|
|
517
468
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
class
|
|
469
|
+
h("ui-tooltip", L);
|
|
470
|
+
h("ui-popover", U);
|
|
471
|
+
const Y = ":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}}";
|
|
472
|
+
class T extends g {
|
|
522
473
|
constructor() {
|
|
523
474
|
super();
|
|
524
|
-
|
|
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);
|
|
475
|
+
r(this, "rootElement");
|
|
529
476
|
const t = this.attachShadow({ mode: "open" });
|
|
530
477
|
t.innerHTML = `
|
|
531
|
-
<style>${
|
|
532
|
-
<div class="ui-skeleton-container"></div>
|
|
478
|
+
<style>${Y}</style>
|
|
479
|
+
<div class="ui-skeleton-container" role="status" aria-label="Carregando..."></div>
|
|
533
480
|
`, this.rootElement = t.querySelector(".ui-skeleton-container");
|
|
534
481
|
}
|
|
535
482
|
static get observedAttributes() {
|
|
@@ -546,24 +493,14 @@ class R extends v {
|
|
|
546
493
|
"lines",
|
|
547
494
|
"count",
|
|
548
495
|
"animado",
|
|
549
|
-
"animated"
|
|
550
|
-
"aria-label"
|
|
496
|
+
"animated"
|
|
551
497
|
];
|
|
552
498
|
}
|
|
553
499
|
connectedCallback() {
|
|
554
|
-
this.
|
|
500
|
+
this.hasAttribute("aria-hidden") || this.setAttribute("aria-hidden", "true"), this.syncState();
|
|
555
501
|
}
|
|
556
502
|
attributeChangedCallback(t, i, e) {
|
|
557
|
-
this.
|
|
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;
|
|
503
|
+
this.syncState();
|
|
567
504
|
}
|
|
568
505
|
get variante() {
|
|
569
506
|
const t = (this.getAttribute("variante") || this.getAttribute("variant") || "texto").toLowerCase();
|
|
@@ -581,68 +518,68 @@ class R extends v {
|
|
|
581
518
|
}
|
|
582
519
|
get linhas() {
|
|
583
520
|
const t = parseInt(this.getAttribute("linhas") || this.getAttribute("lines") || this.getAttribute("count") || "1", 10);
|
|
584
|
-
return isNaN(t) || t < 1 ? 1 :
|
|
521
|
+
return isNaN(t) || t < 1 ? 1 : t;
|
|
585
522
|
}
|
|
586
523
|
set linhas(t) {
|
|
587
524
|
this.setAttribute("linhas", String(t));
|
|
588
525
|
}
|
|
589
526
|
syncState() {
|
|
590
|
-
const t = this.variante, i = this.animado, e = this.getAttribute("largura") || this.getAttribute("width"),
|
|
527
|
+
const t = this.variante, i = this.animado, e = this.getAttribute("largura") || this.getAttribute("width"), o = this.getAttribute("altura") || this.getAttribute("height"), a = this.getAttribute("raio") || this.getAttribute("radius"), s = this.linhas;
|
|
591
528
|
this.rootElement.innerHTML = "";
|
|
592
529
|
const c = i === "pulso" ? "ui-skeleton--pulso" : i === "nenhum" ? "ui-skeleton--estatico" : "";
|
|
593
530
|
if (t === "card") {
|
|
594
531
|
const u = document.createElement("div");
|
|
595
532
|
u.className = "ui-skeleton ui-skeleton--card";
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
const
|
|
599
|
-
|
|
533
|
+
const p = document.createElement("div");
|
|
534
|
+
p.className = `ui-skeleton ui-skeleton__card-media ${c}`;
|
|
535
|
+
const d = document.createElement("div");
|
|
536
|
+
d.className = "ui-skeleton__card-header";
|
|
600
537
|
const f = document.createElement("div");
|
|
601
538
|
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
539
|
const w = document.createElement("div");
|
|
605
|
-
w.className =
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
540
|
+
w.className = `ui-skeleton ui-skeleton__card-title ${c}`, d.appendChild(f), d.appendChild(w);
|
|
541
|
+
const v = document.createElement("div");
|
|
542
|
+
v.className = "ui-skeleton__linhas";
|
|
543
|
+
for (let k = 0; k < 2; k++) {
|
|
544
|
+
const E = document.createElement("div");
|
|
545
|
+
E.className = `ui-skeleton ui-skeleton--texto ${c}`, v.appendChild(E);
|
|
609
546
|
}
|
|
610
|
-
u.appendChild(
|
|
547
|
+
u.appendChild(p), u.appendChild(d), u.appendChild(v), this.rootElement.appendChild(u);
|
|
611
548
|
return;
|
|
612
549
|
}
|
|
613
|
-
if (
|
|
550
|
+
if (s > 1 && t === "texto") {
|
|
614
551
|
const u = document.createElement("div");
|
|
615
552
|
u.className = "ui-skeleton__linhas";
|
|
616
|
-
for (let
|
|
617
|
-
const
|
|
618
|
-
|
|
553
|
+
for (let p = 0; p < s; p++) {
|
|
554
|
+
const d = document.createElement("div");
|
|
555
|
+
d.className = `ui-skeleton ui-skeleton--texto ${c}`, o && (d.style.height = isNaN(Number(o)) ? o : `${o}px`), a && (d.style.borderRadius = isNaN(Number(a)) ? a : `${a}px`), u.appendChild(d);
|
|
619
556
|
}
|
|
620
557
|
e && (u.style.width = isNaN(Number(e)) ? e : `${e}px`), this.rootElement.appendChild(u);
|
|
621
558
|
return;
|
|
622
559
|
}
|
|
623
|
-
const
|
|
624
|
-
|
|
560
|
+
const m = document.createElement("div");
|
|
561
|
+
m.className = `ui-skeleton ui-skeleton--${t} ${c}`.trim(), e && (m.style.width = isNaN(Number(e)) ? e : `${e}px`), o && (m.style.height = isNaN(Number(o)) ? o : `${o}px`), a && (m.style.borderRadius = isNaN(Number(a)) ? a : `${a}px`), this.rootElement.appendChild(m);
|
|
625
562
|
}
|
|
626
563
|
}
|
|
627
|
-
class
|
|
564
|
+
class G extends T {
|
|
628
565
|
}
|
|
629
|
-
|
|
630
|
-
|
|
566
|
+
h("ui-skeleton", T);
|
|
567
|
+
h("ui-esqueleto", G);
|
|
631
568
|
export {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
569
|
+
A as I,
|
|
570
|
+
S as U,
|
|
571
|
+
b as a,
|
|
572
|
+
G as b,
|
|
573
|
+
B as c,
|
|
574
|
+
$ as d,
|
|
575
|
+
U as e,
|
|
576
|
+
P as f,
|
|
577
|
+
T as g,
|
|
578
|
+
x as h,
|
|
579
|
+
L as i,
|
|
580
|
+
I as j,
|
|
581
|
+
D as k,
|
|
582
|
+
M as l,
|
|
583
|
+
y as o,
|
|
584
|
+
F as r
|
|
648
585
|
};
|