@thibezer/ui-components-kit 2.24.1 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -1
- package/dist/botao.cjs +12 -1
- package/dist/botao.js +162 -3
- package/dist/camadas.cjs +311 -1
- package/dist/camadas.js +3244 -148
- package/dist/campo-texto.cjs +16 -1
- package/dist/campo-texto.js +308 -7
- package/dist/canvas.cjs +22 -22
- package/dist/canvas.js +230 -233
- package/dist/card.cjs +20 -1
- package/dist/card.js +145 -2
- package/dist/components/ui-canvas-prancha/index.d.ts +1 -1
- package/dist/components/ui-canvas-prancha/prancha-teclado.d.ts +26 -0
- package/dist/components/ui-canvas-prancha/ui-canvas-prancha-base.d.ts +9 -0
- package/dist/components/ui-canvas-prancha/ui-canvas-prancha.d.ts +2 -2
- package/dist/components/ui-editor-prancha/editor-barra.d.ts +19 -0
- package/dist/components/ui-editor-prancha/editor-modos.d.ts +35 -0
- package/dist/components/ui-editor-prancha/editor-tipos.d.ts +4 -0
- package/dist/components/ui-editor-prancha/index.d.ts +1 -0
- package/dist/components/ui-editor-prancha/ui-editor-prancha.d.ts +63 -7
- package/dist/core/alvo-digitavel.d.ts +3 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +43 -54
- package/dist/{cores-utils-BrdynxRd.js → cores-utils-DMyqWvZh.js} +2 -2
- package/dist/cores.cjs +32 -1
- package/dist/cores.js +300 -13
- package/dist/custom-elements.json +11945 -11071
- package/dist/data.cjs +28 -1
- package/dist/data.js +286 -99
- package/dist/{feature_caixa-2Sxv3tGa.js → feature_caixa-BVc5LenS.js} +42 -42
- package/dist/{feature_desenho-BVHivWIB.js → feature_desenho-CC8Mp5Gp.js} +2 -2
- package/dist/feedback.cjs +52 -1
- package/dist/feedback.js +655 -25
- package/dist/forms.cjs +66 -1
- package/dist/forms.js +1216 -39
- package/dist/{geometria-px-DUs5FgLE.js → geometria-px-DHMPUsxC.js} +47 -47
- package/dist/index.cjs +67 -1
- package/dist/index.js +1476 -274
- package/dist/kit-base-BmkPi5Rz.cjs +2 -0
- package/dist/kit-base-CBXA66aM.js +1084 -0
- package/dist/mapa.cjs +5 -5
- package/dist/mapa.js +16 -17
- package/dist/modal.cjs +18 -1
- package/dist/modal.js +235 -29
- package/dist/motor.js +49 -49
- package/dist/prancha-nucleo.cjs +3 -1
- package/dist/prancha-nucleo.js +3120 -277
- package/dist/prancha.cjs +38 -1
- package/dist/prancha.js +3470 -228
- package/dist/register.cjs +1 -1
- package/dist/register.js +3 -20
- package/dist/seletor-mapa-base.cjs +13 -13
- package/dist/seletor-mapa-base.js +3 -5
- package/dist/tabela.cjs +142 -1
- package/dist/tabela.js +3773 -92
- package/dist/tipos-elementos.d.ts +7 -3
- package/dist/tipos-vue.d.ts +6 -3
- package/dist/tools.cjs +16 -1
- package/dist/tools.js +1564 -26
- package/dist/{ui-seletor-cor-Cd8jkzXG.js → ui-seletor-cor-CPjA9vhZ.js} +8 -9
- package/dist/ui-seletor-cor-D_ifitEN.cjs +83 -0
- package/dist/utils-ClVgqVyJ.cjs +1 -0
- package/dist/utils-DrHoxxmf.js +83 -0
- package/package.json +43 -2
- 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/alvo-digitavel-CzCvNVQ3.js +0 -23
- package/dist/alvo-digitavel-DbH0hYFf.cjs +0 -1
- package/dist/degrade-CIxvOTUv.cjs +0 -1
- package/dist/degrade-gDa5sW__.js +0 -119
- package/dist/feature_caixa-CnYPKVFS.cjs +0 -1
- package/dist/feature_caixa-DCs9ZeSk.js +0 -1038
- package/dist/feature_historico-BAIYk1Me.cjs +0 -3
- package/dist/feature_historico-C4h9y5fu.js +0 -3039
- package/dist/form-atalhos-7JTYvumA.cjs +0 -1
- package/dist/form-atalhos-DDTlpgaB.js +0 -203
- package/dist/form-erros-CwPz7Jr4.cjs +0 -1
- package/dist/form-erros-DT5HklfD.js +0 -184
- package/dist/form-submissao-C-SPRKgT.js +0 -61
- package/dist/form-submissao-DxKO5MHI.cjs +0 -1
- package/dist/form-validacao-BlQFxUVj.js +0 -104
- package/dist/form-validacao-DIeyQVH5.cjs +0 -1
- package/dist/geometria-px-DKrWq_XY.js +0 -639
- package/dist/leaflet-CEPcxGWV.cjs +0 -1
- package/dist/leaflet-DOq10gfg.js +0 -84
- package/dist/leaflet-loader-94z5VsdY.cjs +0 -2
- package/dist/leaflet-loader-Cjcdgj5R.js +0 -21
- package/dist/listener-bag-D5omxZ9h.cjs +0 -1
- package/dist/listener-bag-DQgv7OON.js +0 -34
- package/dist/motor-By2te6PZ.js +0 -1400
- package/dist/motor-CkMxd378.cjs +0 -1
- package/dist/opcoes-CupvWVIm.js +0 -24
- package/dist/opcoes-vdAUY5OI.cjs +0 -1
- package/dist/parts-CaoQiCfI.js +0 -7
- package/dist/parts-vQa2873h.cjs +0 -1
- package/dist/prancha-paleta-BZ-9QDgh.js +0 -5276
- package/dist/prancha-paleta-Bb24vP71.cjs +0 -17
- package/dist/ssr-safe-5cWfJP-s.js +0 -10
- package/dist/ssr-safe-CiHD1adl.cjs +0 -1
- package/dist/svg-seguro-ChVJ2L2z.js +0 -74
- package/dist/svg-seguro-J2RM1Ssf.cjs +0 -1
- package/dist/ui-badge-DE58YSBY.cjs +0 -28
- package/dist/ui-badge-KgmI3jOD.js +0 -201
- package/dist/ui-botao-Dz8YvmiA.cjs +0 -12
- package/dist/ui-botao-zLkcMMyP.js +0 -168
- package/dist/ui-bus-CUd99VJi.js +0 -177
- package/dist/ui-bus-XqBLlTYQ.cjs +0 -1
- package/dist/ui-camadas-DoHPnbQm.js +0 -3133
- package/dist/ui-camadas-Vx7wYD4D.cjs +0 -311
- package/dist/ui-campo-texto-Dliyt9qr.cjs +0 -16
- package/dist/ui-campo-texto-btevggO3.js +0 -379
- package/dist/ui-card-7IEYbCN0.js +0 -150
- package/dist/ui-card-Bx8EyzYY.cjs +0 -20
- package/dist/ui-card-C-EJoKnm.js +0 -150
- package/dist/ui-card-DFnRp9bl.js +0 -146
- package/dist/ui-card-DrWVJQKw.cjs +0 -20
- package/dist/ui-card-DsIjHMmG.cjs +0 -20
- package/dist/ui-controle-cores-B1w_Yl69.cjs +0 -32
- package/dist/ui-controle-cores-BRjMvmMn.js +0 -291
- package/dist/ui-controle-cores-BcH9k2Fa.js +0 -292
- package/dist/ui-controle-cores-CvSTP6gJ.cjs +0 -32
- package/dist/ui-editor-prancha-CIngI6yI.js +0 -2886
- package/dist/ui-editor-prancha-DorSe6sC.cjs +0 -31
- package/dist/ui-linha-2kY7TNUJ.cjs +0 -38
- package/dist/ui-linha-B4mBRm1x.cjs +0 -61
- package/dist/ui-linha-DTEIIww4.js +0 -1167
- package/dist/ui-linha-KFF86FW5.js +0 -752
- package/dist/ui-modal-BrXzVZ65.js +0 -216
- package/dist/ui-modal-lARKzEVZ.cjs +0 -18
- package/dist/ui-paleta-ferramentas-Bu6JaT0s.js +0 -1245
- package/dist/ui-paleta-ferramentas-D3Jhwt26.cjs +0 -21
- package/dist/ui-paleta-ferramentas-DebHYiwd.js +0 -1615
- package/dist/ui-paleta-ferramentas-Dgejtluh.js +0 -1423
- package/dist/ui-paleta-ferramentas-hzyo8wBt.cjs +0 -22
- package/dist/ui-paleta-ferramentas-jWuICjW8.cjs +0 -22
- package/dist/ui-seletor-cor-0RLjcME6.cjs +0 -83
- package/dist/ui-seletor-cor-CMuuW-Ym.cjs +0 -83
- package/dist/ui-seletor-cor-DFIQ1sin.js +0 -405
- package/dist/ui-skeleton-BLEV6h3k.js +0 -653
- package/dist/ui-skeleton-B_XTaGrX.cjs +0 -52
- package/dist/ui-switch-BXIDwC-Y.cjs +0 -66
- package/dist/ui-switch-Ctxk-jKS.js +0 -1212
- package/dist/ui-tabela-CXxqbwXv.cjs +0 -7
- package/dist/ui-tabela-Cd0vOwnT.js +0 -1459
- package/dist/ui-tabela-propriedades-C5cIF5ES.js +0 -3779
- package/dist/ui-tabela-propriedades-CJyo568n.js +0 -3517
- package/dist/ui-tabela-propriedades-D96Djx-q.cjs +0 -136
- package/dist/ui-tabela-propriedades-Wa34hfIr.cjs +0 -142
- package/dist/ui-tabela-propriedades-ahQhQauu.js +0 -2329
- package/dist/ui-tabela-propriedades-w9JWhjHy.cjs +0 -142
- package/dist/zero-js-triggers-CJT988bR.js +0 -83
- package/dist/zero-js-triggers-CgM9IIQB.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,282 +1,1484 @@
|
|
|
1
|
+
var Q = Object.defineProperty;
|
|
2
|
+
var Y = (i, o, e) => o in i ? Q(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
|
|
3
|
+
var s = (i, o, e) => Y(i, typeof o != "symbol" ? o + "" : o, e);
|
|
1
4
|
/* empty css */
|
|
2
|
-
import { U as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { U as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
import { S as C, A as U, e as A, b as w, f as E, g as q, d as f, F as H, L as j, h as ee, j as P, n as te, a as ae } from "./kit-base-CBXA66aM.js";
|
|
6
|
+
import { C as Qe, P as Ye, k as et, U as tt, c as at, m as it, p as ot, q as rt, r as nt, s as st, t as lt, u as ct, v as dt, i as ut, w as ht, x as mt, y as pt, z as vt, B as gt, D as bt, o as ft, E as xt, G as _t, H as At, I as yt, J as Et } from "./kit-base-CBXA66aM.js";
|
|
7
|
+
import { ATRIBUTOS_OBSERVADOS_CAMPO_TEXTO as Ct, UICampoTexto as kt, UIInput as St, criarTemplateCampoTexto as It, sincronizarFeedbackErro as zt, sincronizarIconeSenha as Tt, sincronizarLabelEPlaceholder as Dt } from "./campo-texto.js";
|
|
8
|
+
import { ATRIBUTOS_OBSERVADOS_LISTA_FLUTUANTE as Pt, ListaFlutuantePosicionamento as Ot, ListaFlutuanteTeclado as Lt, RadioGrupoRegistry as Ut, UIAreaTexto as qt, UICheckbox as jt, UIListaFlutuante as Nt, UIRadio as Rt, UISelect as Ft, UISwitch as Bt, UITextarea as Vt, UIToggle as $t, atualizarEstadoSelecaoLista as Ht, calcularContador as Gt, criarTemplateListaFlutuante as Xt, renderizarItensLista as Kt } from "./forms.js";
|
|
9
|
+
import { CamadasDragDropManager as Jt, ICONES as Wt, LIMITE_FEICOES_POR_CAMADA as Qt, MAPAS_BASE_PADRAO as Yt, UICamadas as ea, UILayerPanel as ta, UIPainelCamadas as aa, calcularAreaAnelSimples as ia, calcularAreaPoligono as oa, calcularComprimentoLinha as ra, calcularDistanciaPontos as na, calcularSelecaoFeicao as sa, carregarEstadoPersistido as la, construirHierarquiaCamadas as ca, converterCamadaItemParaCanvasLayer as da, converterCanvasLayerParaCamadaItem as ua, converterFeicaoParaItem as ha, escapeHtml as ma, filtrarCamadasPorBusca as pa, filtrarFeicoesPorBusca as va, formatarMetricaFeicoes as ga, formatarOpcoesCamadasHierarquicas as ba, gerarChaveStorage as fa, limparEstadoPersistido as xa, montarEstadoPersistido as _a, nomeDoMapaBase as Aa, normalizarEstadoPersistido as ya, obterIdsVisiveisFeicoes as Ea, reidratarCamadasComOverrides as wa, removerSelecoesInvalidas as Ca, renderizarArvoreCamadas as ka, renderizarGridMapasBase as Sa, renderizarRodapeAcoes as Ia, renderizarThumbGeometria as za, rotuloRodape as Ta, salvarEstadoPersistido as Da, snapshotCamada as Ma } from "./camadas.js";
|
|
10
|
+
import { GerenciadorValoresPropriedades as Oa, LembrancaCategoriasPropriedades as La, TEXTOS_PADRAO as Ua, TEXTO_MISTO_PADRAO as qa, TabelaOrquestradorDados as ja, TabelaRemotaController as Na, TabelaSelecaoController as Ra, UIPainelPropriedades as Fa, UIPropriedades as Ba, UITabela as Va, UITabelaPropriedades as $a, VALOR_MISTO as Ha, abertoPadraoDaCategoria as Ga, abrirPopoverRedimensionamento as Xa, alternarCategoria as Ka, alternarDirecaoOrdenacao as Za, alternarPosicionamentoFlutuante as Ja, aplicarLimitesNumericos as Wa, aplicarOrdenacaoTabela as Qa, atualizarCampoVisual as Ya, avaliarExpressaoMatematica as ei, buscarLinhaPropriedade as ti, carregarEstadoPropriedades as ai, colapsarTodasCategorias as ii, combinarValores as oi, conectarArrastoFlutuante as ri, conectarPainelControles as ni, criarControladorSplitter as si, criarEditorAcao as li, criarEditorBooleano as ci, criarEditorCorCad as di, criarEditorCorSwatch as ui, criarEditorLinetype as hi, criarEditorLineweight as mi, criarEditorNumero as pi, criarEditorReadonly as vi, criarEditorSelecao as gi, criarEditorTexto as bi, criarEditorValor as fi, criarLinhaPropriedade as xi, executarOrquestracaoCorpo as _i, executarOrquestracaoHeader as Ai, executarRedimensionamentoColuna as yi, executarRedimensionamentoTeclado as Ei, exibirPromptPopoverRedimensionamento as wi, expandirTodasCategorias as Ci, focarEditorAnterior as ki, focarPrimeiroEditor as Si, focarProximoEditor as Ii, formatWidth as zi, gerarChaveStoragePropriedades as Ti, getAlignmentClass as Di, getRowHeight as Mi, getTextAlign as Pi, idDaCategoria as Oi, inicializarScrollVirtualizacao as Li, iniciarRedimensionamentoColuna as Ui, interpretarEntradaNumerica as qi, interpretarIndice as ji, isValorMisto as Ni, limitarLarguraColuna as Ri, limparEstadoPropriedades as Fi, localizarIndiceItem as Bi, marcarSelectMisto as Vi, montarEstruturaDOM as $i, normalizarEstadoPersistidoPropriedades as Hi, normalizarTexto as Gi, obterCasasDecimais as Xi, obterPassoNumerico as Ki, orquestrarEstruturaInicial as Zi, proximaDensidade as Ji, redimensionarColunaPorDelta as Wi, registrarAtualizadorEditor as Qi, renderizarCategoriasETree as Yi, renderizarCorpoTabela as eo, renderizarHeaderTabela as to, renderizarSeletorTipos as ao, salvarEstadoPropriedades as io, sincronizarAtributosTabela as oo, sincronizarCampoAberto as ro, sincronizarDomCategorias as no, sincronizarFlutuanteExterno as so, sincronizarPainelControles as lo, sincronizarSelect as co, textoDoHost as uo, textoMistoDe as ho, tratarMudancaAtributoTabela as mo, valorComum as po, valorInicialDaPropriedade as vo, valoresIguais as go } from "./tabela.js";
|
|
11
|
+
import { ICONES_ALERTA as fo, UIAlerta as xo, UIDrawer as _o, UIEsqueleto as Ao, UIGaveta as yo, UIPainelLateral as Eo, UIPopover as wo, UISheet as Co, UISkeleton as ko, UIToast as So, UITooltip as Io, atualizarScrollLockDrawer as zo, gerenciarTabTrap as To, isTopMostDrawer as Do, obterElementosFocaveis as Mo, registrarToastNoBus as Po } from "./feedback.js";
|
|
12
|
+
import { ICONES_FERRAMENTAS as Lo, UIPaletaFerramentas as Uo, UIRibbon as qo } from "./tools.js";
|
|
13
|
+
import { P as No, c as Ro, e as Fo, n as Bo, b as Vo, a as $o } from "./cores-utils-DMyqWvZh.js";
|
|
14
|
+
import { UIBadge as Go, UIChip as Xo, UIKpi as Ko, UIMetrica as Zo, UIStat as Jo, UITag as Wo } from "./data.js";
|
|
15
|
+
import { UIBotao as Yo, UIBotaoPrimario as er } from "./botao.js";
|
|
16
|
+
import { UICard as ar } from "./card.js";
|
|
17
|
+
import { UIControleCores as or } from "./cores.js";
|
|
18
|
+
import { UIDialog as nr, UIModal as sr, aplicarInertForaDoModal as lr, confirmarAcao as cr, confirmarDescarteSeSujo as dr, removerInertForaDoModal as ur } from "./modal.js";
|
|
19
|
+
import { UIMapaBase as mr, UISeletorMapaBase as pr } from "./seletor-mapa-base.js";
|
|
20
|
+
import { U as gr, a as br, f as fr } from "./ui-seletor-cor-CPjA9vhZ.js";
|
|
21
|
+
const ie = ':host{display:block;box-sizing:border-box;margin:0;padding:0;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){display:inline-block}.ui-texto{margin:0;padding:0;box-sizing:border-box;font-family:inherit;color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;overflow-wrap:break-word}.ui-texto--h1{font-size:var(--ui-tamanho-h1, clamp(24px, 4vw, 36px));font-weight:var(--ui-peso-negrito, 700);line-height:var(--ui-altura-linha-titulo, 1.25);letter-spacing:-.5px}.ui-texto--h2{font-size:var(--ui-tamanho-h2, clamp(20px, 3vw, 28px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25);letter-spacing:-.3px}.ui-texto--h3{font-size:var(--ui-tamanho-h3, clamp(18px, 2.4vw, 24px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h4{font-size:var(--ui-tamanho-h4, clamp(16px, 2vw, 20px));font-weight:var(--ui-peso-medio, 500);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h5{font-size:var(--ui-tamanho-h5, clamp(14px, 1.6vw, 18px));font-weight:var(--ui-peso-medio, 500);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h6{font-size:var(--ui-tamanho-h6, clamp(13px, 1.2vw, 16px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25);text-transform:uppercase;letter-spacing:.5px}.ui-texto--corpo{font-size:var(--ui-tamanho-corpo, 14px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5)}.ui-texto--corpo-sm{font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5)}.ui-texto--caption{font-size:var(--ui-tamanho-caption, 11px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-compacta, 1.2);color:var(--ui-cor-texto-secundario, #888899)}.ui-texto--codigo{font-family:var(--ui-fonte-codigo, monospace);font-size:var(--ui-tamanho-codigo, 12px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5);background:var(--ui-cor-fundo-elevado, #1a1a1e);padding:2px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-texto--cor-primaria{color:var(--ui-cor-primaria, #00E08A)}.ui-texto--cor-secundaria{color:var(--ui-cor-texto-secundario, #888899)}.ui-texto--cor-destaque{color:var(--ui-cor-destaque, #00E08A)}.ui-texto--cor-erro{color:var(--ui-cor-texto-erro, #ff5555)}.ui-texto--cor-sucesso{color:var(--ui-cor-texto-sucesso, #00E08A)}.ui-texto--cor-alerta{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-texto--peso-normal{font-weight:var(--ui-peso-normal, 400)!important}.ui-texto--peso-medio{font-weight:var(--ui-peso-medio, 500)!important}.ui-texto--peso-seminegrito{font-weight:var(--ui-peso-seminegrito, 600)!important}.ui-texto--peso-negrito{font-weight:var(--ui-peso-negrito, 700)!important}.ui-texto--alinhamento-esquerda{text-align:left}.ui-texto--alinhamento-centro{text-align:center}.ui-texto--alinhamento-direita{text-align:right}.ui-texto--alinhamento-justificado{text-align:justify;-webkit-hyphens:auto;hyphens:auto}.ui-texto--truncar{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.ui-texto--linhas{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--ui-texto-linhas, 3);line-clamp:var(--ui-texto-linhas, 3);overflow:hidden}@media print{.ui-texto--linhas{-webkit-line-clamp:unset;line-clamp:unset;display:block;overflow:visible}}:host(.degrade) .ui-texto:not(.ui-texto--codigo),:host(.ui-degrade) .ui-texto:not(.ui-texto--codigo),:host(.gradiente) .ui-texto:not(.ui-texto--codigo),:host(.ui-gradiente) .ui-texto:not(.ui-texto--codigo),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])) .ui-texto:not(.ui-texto--codigo),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])) .ui-texto:not(.ui-texto--codigo),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])) .ui-texto:not(.ui-texto--codigo),.ui-texto[data-degrade=ativo]:not(.ui-texto--codigo){background:var(--ui-degrade-interno, var(--ui-texto-fundo, var(--ui-gradiente-texto, var(--ui-gradiente-primario))));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}:host(.degrade) .ui-texto--codigo,:host(.ui-degrade) .ui-texto--codigo,:host(.gradiente) .ui-texto--codigo,:host(.ui-gradiente) .ui-texto--codigo,.ui-texto--codigo[data-degrade=ativo]{background:var(--ui-degrade-interno, var(--ui-texto-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, #1a1a1e))))}', F = ["h1", "h2", "h3", "h4", "h5", "h6", "corpo", "corpo-sm", "caption", "codigo"], oe = ["primaria", "secundaria", "destaque", "erro", "sucesso", "alerta"], re = ["normal", "medio", "seminegrito", "negrito"], ne = ["esquerda", "centro", "direita", "justificado"], se = /* @__PURE__ */ new Set([
|
|
22
|
+
"p",
|
|
23
|
+
"span",
|
|
24
|
+
"div",
|
|
25
|
+
"h1",
|
|
26
|
+
"h2",
|
|
27
|
+
"h3",
|
|
28
|
+
"h4",
|
|
29
|
+
"h5",
|
|
30
|
+
"h6",
|
|
31
|
+
"small",
|
|
32
|
+
"code",
|
|
33
|
+
"strong",
|
|
34
|
+
"em",
|
|
35
|
+
"label",
|
|
36
|
+
"blockquote",
|
|
37
|
+
"pre",
|
|
38
|
+
"b",
|
|
39
|
+
"i"
|
|
40
|
+
]), le = 50;
|
|
41
|
+
class ce extends C {
|
|
42
|
+
constructor() {
|
|
43
|
+
super();
|
|
44
|
+
s(this, "container", null);
|
|
45
|
+
s(this, "shadow", null);
|
|
46
|
+
if (typeof this.attachShadow == "function" && typeof document < "u") {
|
|
47
|
+
this.shadow = this.attachShadow({ mode: "open" });
|
|
48
|
+
const e = document.createElement("p");
|
|
49
|
+
e.className = "ui-texto ui-texto--corpo", e.setAttribute("part", "base"), e.appendChild(document.createElement("slot")), this.container = e, this.shadow.innerHTML = `<style>${ie}</style>`, this.shadow.appendChild(e);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static get observedAttributes() {
|
|
53
|
+
return ["variante", "tag", "cor", "peso", "alinhamento", "truncar", "linhas", ...U];
|
|
54
|
+
}
|
|
55
|
+
connectedCallback() {
|
|
56
|
+
this.render();
|
|
57
|
+
}
|
|
58
|
+
attributeChangedCallback(e, t, a) {
|
|
59
|
+
this.render();
|
|
60
|
+
}
|
|
61
|
+
resolveTag() {
|
|
62
|
+
const e = this.getAttribute("tag");
|
|
63
|
+
if (e) {
|
|
64
|
+
const a = e.toLowerCase().trim();
|
|
65
|
+
if (se.has(a))
|
|
66
|
+
return a;
|
|
67
|
+
console.warn(`[ui-texto] Tag "${e}" não permitida ou inválida. Utilizando fallback semântico.`);
|
|
68
|
+
}
|
|
69
|
+
const t = A(this.getAttribute("variante"), F, "corpo");
|
|
70
|
+
switch (t) {
|
|
71
|
+
case "h1":
|
|
72
|
+
case "h2":
|
|
73
|
+
case "h3":
|
|
74
|
+
case "h4":
|
|
75
|
+
case "h5":
|
|
76
|
+
case "h6":
|
|
77
|
+
return t;
|
|
78
|
+
case "caption":
|
|
79
|
+
return "small";
|
|
80
|
+
case "codigo":
|
|
81
|
+
return "code";
|
|
82
|
+
case "corpo-sm":
|
|
83
|
+
case "corpo":
|
|
84
|
+
default:
|
|
85
|
+
return "p";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
const { container: e, shadow: t } = this;
|
|
90
|
+
if (!e || !t) return;
|
|
91
|
+
const a = this.resolveTag(), r = A(this.getAttribute("variante"), F, "corpo"), n = w(this.getAttribute("cor"), oe), l = w(this.getAttribute("peso"), re), c = w(this.getAttribute("alinhamento"), ne), d = this.hasAttribute("truncar"), u = d ? 0 : E(this.getAttribute("linhas"), 1, le, 0);
|
|
92
|
+
let h = e;
|
|
93
|
+
e.tagName.toLowerCase() !== a && (h = document.createElement(a), h.setAttribute("part", "base"), h.appendChild(document.createElement("slot")), t.replaceChild(h, e), this.container = h);
|
|
94
|
+
const m = ["ui-texto", `ui-texto--${r}`];
|
|
95
|
+
n && m.push(`ui-texto--cor-${n}`), l && m.push(`ui-texto--peso-${l}`), c && m.push(`ui-texto--alinhamento-${c}`), d && m.push("ui-texto--truncar"), u > 0 && m.push("ui-texto--linhas"), h.className = m.join(" "), u > 0 ? h.style.setProperty("--ui-texto-linhas", String(u)) : h.style.removeProperty("--ui-texto-linhas"), q(this, h);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
f("ui-texto", ce);
|
|
99
|
+
const de = ':host{display:inline-block;box-sizing:border-box;vertical-align:middle}:host([largura-total]),:host([full-width]){display:block;width:100%}.ui-texto-editavel{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;width:100%}.ui-texto-editavel__botao{display:inline-flex;align-items:center;justify-content:flex-start;gap:var(--ui-espaco-xs, 4px);width:100%;height:var(--ui-campo-altura, 34px);min-height:var(--ui-campo-altura, 34px);box-sizing:border-box;padding:0 12px;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);background:var(--ui-cor-botao-secundario-fundo, #1e1e24);color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:clamp(11px,.85rem,13px);font-weight:500;line-height:1.2;text-align:left;-webkit-user-select:none;user-select:none;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease}.ui-texto-editavel__botao:hover:not(:disabled){background:var(--ui-cor-botao-secundario-hover, #2a2a34);border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 24%,transparent)}.ui-texto-editavel__botao: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-texto-editavel__texto{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.ui-texto-editavel__texto--placeholder{color:var(--ui-cor-texto-silenciado, rgba(255, 255, 255, .45));font-style:italic}.ui-texto-editavel__input{display:inline-block;width:100%;height:var(--ui-campo-altura, 34px);min-height:var(--ui-campo-altura, 34px);box-sizing:border-box;padding:0 11px;border:1px solid var(--ui-cor-primaria, #00E08A);border-radius:var(--ui-raio-borda, 6px);background:var(--ui-cor-campo-fundo, #121217);color:var(--ui-cor-texto, #ffffff);font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:clamp(11px,.85rem,13px);font-weight:500;line-height:1.2;outline:none;box-shadow:0 0 0 1px var(--ui-cor-primaria, #00E08A),0 0 0 3px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent);transition:border-color .15s ease,box-shadow .15s ease}.ui-texto-editavel__input::selection{background:var(--ui-cor-primaria, #00E08A);color:#000}.ui-texto-editavel[data-modo=leitura] .ui-texto-editavel__input,.ui-texto-editavel[data-modo=edicao] .ui-texto-editavel__botao{display:none!important}.ui-texto-editavel--sm .ui-texto-editavel__botao,.ui-texto-editavel--sm .ui-texto-editavel__input{height:var(--ui-campo-altura-sm, 28px);min-height:var(--ui-campo-altura-sm, 28px);font-size:11px;padding-left:8px;padding-right:8px}.ui-texto-editavel--lg .ui-texto-editavel__botao,.ui-texto-editavel--lg .ui-texto-editavel__input{height:var(--ui-campo-altura-lg, 42px);min-height:var(--ui-campo-altura-lg, 42px);font-size:15px;padding-left:14px;padding-right:14px}.ui-texto-editavel--primario .ui-texto-editavel__botao,.ui-texto-editavel--primary .ui-texto-editavel__botao{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000);border-color:transparent;font-weight:600}.ui-texto-editavel--primario .ui-texto-editavel__botao:hover:not(:disabled),.ui-texto-editavel--primary .ui-texto-editavel__botao:hover:not(:disabled){filter:brightness(1.1)}.ui-texto-editavel--ghost .ui-texto-editavel__botao,.ui-texto-editavel--terciario .ui-texto-editavel__botao{background:transparent;color:var(--ui-cor-texto, #e1e1e6);border-color:transparent}.ui-texto-editavel--ghost .ui-texto-editavel__botao:hover:not(:disabled),.ui-texto-editavel--terciario .ui-texto-editavel__botao:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-texto-editavel--outline .ui-texto-editavel__botao,.ui-texto-editavel--borda .ui-texto-editavel__botao{background:transparent;color:var(--ui-cor-texto, #e1e1e6);border-color:var(--ui-cor-borda, rgba(255, 255, 255, .2))}.ui-texto-editavel--outline .ui-texto-editavel__botao:hover:not(:disabled),.ui-texto-editavel--borda .ui-texto-editavel__botao:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .06));border-color:var(--ui-cor-primaria, #00E08A)}.ui-texto-editavel--texto .ui-texto-editavel__botao,.ui-texto-editavel--plano .ui-texto-editavel__botao{background:transparent;border-color:transparent;padding:0 4px;height:auto;min-height:unset;border-radius:4px}.ui-texto-editavel--texto .ui-texto-editavel__botao:hover:not(:disabled),.ui-texto-editavel--plano .ui-texto-editavel__botao:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .06));border-color:color-mix(in srgb,var(--ui-cor-borda, #ffffff) 15%,transparent)}.ui-texto-editavel--destaque .ui-texto-editavel__botao{background:var(--ui-cor-destaque, var(--ui-cor-primaria, #00E08A));color:var(--ui-cor-texto-sobre-primaria, #000000);border-color:transparent}.ui-texto-editavel--destrutivo .ui-texto-editavel__botao{background:var(--ui-cor-botao-destrutivo-fundo, #ff4444);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:transparent}:host([disabled]){pointer-events:none;opacity:.55;cursor:not-allowed}.ui-texto-editavel__botao:disabled{cursor:not-allowed;opacity:.55}:host([readonly]) .ui-texto-editavel__botao,:host([somente-leitura]) .ui-texto-editavel__botao{cursor:default}', ue = [
|
|
100
|
+
"valor",
|
|
101
|
+
"value",
|
|
102
|
+
"placeholder",
|
|
103
|
+
"variante",
|
|
104
|
+
"tamanho",
|
|
105
|
+
"disabled",
|
|
106
|
+
"desabilitado",
|
|
107
|
+
"readonly",
|
|
108
|
+
"somente-leitura",
|
|
109
|
+
"ao-perder-foco",
|
|
110
|
+
"obrigatorio",
|
|
111
|
+
"maxlength",
|
|
112
|
+
"limite-caracteres",
|
|
113
|
+
"name",
|
|
114
|
+
"nome"
|
|
115
|
+
];
|
|
116
|
+
function he(i) {
|
|
117
|
+
return `
|
|
118
|
+
<style>${i}</style>
|
|
119
|
+
<div class="ui-texto-editavel ui-texto-editavel--secundario" data-modo="leitura" part="base">
|
|
120
|
+
<button
|
|
121
|
+
class="ui-texto-editavel__botao"
|
|
122
|
+
part="botao"
|
|
123
|
+
type="button"
|
|
124
|
+
aria-description="Pressione Enter ou clique duas vezes para editar"
|
|
125
|
+
>
|
|
126
|
+
<span class="ui-texto-editavel__texto" part="texto"></span>
|
|
127
|
+
</button>
|
|
128
|
+
<input
|
|
129
|
+
class="ui-texto-editavel__input"
|
|
130
|
+
part="input"
|
|
131
|
+
type="text"
|
|
132
|
+
autocomplete="off"
|
|
133
|
+
spellcheck="false"
|
|
134
|
+
/>
|
|
135
|
+
</div>
|
|
136
|
+
`;
|
|
137
|
+
}
|
|
138
|
+
function me(i, o) {
|
|
139
|
+
(i.key === "Enter" || i.key === "F2") && (i.preventDefault(), i.stopPropagation(), o());
|
|
140
|
+
}
|
|
141
|
+
function pe(i, o, e) {
|
|
142
|
+
i.key === "Enter" ? (i.preventDefault(), i.stopPropagation(), o()) : i.key === "Escape" ? (i.preventDefault(), i.stopPropagation(), e()) : i.key === "Tab" && o();
|
|
143
|
+
}
|
|
144
|
+
class G extends H {
|
|
145
|
+
constructor() {
|
|
146
|
+
super();
|
|
147
|
+
s(this, "container");
|
|
148
|
+
s(this, "botaoElement");
|
|
149
|
+
s(this, "textoElement");
|
|
150
|
+
s(this, "inputElement");
|
|
151
|
+
s(this, "_modo", "leitura");
|
|
152
|
+
s(this, "_concluindo", !1);
|
|
153
|
+
s(this, "_valorInterno", "");
|
|
154
|
+
s(this, "_valorOriginalAoEditar", "");
|
|
155
|
+
s(this, "listeners", new j());
|
|
156
|
+
// === Handlers de Eventos ===
|
|
157
|
+
s(this, "handleDuploClique", (e) => {
|
|
158
|
+
e.stopPropagation(), !(this.disabled || this.readOnly) && this.editar();
|
|
159
|
+
});
|
|
160
|
+
s(this, "handleKeyDownBotao", (e) => {
|
|
161
|
+
this.disabled || this.readOnly || me(e, () => this.editar());
|
|
162
|
+
});
|
|
163
|
+
s(this, "handleKeyDownInput", (e) => {
|
|
164
|
+
pe(
|
|
165
|
+
e,
|
|
166
|
+
() => this.salvar(),
|
|
167
|
+
() => this.cancelar()
|
|
168
|
+
);
|
|
169
|
+
});
|
|
170
|
+
s(this, "handleBlurInput", () => {
|
|
171
|
+
if (this._concluindo || this._modo !== "edicao") return;
|
|
172
|
+
const e = this.aoPerderFoco;
|
|
173
|
+
e === "cancelar" ? this.cancelar() : e === "salvar" && this.salvar();
|
|
174
|
+
});
|
|
175
|
+
const e = this.attachShadow({ mode: "open", delegatesFocus: !0 });
|
|
176
|
+
e.innerHTML = he(de), this.container = e.querySelector(".ui-texto-editavel"), this.botaoElement = e.querySelector(".ui-texto-editavel__botao"), this.textoElement = e.querySelector(".ui-texto-editavel__texto"), this.inputElement = e.querySelector(".ui-texto-editavel__input"), this._valorInterno = this.getAttribute("valor") ?? this.getAttribute("value") ?? "";
|
|
177
|
+
}
|
|
178
|
+
static get observedAttributes() {
|
|
179
|
+
return ue;
|
|
180
|
+
}
|
|
181
|
+
connectedCallback() {
|
|
182
|
+
this.listeners.cleanup(), this.listeners.add(this.botaoElement, "dblclick", this.handleDuploClique), this.listeners.add(this.botaoElement, "keydown", this.handleKeyDownBotao), this.listeners.add(this.inputElement, "keydown", this.handleKeyDownInput), this.listeners.add(this.inputElement, "blur", this.handleBlurInput), this.syncState();
|
|
183
|
+
}
|
|
184
|
+
disconnectedCallback() {
|
|
185
|
+
this.listeners.cleanup();
|
|
186
|
+
}
|
|
187
|
+
attributeChangedCallback(e, t, a) {
|
|
188
|
+
(e === "valor" || e === "value") && a !== null && this._modo === "leitura" && (this._valorInterno = a), this.syncState();
|
|
189
|
+
}
|
|
190
|
+
// === API Pública Programática ===
|
|
191
|
+
/** Entra no modo de edição se o componente não estiver desabilitado ou em somente leitura. */
|
|
192
|
+
editar() {
|
|
193
|
+
this._modo === "edicao" || this.disabled || this.readOnly || (this._modo = "edicao", this._valorOriginalAoEditar = this._valorInterno, this.inputElement.value = this._valorInterno, this.container.setAttribute("data-modo", "edicao"), requestAnimationFrame(() => {
|
|
194
|
+
this.inputElement.focus(), this.inputElement.select();
|
|
195
|
+
}), this.dispararEventoModo());
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Salva as alterações feitas no modo de edição e retorna ao modo leitura.
|
|
199
|
+
* Dispara `ui-salvar` (cancelável com preventDefault()).
|
|
200
|
+
*/
|
|
201
|
+
salvar() {
|
|
202
|
+
if (this._modo !== "edicao" || this._concluindo) return !1;
|
|
203
|
+
this._concluindo = !0;
|
|
204
|
+
const t = this.inputElement.value.trim();
|
|
205
|
+
if (this.obrigatorio && t === "")
|
|
206
|
+
return this._concluindo = !1, this.cancelar(), !1;
|
|
207
|
+
const a = this._valorOriginalAoEditar;
|
|
208
|
+
if (t !== a) {
|
|
209
|
+
const r = new CustomEvent("ui-salvar", {
|
|
210
|
+
bubbles: !0,
|
|
211
|
+
composed: !0,
|
|
212
|
+
cancelable: !0,
|
|
213
|
+
detail: { valor: t, valorAnterior: a }
|
|
214
|
+
});
|
|
215
|
+
if (!this.dispatchEvent(r))
|
|
216
|
+
return this._concluindo = !1, !1;
|
|
217
|
+
this._valorInterno = t, this.setAttribute("valor", t), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
218
|
+
}
|
|
219
|
+
return this._modo = "leitura", this.container.setAttribute("data-modo", "leitura"), this.syncState(), requestAnimationFrame(() => {
|
|
220
|
+
this.botaoElement.focus();
|
|
221
|
+
}), this.dispararEventoModo(), this._concluindo = !1, !0;
|
|
222
|
+
}
|
|
223
|
+
/** Cancela as alterações e restaura o valor prévio à edição. */
|
|
224
|
+
cancelar() {
|
|
225
|
+
this._modo !== "edicao" || this._concluindo || (this._concluindo = !0, this.inputElement.value = this._valorOriginalAoEditar, this._modo = "leitura", this.container.setAttribute("data-modo", "leitura"), this.syncState(), this.dispatchEvent(
|
|
226
|
+
new CustomEvent("ui-cancelar", {
|
|
227
|
+
bubbles: !0,
|
|
228
|
+
composed: !0,
|
|
229
|
+
detail: { valor: this._valorInterno }
|
|
230
|
+
})
|
|
231
|
+
), requestAnimationFrame(() => {
|
|
232
|
+
this.botaoElement.focus();
|
|
233
|
+
}), this.dispararEventoModo(), this._concluindo = !1);
|
|
234
|
+
}
|
|
235
|
+
/** Informa se o componente está atualmente no modo de edição. */
|
|
236
|
+
estaEditando() {
|
|
237
|
+
return this._modo === "edicao";
|
|
238
|
+
}
|
|
239
|
+
dispararEventoModo() {
|
|
240
|
+
this.dispatchEvent(
|
|
241
|
+
new CustomEvent("ui-modo-alterado", {
|
|
242
|
+
bubbles: !0,
|
|
243
|
+
composed: !0,
|
|
244
|
+
detail: { modo: this._modo }
|
|
245
|
+
})
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
// === Sincronização do DOM & Form-Associated ===
|
|
249
|
+
syncState() {
|
|
250
|
+
const e = this._valorInterno, t = this.placeholder;
|
|
251
|
+
e.trim() !== "" ? (this.textoElement.textContent = e, this.textoElement.classList.remove("ui-texto-editavel__texto--placeholder")) : (this.textoElement.textContent = t, this.textoElement.classList.add("ui-texto-editavel__texto--placeholder"));
|
|
252
|
+
const a = this.variante, r = this.tamanho;
|
|
253
|
+
this.container.className = `ui-texto-editavel ui-texto-editavel--${a} ui-texto-editavel--${r}`;
|
|
254
|
+
const n = this.disabled;
|
|
255
|
+
this.botaoElement.disabled = n, this.inputElement.disabled = n;
|
|
256
|
+
const l = this.maxlength;
|
|
257
|
+
l !== null && l > 0 ? this.inputElement.maxLength = l : this.inputElement.removeAttribute("maxlength"), this.atualizarValidade();
|
|
258
|
+
}
|
|
259
|
+
atualizarValidade() {
|
|
260
|
+
this.internals && typeof this.internals.setFormValue == "function" && this.internals.setFormValue(this._valorInterno);
|
|
261
|
+
}
|
|
262
|
+
// === Getters e Setters ===
|
|
263
|
+
get valor() {
|
|
264
|
+
return this._valorInterno;
|
|
265
|
+
}
|
|
266
|
+
set valor(e) {
|
|
267
|
+
this._valorInterno = e ?? "", this.setAttribute("valor", this._valorInterno), this.syncState();
|
|
268
|
+
}
|
|
269
|
+
get value() {
|
|
270
|
+
return this.valor;
|
|
271
|
+
}
|
|
272
|
+
set value(e) {
|
|
273
|
+
this.valor = e;
|
|
274
|
+
}
|
|
275
|
+
get placeholder() {
|
|
276
|
+
return this.getAttribute("placeholder") || "Clique duas vezes para editar";
|
|
277
|
+
}
|
|
278
|
+
set placeholder(e) {
|
|
279
|
+
e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder"), this.syncState();
|
|
280
|
+
}
|
|
281
|
+
get variante() {
|
|
282
|
+
return this.getAttribute("variante") || "secundario";
|
|
283
|
+
}
|
|
284
|
+
set variante(e) {
|
|
285
|
+
e ? this.setAttribute("variante", e) : this.removeAttribute("variante"), this.syncState();
|
|
286
|
+
}
|
|
287
|
+
get tamanho() {
|
|
288
|
+
return this.getAttribute("tamanho") || "md";
|
|
289
|
+
}
|
|
290
|
+
set tamanho(e) {
|
|
291
|
+
e ? this.setAttribute("tamanho", e) : this.removeAttribute("tamanho"), this.syncState();
|
|
292
|
+
}
|
|
293
|
+
get disabled() {
|
|
294
|
+
return this._formDisabled || this.hasAttribute("disabled") || this.hasAttribute("desabilitado");
|
|
295
|
+
}
|
|
296
|
+
set disabled(e) {
|
|
297
|
+
e ? this.setAttribute("disabled", "") : (this.removeAttribute("disabled"), this.removeAttribute("desabilitado")), this.syncState();
|
|
298
|
+
}
|
|
299
|
+
get readOnly() {
|
|
300
|
+
return this.hasAttribute("readonly") || this.hasAttribute("somente-leitura");
|
|
301
|
+
}
|
|
302
|
+
set readOnly(e) {
|
|
303
|
+
e ? this.setAttribute("readonly", "") : (this.removeAttribute("readonly"), this.removeAttribute("somente-leitura"));
|
|
304
|
+
}
|
|
305
|
+
get obrigatorio() {
|
|
306
|
+
return this.hasAttribute("obrigatorio") || this.hasAttribute("required");
|
|
307
|
+
}
|
|
308
|
+
set obrigatorio(e) {
|
|
309
|
+
e ? this.setAttribute("obrigatorio", "") : (this.removeAttribute("obrigatorio"), this.removeAttribute("required"));
|
|
310
|
+
}
|
|
311
|
+
get aoPerderFoco() {
|
|
312
|
+
const e = this.getAttribute("ao-perder-foco");
|
|
313
|
+
return e === "cancelar" || e === "ignorar" ? e : "salvar";
|
|
314
|
+
}
|
|
315
|
+
set aoPerderFoco(e) {
|
|
316
|
+
this.setAttribute("ao-perder-foco", e);
|
|
317
|
+
}
|
|
318
|
+
get maxlength() {
|
|
319
|
+
const e = this.getAttribute("maxlength") ?? this.getAttribute("limite-caracteres");
|
|
320
|
+
if (!e) return null;
|
|
321
|
+
const t = parseInt(e, 10);
|
|
322
|
+
return isNaN(t) ? null : t;
|
|
323
|
+
}
|
|
324
|
+
set maxlength(e) {
|
|
325
|
+
e !== null && e >= 0 ? this.setAttribute("maxlength", String(e)) : (this.removeAttribute("maxlength"), this.removeAttribute("limite-caracteres")), this.syncState();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
s(G, "formAssociated", !0);
|
|
329
|
+
f("ui-texto-editavel", G);
|
|
330
|
+
const ve = ':host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1;color:inherit;flex-shrink:0;width:var(--ui-tamanho-icone, 20px);height:var(--ui-tamanho-icone, 20px);box-sizing:border-box}.ui-icone{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;color:inherit;font-size:var(--ui-tamanho-icone, 20px)}::slotted(svg),.ui-icone svg{width:100%!important;height:100%!important;display:block;shape-rendering:geometricPrecision}:host([cor="primaria"]),:host([color="primaria"]){color:var(--ui-cor-primaria, #00E08A)}:host([cor="secundaria"]),:host([color="secundaria"]){color:var(--ui-cor-texto-secundario, #888899)}:host([cor="erro"]),:host([color="erro"]){color:var(--ui-cor-texto-erro, #ff5555)}:host([cor="sucesso"]),:host([color="sucesso"]){color:var(--ui-cor-texto-sucesso, #00E08A)}:host([cor="alerta"]),:host([color="alerta"]){color:var(--ui-cor-texto-alerta, #ffb86c)}', B = {
|
|
331
|
+
search: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
|
|
332
|
+
check: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>',
|
|
333
|
+
eye: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',
|
|
334
|
+
eyeOff: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>',
|
|
335
|
+
lock: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>',
|
|
336
|
+
trash: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',
|
|
337
|
+
gear: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>',
|
|
338
|
+
bell: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>',
|
|
339
|
+
alert: '<svg viewBox="0 0 24 24" 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="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',
|
|
340
|
+
close: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>'
|
|
341
|
+
};
|
|
342
|
+
class ge extends C {
|
|
343
|
+
constructor() {
|
|
344
|
+
super();
|
|
345
|
+
s(this, "iconContainer");
|
|
346
|
+
s(this, "svgContainer");
|
|
347
|
+
s(this, "slotElement");
|
|
348
|
+
s(this, "handleSlotChange", () => {
|
|
349
|
+
this.syncState();
|
|
350
|
+
});
|
|
351
|
+
const e = this.attachShadow({ mode: "open" });
|
|
352
|
+
e.innerHTML = `
|
|
353
|
+
<style>${ve}</style>
|
|
354
|
+
<span class="ui-icone" aria-hidden="true">
|
|
355
|
+
<span class="ui-icone__svg" style="display: none;"></span>
|
|
356
|
+
<slot></slot>
|
|
357
|
+
</span>
|
|
358
|
+
`, this.iconContainer = e.querySelector(".ui-icone"), this.svgContainer = e.querySelector(".ui-icone__svg"), this.slotElement = e.querySelector("slot");
|
|
359
|
+
}
|
|
360
|
+
static get observedAttributes() {
|
|
361
|
+
return ["tamanho", "size", "cor", "color", "nome", "name"];
|
|
362
|
+
}
|
|
363
|
+
connectedCallback() {
|
|
364
|
+
this.slotElement.addEventListener("slotchange", this.handleSlotChange), this.syncState();
|
|
365
|
+
}
|
|
366
|
+
disconnectedCallback() {
|
|
367
|
+
this.slotElement.removeEventListener("slotchange", this.handleSlotChange);
|
|
368
|
+
}
|
|
369
|
+
attributeChangedCallback(e, t, a) {
|
|
370
|
+
this.syncState();
|
|
371
|
+
}
|
|
372
|
+
resolveTamanhoPx() {
|
|
373
|
+
const e = this.getAttribute("tamanho") || this.getAttribute("size") || "md";
|
|
374
|
+
switch (e.toLowerCase()) {
|
|
375
|
+
case "sm":
|
|
376
|
+
return "16px";
|
|
377
|
+
case "md":
|
|
378
|
+
return "20px";
|
|
379
|
+
case "lg":
|
|
380
|
+
return "24px";
|
|
381
|
+
case "xl":
|
|
382
|
+
return "32px";
|
|
383
|
+
default:
|
|
384
|
+
return isNaN(Number(e)) ? e : `${e}px`;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
syncState() {
|
|
388
|
+
const e = this.resolveTamanhoPx();
|
|
389
|
+
this.style.setProperty("--ui-tamanho-icone", e);
|
|
390
|
+
const t = this.getAttribute("cor") || this.getAttribute("color");
|
|
391
|
+
t ? (this.style.setProperty("--ui-cor-icone", t), this.iconContainer.style.color = t) : (this.style.removeProperty("--ui-cor-icone"), this.iconContainer.style.color = ""), this.hasAttribute("aria-label") || this.hasAttribute("label") ? this.iconContainer.removeAttribute("aria-hidden") : this.iconContainer.setAttribute("aria-hidden", "true");
|
|
392
|
+
const r = this.getAttribute("nome") || this.getAttribute("name"), n = this.slotElement.assignedNodes().length > 0;
|
|
393
|
+
r && B[r] && !n ? (this.svgContainer.innerHTML = B[r], this.svgContainer.style.display = "inline-flex") : (this.svgContainer.innerHTML = "", this.svgContainer.style.display = "none");
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
f("ui-icone", ge);
|
|
397
|
+
const be = ':host{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle;position:relative}.ui-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--ui-tamanho-avatar, 36px);height:var(--ui-tamanho-avatar, 36px);min-width:var(--ui-tamanho-avatar, 36px);min-height:var(--ui-tamanho-avatar, 36px);border-radius:50%;background:var(--ui-degrade-interno, var(--ui-avatar-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, #22222a))));color:var(--ui-cor-primaria, #00E08A);font-weight:600;font-size:var(--ui-avatar-font-size, 14px);-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));line-height:1}.ui-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.ui-avatar--quadrado{border-radius:8px}.ui-avatar__status{position:absolute;bottom:0;right:0;width:25%;height:25%;min-width:8px;min-height:8px;max-width:14px;max-height:14px;border-radius:50%;border:2px solid var(--ui-cor-fundo-card, #121214);box-sizing:border-box}.ui-avatar__status--online{background:var(--ui-cor-primaria, #00E08A)}.ui-avatar__status--offline{background:#889}.ui-avatar__status--ausente{background:#ffb86c}.ui-avatar__status--ocupado{background:#f55}.ui-avatar--xs{--ui-tamanho-avatar: 20px;--ui-avatar-font-size: 10px}.ui-avatar--sm{--ui-tamanho-avatar: 28px;--ui-avatar-font-size: 11px}.ui-avatar--md{--ui-tamanho-avatar: 36px;--ui-avatar-font-size: 14px}.ui-avatar--lg{--ui-tamanho-avatar: 48px;--ui-avatar-font-size: 18px}.ui-avatar--xl{--ui-tamanho-avatar: 64px;--ui-avatar-font-size: 24px}:host(.squarecircle) .ui-avatar,:host(.squarecircles) .ui-avatar,:host(.ui-squarecircle) .ui-avatar,:host(.ui-squarecircles) .ui-avatar,.ui-avatar--squarecircle{border-radius:var(--ui-raio-squircle, 24%)}:host(.degrade),:host(.ui-degrade),:host(.gradiente),:host(.ui-gradiente),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])){--ui-fundo-elevado: var(--ui-gradiente-elevado)}', V = ["xs", "sm", "md", "lg", "xl"], fe = ["online", "offline", "ausente", "ocupado"], xe = 8, _e = 512;
|
|
398
|
+
class Ae extends C {
|
|
399
|
+
constructor() {
|
|
400
|
+
super();
|
|
401
|
+
s(this, "avatarElement");
|
|
402
|
+
s(this, "statusElement");
|
|
403
|
+
/** O que este componente escreveu em aria-label / aria-hidden (para distinguir do que o consumidor definiu). */
|
|
404
|
+
s(this, "_rotuloAuto", null);
|
|
405
|
+
s(this, "_ocultoAuto", !1);
|
|
406
|
+
s(this, "_sincronizando", !1);
|
|
407
|
+
const e = this.attachShadow({ mode: "open" });
|
|
408
|
+
e.innerHTML = `
|
|
409
|
+
<style>${be}</style>
|
|
410
|
+
<div class="ui-avatar" part="base">
|
|
411
|
+
<span class="ui-avatar__content" part="conteudo"></span>
|
|
412
|
+
</div>
|
|
413
|
+
<span class="ui-avatar__status" part="status" style="display: none;"></span>
|
|
414
|
+
`, this.avatarElement = e.querySelector(".ui-avatar"), this.statusElement = e.querySelector(".ui-avatar__status");
|
|
415
|
+
}
|
|
416
|
+
static get observedAttributes() {
|
|
417
|
+
return [
|
|
418
|
+
"src",
|
|
419
|
+
"nome",
|
|
420
|
+
"name",
|
|
421
|
+
"tamanho",
|
|
422
|
+
"size",
|
|
423
|
+
"formato",
|
|
424
|
+
"status",
|
|
425
|
+
"aria-label",
|
|
426
|
+
...U
|
|
427
|
+
];
|
|
428
|
+
}
|
|
429
|
+
connectedCallback() {
|
|
430
|
+
this.syncState();
|
|
431
|
+
}
|
|
432
|
+
attributeChangedCallback(e, t, a) {
|
|
433
|
+
this._sincronizando || this.syncState();
|
|
434
|
+
}
|
|
435
|
+
/** Iniciais por ponto de código (emoji e caracteres fora do BMP não são cortados ao meio). */
|
|
436
|
+
extrairIniciais(e) {
|
|
437
|
+
const t = e.trim().split(/\s+/).filter(Boolean);
|
|
438
|
+
if (t.length === 0) return "?";
|
|
439
|
+
if (t.length === 1)
|
|
440
|
+
return Array.from(t[0]).slice(0, 2).join("").toUpperCase();
|
|
441
|
+
const a = Array.from(t[0])[0], r = Array.from(t[t.length - 1])[0];
|
|
442
|
+
return (a + r).toUpperCase();
|
|
443
|
+
}
|
|
444
|
+
lerNome() {
|
|
445
|
+
return this.getAttribute("nome") || this.getAttribute("name") || "";
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Nome acessível: com nome, o host é uma imagem nomeada ("Ana, online"); sem nome, é decorativo.
|
|
449
|
+
* Um `aria-label`/`aria-hidden` definido pelo consumidor nunca é sobrescrito.
|
|
450
|
+
*/
|
|
451
|
+
sincronizarAcessibilidade(e, t) {
|
|
452
|
+
const a = this.getAttribute("aria-label"), r = a !== null && a !== this._rotuloAuto, n = this.hasAttribute("aria-hidden") && !this._ocultoAuto;
|
|
453
|
+
if (!(r || n)) {
|
|
454
|
+
if (this._sincronizando = !0, e) {
|
|
455
|
+
const l = t ? `${e}, ${t}` : e;
|
|
456
|
+
this.setAttribute("role", "img"), this.setAttribute("aria-label", l), this._rotuloAuto = l, this.removeAttribute("aria-hidden"), this._ocultoAuto = !1;
|
|
457
|
+
} else
|
|
458
|
+
this._rotuloAuto !== null && this.removeAttribute("aria-label"), this._rotuloAuto = null, this.removeAttribute("role"), this.setAttribute("aria-hidden", "true"), this._ocultoAuto = !0;
|
|
459
|
+
this._sincronizando = !1;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
syncState() {
|
|
463
|
+
const e = this.getAttribute("src"), t = this.lerNome(), a = (this.getAttribute("tamanho") || this.getAttribute("size") || "md").trim().toLowerCase(), r = this.getAttribute("formato"), n = w(this.getAttribute("status"), fe);
|
|
464
|
+
this.avatarElement.className = "ui-avatar";
|
|
465
|
+
const l = w(a, V), c = parseInt(a, 10);
|
|
466
|
+
l ? (this.avatarElement.classList.add(`ui-avatar--${l}`), this.avatarElement.style.removeProperty("--ui-tamanho-avatar")) : Number.isFinite(c) && c >= xe && c <= _e ? this.avatarElement.style.setProperty("--ui-tamanho-avatar", `${c}px`) : (this.avatarElement.classList.add(`ui-avatar--${A(null, V, "md")}`), this.avatarElement.style.removeProperty("--ui-tamanho-avatar")), r === "quadrado" ? this.avatarElement.classList.add("ui-avatar--quadrado") : (r === "squarecircle" || r === "squarecircles" || r === "squircle") && this.avatarElement.classList.add("ui-avatar--squarecircle"), q(this, this.avatarElement);
|
|
467
|
+
const d = this.avatarElement.querySelector(".ui-avatar__content");
|
|
468
|
+
if (d)
|
|
469
|
+
if (e) {
|
|
470
|
+
const u = d.querySelector("img");
|
|
471
|
+
if (u && u.getAttribute("src") === e)
|
|
472
|
+
u.alt = "";
|
|
473
|
+
else {
|
|
474
|
+
d.textContent = "";
|
|
475
|
+
const h = document.createElement("img");
|
|
476
|
+
h.className = "ui-avatar__img", h.src = e, h.alt = "", h.onerror = () => {
|
|
477
|
+
this.renderFallback(d, this.lerNome());
|
|
478
|
+
}, d.appendChild(h);
|
|
479
|
+
}
|
|
480
|
+
} else
|
|
481
|
+
d.textContent = "", this.renderFallback(d, t);
|
|
482
|
+
this.sincronizarAcessibilidade(t, n), n ? (this.statusElement.className = `ui-avatar__status ui-avatar__status--${n}`, this.statusElement.style.display = "block", this.statusElement.setAttribute("aria-hidden", "true")) : this.statusElement.style.display = "none";
|
|
483
|
+
}
|
|
484
|
+
renderFallback(e, t) {
|
|
485
|
+
t ? e.textContent = this.extrairIniciais(t) : e.innerHTML = `
|
|
486
|
+
<svg viewBox="0 0 24 24" width="60%" height="60%" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
487
|
+
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
488
|
+
<circle cx="12" cy="7" r="4"></circle>
|
|
489
|
+
</svg>
|
|
490
|
+
`;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
f("ui-avatar", Ae);
|
|
494
|
+
class ye {
|
|
495
|
+
constructor(o, e) {
|
|
496
|
+
s(this, "rafId", null);
|
|
497
|
+
s(this, "resizeObserver");
|
|
498
|
+
this.trackElement = o, this.indicadorElement = e;
|
|
499
|
+
}
|
|
500
|
+
iniciarObserver(o, e) {
|
|
501
|
+
typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(() => {
|
|
502
|
+
this.atualizar(), e && e();
|
|
503
|
+
}), this.resizeObserver.observe(o));
|
|
504
|
+
}
|
|
505
|
+
destruir() {
|
|
506
|
+
this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = void 0), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
507
|
+
}
|
|
508
|
+
atualizar() {
|
|
509
|
+
this.rafId !== null && cancelAnimationFrame(this.rafId), this.rafId = requestAnimationFrame(() => {
|
|
510
|
+
this.rafId = null;
|
|
511
|
+
const o = this.trackElement.querySelector(".ui-segmented__item--ativo");
|
|
512
|
+
if (!o) {
|
|
513
|
+
this.indicadorElement.style.opacity = "0";
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
const e = this.indicadorElement.parentElement, t = o.getBoundingClientRect(), a = e == null ? void 0 : e.getBoundingClientRect();
|
|
517
|
+
let r, n;
|
|
518
|
+
if (e && a && t.width > 0 && a.width > 0) {
|
|
519
|
+
const l = e.clientLeft || 0;
|
|
520
|
+
r = Number((t.left - a.left - l).toFixed(2)), n = Number(t.width.toFixed(2));
|
|
521
|
+
} else
|
|
522
|
+
r = Math.round(o.offsetLeft), n = Math.round(o.offsetWidth);
|
|
523
|
+
this.indicadorElement.style.transform = `translateX(${r}px)`, this.indicadorElement.style.width = `${n}px`, this.indicadorElement.style.opacity = "1";
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
function Ee(i, o, e, t) {
|
|
528
|
+
if (e) return;
|
|
529
|
+
const a = Array.from(
|
|
530
|
+
o.querySelectorAll(".ui-segmented__item:not(:disabled)")
|
|
531
|
+
);
|
|
532
|
+
if (a.length === 0) return;
|
|
533
|
+
const r = a.findIndex((c) => c.classList.contains("ui-segmented__item--ativo"));
|
|
534
|
+
let n = r;
|
|
535
|
+
if (i.key === "ArrowRight" || i.key === "ArrowDown")
|
|
536
|
+
i.preventDefault(), n = (r + 1) % a.length;
|
|
537
|
+
else if (i.key === "ArrowLeft" || i.key === "ArrowUp")
|
|
538
|
+
i.preventDefault(), n = (r - 1 + a.length) % a.length;
|
|
539
|
+
else if (i.key === "Home")
|
|
540
|
+
i.preventDefault(), n = 0;
|
|
541
|
+
else if (i.key === "End")
|
|
542
|
+
i.preventDefault(), n = a.length - 1;
|
|
543
|
+
else
|
|
544
|
+
return;
|
|
545
|
+
const l = a[n];
|
|
546
|
+
if (l && l.dataset.indice) {
|
|
547
|
+
const c = parseInt(l.dataset.indice, 10);
|
|
548
|
+
t(c);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
const we = ':host{display:inline-flex;vertical-align:middle;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([largura-total]),:host([full-width]){display:block;width:100%}.ui-segmented{--_altura: var(--ui-campo-altura, 34px);--_moldura: 3px;display:inline-flex;position:relative;height:var(--_altura);background:var(--ui-degrade-interno, var(--ui-segmented-fundo, var(--ui-fundo-superficie, var(--ui-cor-fundo, #0b0b0d))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);padding:var(--_moldura);box-sizing:border-box;-webkit-user-select:none;user-select:none;gap:2px;align-items:center}.ui-segmented--full{display:flex;width:100%}.ui-segmented--full .ui-segmented__item{flex:1}.ui-segmented--sm{--_moldura: 2px}.ui-segmented--sm .ui-segmented__item{font-size:12px;padding:0 8px}.ui-segmented--md .ui-segmented__item{font-size:13px;padding:0 14px}.ui-segmented--lg{--_moldura: 4px}.ui-segmented--lg .ui-segmented__item{font-size:14px;padding:0 18px}.ui-segmented__indicador{position:absolute;top:var(--_moldura);bottom:var(--_moldura);left:0;box-sizing:border-box;background:var(--ui-segmented-indicador-fundo, var(--ui-fundo-card, var(--ui-cor-fundo-card, #1e1e24)));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:calc(var(--ui-raio-borda, 8px) - 2px);box-shadow:var(--ui-sombra-sm, 0 2px 8px rgba(0, 0, 0, .4));pointer-events:none;transition:transform .22s cubic-bezier(.16,1,.3,1),width .22s cubic-bezier(.16,1,.3,1),opacity .15s ease;z-index:1;opacity:0}.ui-segmented__item{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;gap:6px;background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-family:inherit;font-weight:500;cursor:pointer;border-radius:calc(var(--ui-raio-borda, 8px) - 2px);line-height:1;white-space:nowrap;transition:color .15s ease;box-sizing:border-box;height:calc(var(--_altura) - 2px - 2 * var(--_moldura))}.ui-segmented__item:hover:not(:disabled){color:var(--ui-cor-texto, #e1e1e6)}.ui-segmented__item--ativo{color:var(--ui-cor-texto, #ffffff)!important;font-weight:600}.ui-segmented__item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-cor-primaria, #00E08A)}.ui-segmented__item:disabled{opacity:.35;cursor:not-allowed}.ui-segmented__icone{display:inline-flex;align-items:center;justify-content:center;line-height:1}.ui-segmented__icone ui-icone,.ui-segmented__icone svg{shape-rendering:geometricPrecision;display:inline-flex;align-items:center;justify-content:center}@media (max-width: 640px){.ui-segmented{--_altura: max(var(--ui-campo-altura, 34px), 38px)}}:host(.degrade),:host(.ui-degrade),:host(.gradiente),:host(.ui-gradiente),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])){--ui-fundo-superficie: var(--ui-gradiente-superficie);--ui-fundo-card: var(--ui-gradiente-card)}', Ce = [
|
|
552
|
+
"valor",
|
|
553
|
+
"value",
|
|
554
|
+
"name",
|
|
555
|
+
"disabled",
|
|
556
|
+
"tamanho",
|
|
557
|
+
"size",
|
|
558
|
+
"densidade",
|
|
559
|
+
"altura",
|
|
560
|
+
"height",
|
|
561
|
+
"largura-total",
|
|
562
|
+
"full-width",
|
|
563
|
+
"obrigatorio",
|
|
564
|
+
"required",
|
|
565
|
+
"mensagem-validacao",
|
|
566
|
+
...U
|
|
567
|
+
];
|
|
568
|
+
function ke() {
|
|
569
|
+
return `
|
|
570
|
+
<style>${we}</style>
|
|
571
|
+
<div class="ui-segmented ui-segmented--md" part="base" role="radiogroup">
|
|
572
|
+
<div class="ui-segmented__indicador" part="indicador"></div>
|
|
573
|
+
<div class="ui-segmented__track" style="display: contents;"></div>
|
|
574
|
+
<slot style="display: none;"></slot>
|
|
575
|
+
</div>
|
|
576
|
+
`;
|
|
577
|
+
}
|
|
578
|
+
function Se(i, o, e, t, a) {
|
|
579
|
+
const r = document.createElement("button");
|
|
580
|
+
r.type = "button", r.role = "radio", r.className = "ui-segmented__item", r.setAttribute("part", i.valor === e ? "opcao opcao-selecionada" : "opcao"), r.dataset.valor = i.valor, r.dataset.indice = String(o);
|
|
581
|
+
const n = i.valor === e;
|
|
582
|
+
if (r.setAttribute("aria-checked", String(n)), r.tabIndex = n ? 0 : -1, n && r.classList.add("ui-segmented__item--ativo"), (t || i.disabled) && (r.disabled = !0), i.icone) {
|
|
583
|
+
const c = document.createElement("span");
|
|
584
|
+
c.className = "ui-segmented__icone";
|
|
585
|
+
const d = document.createElement("ui-icone");
|
|
586
|
+
d.setAttribute("nome", i.icone), d.setAttribute("tamanho", "14"), c.appendChild(d), r.appendChild(c);
|
|
587
|
+
}
|
|
588
|
+
const l = document.createElement("span");
|
|
589
|
+
return l.className = "ui-segmented__texto", l.textContent = i.rotulo, r.appendChild(l), r.addEventListener("click", (c) => {
|
|
590
|
+
c.stopPropagation(), a();
|
|
591
|
+
}), r;
|
|
592
|
+
}
|
|
593
|
+
class X extends H {
|
|
594
|
+
constructor() {
|
|
595
|
+
super();
|
|
596
|
+
s(this, "rootElement");
|
|
597
|
+
s(this, "trackElement");
|
|
598
|
+
s(this, "indicadorElement");
|
|
599
|
+
s(this, "slotElement");
|
|
600
|
+
s(this, "_opcoes", []);
|
|
601
|
+
s(this, "_defaultValue", "");
|
|
602
|
+
s(this, "listeners", new j());
|
|
603
|
+
s(this, "indicadorController");
|
|
604
|
+
s(this, "handleSlotChange", () => {
|
|
605
|
+
this._opcoes.length === 0 && this.carregarOpcoes();
|
|
606
|
+
});
|
|
607
|
+
s(this, "handleKeyDown", (e) => {
|
|
608
|
+
Ee(e, this.trackElement, this.disabled, (t) => {
|
|
609
|
+
this.selecionarIndice(t);
|
|
610
|
+
});
|
|
611
|
+
});
|
|
612
|
+
const e = this.attachShadow({ mode: "open" });
|
|
613
|
+
e.innerHTML = ke(), this.rootElement = e.querySelector(".ui-segmented"), this.indicadorElement = e.querySelector(".ui-segmented__indicador"), this.trackElement = e.querySelector(".ui-segmented__track"), this.slotElement = e.querySelector("slot"), this.indicadorController = new ye(
|
|
614
|
+
this.trackElement,
|
|
615
|
+
this.indicadorElement
|
|
616
|
+
);
|
|
617
|
+
}
|
|
618
|
+
static get observedAttributes() {
|
|
619
|
+
return Ce;
|
|
620
|
+
}
|
|
621
|
+
connectedCallback() {
|
|
622
|
+
this.listeners.cleanup(), this.listeners.add(this.rootElement, "keydown", this.handleKeyDown), this.listeners.add(this.slotElement, "slotchange", this.handleSlotChange), this._defaultValue || (this._defaultValue = this.getAttribute("valor") || this.getAttribute("value") || ""), this.indicadorController.iniciarObserver(this.rootElement), this.carregarOpcoes(), this.syncState();
|
|
623
|
+
}
|
|
624
|
+
disconnectedCallback() {
|
|
625
|
+
this.listeners.cleanup(), this.indicadorController.destruir();
|
|
626
|
+
}
|
|
627
|
+
attributeChangedCallback(e, t, a) {
|
|
628
|
+
t !== a && (e === "valor" || e === "value" ? this.atualizarSelecao(a || "") : this.syncState());
|
|
629
|
+
}
|
|
630
|
+
// === Ciclo de Vida Form-Associated Custom Elements (W3C FACE) ===
|
|
631
|
+
formResetCallback() {
|
|
632
|
+
this.valor = this._defaultValue, this.syncState();
|
|
633
|
+
}
|
|
634
|
+
formStateRestoreCallback(e, t) {
|
|
635
|
+
typeof e == "string" && (this.valor = e), this.syncState();
|
|
636
|
+
}
|
|
637
|
+
get type() {
|
|
638
|
+
return "select-one";
|
|
639
|
+
}
|
|
640
|
+
atualizarValidade() {
|
|
641
|
+
if (!this.internals || typeof this.internals.setValidity != "function") return;
|
|
642
|
+
if (this.disabled) {
|
|
643
|
+
this.internals.setValidity({});
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
if (this._customErrorMessage) {
|
|
647
|
+
this.internals.setValidity({ customError: !0 }, this._customErrorMessage, this.rootElement);
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
if ((this.hasAttribute("obrigatorio") || this.hasAttribute("required")) && (!this.valor || this.valor.trim() === "")) {
|
|
651
|
+
const t = this.getAttribute("mensagem-validacao") || "Selecione uma opção.";
|
|
652
|
+
this.internals.setValidity({ valueMissing: !0 }, t, this.rootElement);
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
this.internals.setValidity({});
|
|
656
|
+
}
|
|
657
|
+
get valor() {
|
|
658
|
+
return this.getAttribute("valor") || this.getAttribute("value") || "";
|
|
659
|
+
}
|
|
660
|
+
set valor(e) {
|
|
661
|
+
this.setAttribute("valor", e), this.atualizarSelecao(e);
|
|
662
|
+
}
|
|
663
|
+
get value() {
|
|
664
|
+
return this.valor;
|
|
665
|
+
}
|
|
666
|
+
set value(e) {
|
|
667
|
+
this.valor = e;
|
|
668
|
+
}
|
|
669
|
+
get name() {
|
|
670
|
+
return this.getAttribute("name") || "";
|
|
671
|
+
}
|
|
672
|
+
set name(e) {
|
|
673
|
+
this.setAttribute("name", e);
|
|
674
|
+
}
|
|
675
|
+
get disabled() {
|
|
676
|
+
return this.hasAttribute("disabled") || this._formDisabled;
|
|
677
|
+
}
|
|
678
|
+
set disabled(e) {
|
|
679
|
+
e ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
680
|
+
}
|
|
681
|
+
get opcoes() {
|
|
682
|
+
return this._opcoes;
|
|
683
|
+
}
|
|
684
|
+
set opcoes(e) {
|
|
685
|
+
this._opcoes = Array.isArray(e) ? e : [], this.renderizarOpcoes();
|
|
686
|
+
}
|
|
687
|
+
carregarOpcoes() {
|
|
688
|
+
const e = this.slotElement.assignedElements();
|
|
689
|
+
if (e.length > 0) {
|
|
690
|
+
const t = [];
|
|
691
|
+
e.forEach((a) => {
|
|
692
|
+
var r, n;
|
|
693
|
+
if (a instanceof HTMLElement) {
|
|
694
|
+
const l = a.getAttribute("valor") || a.getAttribute("value") || a.getAttribute("data-value") || ((r = a.textContent) == null ? void 0 : r.trim()) || "", c = a.getAttribute("label") || a.getAttribute("rotulo") || ((n = a.textContent) == null ? void 0 : n.trim()) || l, d = a.getAttribute("icone") || a.getAttribute("icon") || void 0, u = a.hasAttribute("disabled");
|
|
695
|
+
t.push({ valor: l, rotulo: c, icone: d, disabled: u });
|
|
696
|
+
}
|
|
697
|
+
}), this._opcoes = t, this.renderizarOpcoes();
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
renderizarOpcoes() {
|
|
701
|
+
this.trackElement.innerHTML = "";
|
|
702
|
+
const e = this.valor, t = this.disabled;
|
|
703
|
+
this._opcoes.forEach((r, n) => {
|
|
704
|
+
const l = Se(
|
|
705
|
+
r,
|
|
706
|
+
n,
|
|
707
|
+
e,
|
|
708
|
+
t,
|
|
709
|
+
() => this.selecionarIndice(n)
|
|
710
|
+
);
|
|
711
|
+
this.trackElement.appendChild(l);
|
|
712
|
+
});
|
|
713
|
+
const a = this.required || this.hasAttribute("sem-selecao-inicial");
|
|
714
|
+
!e && this._opcoes.length > 0 && !a ? this.selecionarIndice(0, !1) : this.indicadorController.atualizar(), this.atualizarValidade();
|
|
715
|
+
}
|
|
716
|
+
selecionarIndice(e, t = !0) {
|
|
717
|
+
var n, l;
|
|
718
|
+
if (this.disabled) return;
|
|
719
|
+
const a = this._opcoes[e];
|
|
720
|
+
if (!a || a.disabled) return;
|
|
721
|
+
const r = this.valor;
|
|
722
|
+
this.setAttribute("valor", a.valor), this.internals && ((l = (n = this.internals).setFormValue) == null || l.call(n, a.valor)), this.atualizarSelecao(a.valor), t && r !== a.valor && (this.dispatchEvent(
|
|
723
|
+
new CustomEvent("ui-change", {
|
|
724
|
+
detail: { valor: a.valor, rotulo: a.rotulo, indice: e },
|
|
725
|
+
bubbles: !0,
|
|
726
|
+
composed: !0
|
|
727
|
+
})
|
|
728
|
+
), this.dispatchEvent(
|
|
729
|
+
new CustomEvent("ui-selecionar", {
|
|
730
|
+
detail: { valor: a.valor, rotulo: a.rotulo, indice: e },
|
|
731
|
+
bubbles: !0,
|
|
732
|
+
composed: !0
|
|
733
|
+
})
|
|
734
|
+
));
|
|
735
|
+
}
|
|
736
|
+
atualizarSelecao(e) {
|
|
737
|
+
var a, r;
|
|
738
|
+
Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((n) => {
|
|
739
|
+
const l = n.dataset.valor === e;
|
|
740
|
+
n.classList.toggle("ui-segmented__item--ativo", l), ee(n, "opcao-selecionada", l), n.setAttribute("aria-checked", String(l)), n.tabIndex = l ? 0 : -1, l && n.focus();
|
|
741
|
+
}), this.internals && ((r = (a = this.internals).setFormValue) == null || r.call(a, e)), this.indicadorController.atualizar(), this.atualizarValidade();
|
|
742
|
+
}
|
|
743
|
+
syncState() {
|
|
744
|
+
P(this);
|
|
745
|
+
const e = te(
|
|
746
|
+
this.getAttribute("tamanho") ?? this.getAttribute("size") ?? this.getAttribute("densidade")
|
|
747
|
+
) ?? "md", t = this.hasAttribute("largura-total") || this.hasAttribute("full-width"), a = this.disabled;
|
|
748
|
+
this.rootElement.className = `ui-segmented ui-segmented--${e}`, t && this.rootElement.classList.add("ui-segmented--full"), q(this, this.rootElement), this.rootElement.setAttribute("aria-disabled", String(a)), Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((n) => {
|
|
749
|
+
n.disabled = a;
|
|
750
|
+
}), this.indicadorController.atualizar(), this.atualizarValidade();
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
class Ie extends X {
|
|
754
|
+
}
|
|
755
|
+
f("ui-segmented", X);
|
|
756
|
+
f("ui-segmento", Ie);
|
|
757
|
+
const ze = `:host{display:block;box-sizing:border-box;container-type:inline-size;font-family:var(--ui-fonte-base, "Inter", sans-serif);--_cor: var(--ui-calendario-cor, var(--ui-cor-primaria, #00e08a));--_cor-texto: var(--ui-calendario-cor-texto, var(--ui-cor-texto-sobre-primaria, #000))}:host([hidden]){display:none}.ui-calendario{display:flex;flex-direction:column;color:var(--ui-cor-texto, #e1e1e6);border-radius:var(--ui-calendario-raio, 28px);background:var(--ui-calendario-moldura, linear-gradient(160deg, color-mix(in srgb, var(--_cor) 92%, #fff), var(--_cor)));box-shadow:0 18px 40px -18px color-mix(in srgb,var(--_cor) 55%,transparent),var(--ui-sombra-sm, 0 2px 6px rgba(0, 0, 0, .3));overflow:hidden}.ui-calendario__cabecalho{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px 14px;color:var(--_cor-texto)}.ui-calendario__titulo{font-size:.95rem;font-weight:700;letter-spacing:.01em;margin-right:auto}.ui-calendario__nav{display:inline-flex;align-items:center;gap:6px;margin-left:auto}.ui-calendario__nav-btn,.ui-calendario__hoje{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;font:inherit;color:inherit;cursor:pointer;background:color-mix(in srgb,var(--_cor-texto) 14%,transparent);transition:background .15s ease,transform .15s ease}.ui-calendario__nav-btn{width:34px;height:34px;border-radius:50%;display:inline-grid;place-items:center}.ui-calendario__nav-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.ui-calendario__hoje{height:34px;padding:0 14px;border-radius:9999px;font-size:.8rem;font-weight:600}.ui-calendario__nav-btn:hover,.ui-calendario__hoje:hover{background:color-mix(in srgb,var(--_cor-texto) 26%,transparent)}.ui-calendario__nav-btn:active,.ui-calendario__hoje:active{transform:scale(.95)}.ui-calendario__nav-btn:focus-visible,.ui-calendario__hoje:focus-visible,.ui-calendario__select:focus-visible,.ui-calendario__dia:focus-visible{outline:2px solid var(--ui-cor-primaria, #00e08a);outline-offset:2px}.ui-calendario__cabecalho .ui-calendario__nav-btn:focus-visible,.ui-calendario__cabecalho .ui-calendario__hoje:focus-visible{outline-color:var(--_cor-texto)}.ui-calendario__corpo{margin:0 6px 6px;padding:14px 14px 16px;border-radius:calc(var(--ui-calendario-raio, 28px) - 6px);background:var(--ui-calendario-fundo, var(--ui-cor-superficie, #141417))}.ui-calendario__seletores{display:flex;justify-content:center;gap:8px;margin-bottom:12px}.ui-calendario__select{-webkit-appearance:none;-moz-appearance:none;appearance:none;font:inherit;font-size:.85rem;font-weight:600;color:var(--ui-cor-texto, #e1e1e6);background-color:var(--ui-cor-fundo-recuado, rgba(127, 127, 127, .14));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:9999px;padding:6px 28px 6px 14px;cursor:pointer;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239696a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");background-repeat:no-repeat;background-position:right 9px center;background-size:13px}.ui-calendario__select option{color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-superficie, #141417)}.ui-calendario__semana,.ui-calendario__linha{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.ui-calendario__semana{margin-bottom:6px}.ui-calendario__semana-dia{text-align:center;font-size:.7rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ui-cor-texto-secundario, #9696a6);padding:4px 0}.ui-calendario__grade{display:flex;flex-direction:column;gap:4px}.ui-calendario__dia{-webkit-appearance:none;-moz-appearance:none;appearance:none;font:inherit;color:inherit;text-align:left;cursor:pointer;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:6px 7px;min-height:92px;border-radius:14px;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent);transition:background .15s ease,border-color .15s ease,transform .15s ease}.ui-calendario__dia:hover{background:color-mix(in srgb,var(--_cor) 12%,transparent);border-color:color-mix(in srgb,var(--_cor) 40%,transparent)}.ui-calendario__dia--fora{opacity:.38}.ui-calendario__dia--fim-semana:not(.ui-calendario__dia--selecionado) .ui-calendario__numero{color:var(--ui-cor-texto-secundario, #9696a6)}.ui-calendario__numero{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 4px;border-radius:9999px;font-size:.82rem;font-weight:600;font-variant-numeric:tabular-nums}.ui-calendario__dia--hoje .ui-calendario__numero{box-shadow:inset 0 0 0 2px var(--_cor);color:var(--ui-cor-texto, #e1e1e6)}.ui-calendario__dia--selecionado{border-color:var(--_cor);background:color-mix(in srgb,var(--_cor) 16%,transparent)}.ui-calendario__dia--selecionado .ui-calendario__numero{background:var(--_cor);color:var(--_cor-texto);box-shadow:0 4px 10px -3px color-mix(in srgb,var(--_cor) 70%,transparent)}.ui-calendario__eventos{display:flex;flex-direction:column;gap:3px;width:100%;min-width:0}.ui-calendario__evento{--_ev: var(--ui-calendario-evento-cor, var(--_cor));display:block;width:100%;box-sizing:border-box;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.7rem;font-weight:600;line-height:1.25;padding:2px 7px;border-radius:9999px;color:var(--_ev);background:color-mix(in srgb,var(--_ev) 16%,transparent);box-shadow:inset 3px 0 0 var(--_ev);transition:background .15s ease}.ui-calendario__evento:hover{background:color-mix(in srgb,var(--_ev) 28%,transparent)}.ui-calendario__mais{font-size:.68rem;font-weight:700;color:var(--ui-cor-texto-secundario, #9696a6);padding-left:4px}.ui-calendario__pontos{display:none;gap:3px;justify-content:center;width:100%;min-height:6px}.ui-calendario__ponto{width:6px;height:6px;border-radius:50%;background:var(--ui-calendario-evento-cor, var(--_cor))}.ui-calendario[data-exibicao=compacto] .ui-calendario__dia{min-height:0;aspect-ratio:1;align-items:center;justify-content:center;gap:2px;padding:4px;border-radius:50%;border-color:transparent;background:transparent}.ui-calendario[data-exibicao=compacto] .ui-calendario__eventos,.ui-calendario[data-exibicao=compacto] .ui-calendario__mais{display:none}.ui-calendario[data-exibicao=compacto] .ui-calendario__pontos{display:flex}.ui-calendario[data-exibicao=compacto] .ui-calendario__dia--selecionado{background:transparent}@container (max-width: 560px){.ui-calendario__dia{min-height:58px;align-items:center;padding:5px 2px;border-radius:12px}.ui-calendario__eventos{display:none}.ui-calendario__pontos{display:flex}.ui-calendario__corpo{padding:10px 8px 12px}.ui-calendario__semana,.ui-calendario__linha,.ui-calendario__grade{gap:3px}}.ui-calendario[data-variante=simples]{background:var(--ui-calendario-fundo, var(--ui-cor-superficie, #141417));box-shadow:var(--ui-sombra-sm, 0 2px 6px rgba(0, 0, 0, .3));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-calendario[data-variante=simples] .ui-calendario__cabecalho{color:var(--ui-cor-texto, #e1e1e6)}.ui-calendario[data-variante=simples] .ui-calendario__nav-btn,.ui-calendario[data-variante=simples] .ui-calendario__hoje{background:var(--ui-cor-fundo-recuado, rgba(127, 127, 127, .14))}.ui-calendario[data-variante=simples] .ui-calendario__corpo{margin:0;background:transparent}@media (prefers-reduced-motion: reduce){.ui-calendario *{transition:none!important}}`, Te = /^(\d{4})-(\d{2})-(\d{2})(?:$|[T\s])/, De = /^(\d{4})-(\d{2})$/;
|
|
758
|
+
function N(i, o) {
|
|
759
|
+
return new Date(Date.UTC(i, o, 0)).getUTCDate();
|
|
760
|
+
}
|
|
761
|
+
function Me(i, o, e) {
|
|
762
|
+
return i >= 1 && i <= 9999 && o >= 1 && o <= 12 && e >= 1 && e <= N(i, o);
|
|
763
|
+
}
|
|
764
|
+
function O(i) {
|
|
765
|
+
return i < 10 ? `0${i}` : String(i);
|
|
766
|
+
}
|
|
767
|
+
function b({ ano: i, mes: o, dia: e }) {
|
|
768
|
+
return `${String(i).padStart(4, "0")}-${O(o)}-${O(e)}`;
|
|
769
|
+
}
|
|
770
|
+
function D(i, o) {
|
|
771
|
+
return `${String(i).padStart(4, "0")}-${O(o)}`;
|
|
772
|
+
}
|
|
773
|
+
function _(i) {
|
|
774
|
+
if (typeof i != "string") return null;
|
|
775
|
+
const o = Te.exec(i.trim());
|
|
776
|
+
if (!o) return null;
|
|
777
|
+
const e = Number(o[1]), t = Number(o[2]), a = Number(o[3]);
|
|
778
|
+
return Me(e, t, a) ? { ano: e, mes: t, dia: a } : null;
|
|
779
|
+
}
|
|
780
|
+
function S(i) {
|
|
781
|
+
if (typeof i != "string") return null;
|
|
782
|
+
const o = i.trim(), e = De.exec(o);
|
|
783
|
+
if (e) {
|
|
784
|
+
const a = Number(e[1]), r = Number(e[2]);
|
|
785
|
+
return a >= 1 && a <= 9999 && r >= 1 && r <= 12 ? { ano: a, mes: r } : null;
|
|
786
|
+
}
|
|
787
|
+
const t = _(o);
|
|
788
|
+
return t ? { ano: t.ano, mes: t.mes } : null;
|
|
789
|
+
}
|
|
790
|
+
function I(i = /* @__PURE__ */ new Date()) {
|
|
791
|
+
return { ano: i.getFullYear(), mes: i.getMonth() + 1, dia: i.getDate() };
|
|
792
|
+
}
|
|
793
|
+
function x(i, o) {
|
|
794
|
+
const e = new Date(Date.UTC(i.ano, i.mes - 1, i.dia + o));
|
|
795
|
+
return { ano: e.getUTCFullYear(), mes: e.getUTCMonth() + 1, dia: e.getUTCDate() };
|
|
796
|
+
}
|
|
797
|
+
function L(i, o) {
|
|
798
|
+
const e = i.ano * 12 + (i.mes - 1) + o, t = Math.floor(e / 12), a = (e % 12 + 12) % 12 + 1;
|
|
799
|
+
return t < 1 || t > 9999 ? i : { ano: t, mes: a, dia: Math.min(i.dia, N(t, a)) };
|
|
800
|
+
}
|
|
801
|
+
function z(i) {
|
|
802
|
+
return new Date(Date.UTC(i.ano, i.mes - 1, i.dia)).getUTCDay();
|
|
803
|
+
}
|
|
804
|
+
function Pe(i, o, e = 1, t = 6) {
|
|
805
|
+
const a = e >= 0 && e <= 6 ? Math.trunc(e) : 1, r = { ano: i, mes: o, dia: 1 }, n = (z(r) - a + 7) % 7, l = [];
|
|
806
|
+
for (let c = 0; c < t * 7; c++) {
|
|
807
|
+
const d = x(r, c - n);
|
|
808
|
+
l.push({ ...d, iso: b(d), doMes: d.ano === i && d.mes === o, diaSemana: z(d) });
|
|
809
|
+
}
|
|
810
|
+
return l;
|
|
811
|
+
}
|
|
812
|
+
function M(i) {
|
|
813
|
+
const o = /* @__PURE__ */ new Map();
|
|
814
|
+
if (!Array.isArray(i)) return o;
|
|
815
|
+
for (const e of i) {
|
|
816
|
+
if (!e || typeof e != "object") continue;
|
|
817
|
+
const t = e, a = _(t.data);
|
|
818
|
+
if (!a) continue;
|
|
819
|
+
const r = b(a), n = o.get(r);
|
|
820
|
+
n ? n.push(t) : o.set(r, [t]);
|
|
821
|
+
}
|
|
822
|
+
return o;
|
|
823
|
+
}
|
|
824
|
+
function K(i) {
|
|
825
|
+
try {
|
|
826
|
+
const o = new Intl.DateTimeFormat(i, { month: "long", timeZone: "UTC" });
|
|
827
|
+
return Array.from({ length: 12 }, (e, t) => J(o.format(new Date(Date.UTC(2021, t, 15)))));
|
|
828
|
+
} catch {
|
|
829
|
+
return K("pt-BR");
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
function Z(i, o, e = "short") {
|
|
833
|
+
const t = [];
|
|
834
|
+
try {
|
|
835
|
+
const a = new Intl.DateTimeFormat(i, { weekday: e, timeZone: "UTC" });
|
|
836
|
+
for (let r = 0; r < 7; r++) {
|
|
837
|
+
const n = (o + r) % 7;
|
|
838
|
+
t.push(a.format(new Date(Date.UTC(2021, 7, 1 + n))).replace(/\.$/, ""));
|
|
839
|
+
}
|
|
840
|
+
return t;
|
|
841
|
+
} catch {
|
|
842
|
+
return Z("pt-BR", o, e);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
function J(i) {
|
|
846
|
+
return i && i.charAt(0).toLocaleUpperCase() + i.slice(1);
|
|
847
|
+
}
|
|
848
|
+
function Oe(i, o, e, t = !1) {
|
|
849
|
+
switch (i) {
|
|
850
|
+
case "ArrowLeft":
|
|
851
|
+
return x(o, -1);
|
|
852
|
+
case "ArrowRight":
|
|
853
|
+
return x(o, 1);
|
|
854
|
+
case "ArrowUp":
|
|
855
|
+
return x(o, -7);
|
|
856
|
+
case "ArrowDown":
|
|
857
|
+
return x(o, 7);
|
|
858
|
+
case "PageUp":
|
|
859
|
+
return L(o, t ? -12 : -1);
|
|
860
|
+
case "PageDown":
|
|
861
|
+
return L(o, t ? 12 : 1);
|
|
862
|
+
case "Home":
|
|
863
|
+
return x(o, -((z(o) - e + 7) % 7));
|
|
864
|
+
case "End":
|
|
865
|
+
return x(o, 6 - (z(o) - e + 7) % 7);
|
|
866
|
+
default:
|
|
867
|
+
return null;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
const Le = [
|
|
871
|
+
"mes",
|
|
872
|
+
"valor",
|
|
873
|
+
"value",
|
|
874
|
+
"titulo",
|
|
875
|
+
"locale",
|
|
876
|
+
"inicio-semana",
|
|
877
|
+
"selecao",
|
|
878
|
+
"exibicao",
|
|
879
|
+
"variante",
|
|
880
|
+
"eventos",
|
|
881
|
+
"max-eventos"
|
|
882
|
+
];
|
|
883
|
+
function Ue() {
|
|
884
|
+
return `
|
|
885
|
+
<div class="ui-calendario" part="base">
|
|
886
|
+
<div class="ui-calendario__cabecalho" part="cabecalho">
|
|
887
|
+
<span class="ui-calendario__titulo" part="titulo"></span>
|
|
888
|
+
<div class="ui-calendario__nav" part="nav">
|
|
889
|
+
<button type="button" class="ui-calendario__nav-btn" data-acao="anterior" part="nav-botao" aria-label="Mês anterior">
|
|
890
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 5l-7 7 7 7"/></svg>
|
|
891
|
+
</button>
|
|
892
|
+
<button type="button" class="ui-calendario__hoje" data-acao="hoje" part="hoje-botao">Hoje</button>
|
|
893
|
+
<button type="button" class="ui-calendario__nav-btn" data-acao="proximo" part="nav-botao" aria-label="Próximo mês">
|
|
894
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 5l7 7-7 7"/></svg>
|
|
895
|
+
</button>
|
|
896
|
+
</div>
|
|
897
|
+
</div>
|
|
898
|
+
<div class="ui-calendario__corpo" part="corpo">
|
|
899
|
+
<div class="ui-calendario__seletores" part="seletores">
|
|
900
|
+
<select class="ui-calendario__select" data-seletor="mes" part="select" aria-label="Mês"></select>
|
|
901
|
+
<select class="ui-calendario__select" data-seletor="ano" part="select" aria-label="Ano"></select>
|
|
902
|
+
</div>
|
|
903
|
+
<div class="ui-calendario__semana" part="semana" aria-hidden="true"></div>
|
|
904
|
+
<div class="ui-calendario__grade" part="grade" role="grid"></div>
|
|
905
|
+
</div>
|
|
906
|
+
</div>
|
|
907
|
+
`;
|
|
908
|
+
}
|
|
909
|
+
function $(i) {
|
|
910
|
+
if (typeof i != "string") return null;
|
|
911
|
+
const o = i.trim();
|
|
912
|
+
return !o || /[;{}<>\\]|url\(|\/\*/i.test(o) ? null : o;
|
|
913
|
+
}
|
|
914
|
+
function qe(i, o) {
|
|
915
|
+
const { dia: e, eventos: t } = o, a = i.createElement("button");
|
|
916
|
+
a.type = "button", a.className = "ui-calendario__dia", a.setAttribute("role", "gridcell"), a.dataset.data = e.iso, a.tabIndex = o.foco ? 0 : -1, a.setAttribute("aria-label", o.rotulo), e.doMes || a.classList.add("ui-calendario__dia--fora"), (e.diaSemana === 0 || e.diaSemana === 6) && a.classList.add("ui-calendario__dia--fim-semana"), o.hoje && (a.classList.add("ui-calendario__dia--hoje"), a.setAttribute("aria-current", "date")), o.selecionado && a.classList.add("ui-calendario__dia--selecionado"), a.setAttribute("aria-selected", o.selecionado ? "true" : "false"), t.length && a.classList.add("ui-calendario__dia--com-eventos"), a.setAttribute("part", ["dia", e.doMes ? "" : "dia-fora", o.hoje ? "dia-hoje" : "", o.selecionado ? "dia-selecionado" : "", t.length ? "dia-com-eventos" : ""].filter(Boolean).join(" "));
|
|
917
|
+
const r = i.createElement("span");
|
|
918
|
+
if (r.className = "ui-calendario__numero", r.setAttribute("part", "numero"), r.textContent = String(e.dia), a.appendChild(r), t.length === 0) return a;
|
|
919
|
+
const n = t.slice(0, o.maxEventos), l = t.length - n.length, c = i.createElement("span");
|
|
920
|
+
if (c.className = "ui-calendario__eventos", n.forEach((u, h) => {
|
|
921
|
+
const m = i.createElement("span");
|
|
922
|
+
m.className = "ui-calendario__evento", m.setAttribute("part", "evento"), m.dataset.indice = String(h), u.tipo && (m.dataset.tipo = String(u.tipo));
|
|
923
|
+
const y = $(u.cor);
|
|
924
|
+
y && m.style.setProperty("--ui-calendario-evento-cor", y), m.textContent = typeof u.titulo == "string" ? u.titulo : "", m.title = m.textContent, c.appendChild(m);
|
|
925
|
+
}), l > 0) {
|
|
926
|
+
const u = i.createElement("span");
|
|
927
|
+
u.className = "ui-calendario__mais", u.setAttribute("part", "mais"), u.textContent = `+${l}`, c.appendChild(u);
|
|
928
|
+
}
|
|
929
|
+
a.appendChild(c);
|
|
930
|
+
const d = i.createElement("span");
|
|
931
|
+
return d.className = "ui-calendario__pontos", d.setAttribute("aria-hidden", "true"), t.slice(0, 3).forEach((u) => {
|
|
932
|
+
const h = i.createElement("span");
|
|
933
|
+
h.className = "ui-calendario__ponto";
|
|
934
|
+
const m = $(u.cor);
|
|
935
|
+
m && h.style.setProperty("--ui-calendario-evento-cor", m), d.appendChild(h);
|
|
936
|
+
}), a.appendChild(d), a;
|
|
937
|
+
}
|
|
938
|
+
const je = ["unico", "nenhum"], Ne = ["completo", "compacto"], Re = ["moldura", "simples"];
|
|
939
|
+
class Fe extends C {
|
|
940
|
+
constructor() {
|
|
941
|
+
super();
|
|
942
|
+
s(this, "raiz");
|
|
943
|
+
s(this, "tituloEl");
|
|
944
|
+
s(this, "selectMes");
|
|
945
|
+
s(this, "selectAno");
|
|
946
|
+
s(this, "semanaEl");
|
|
947
|
+
s(this, "gradeEl");
|
|
948
|
+
s(this, "listeners", new j());
|
|
949
|
+
s(this, "_ano");
|
|
950
|
+
s(this, "_mes");
|
|
951
|
+
s(this, "_foco");
|
|
952
|
+
s(this, "_eventos", []);
|
|
953
|
+
s(this, "_porDia", /* @__PURE__ */ new Map());
|
|
954
|
+
s(this, "_eventosAttr", !0);
|
|
955
|
+
s(this, "_conectado", !1);
|
|
956
|
+
// === Handlers ===
|
|
957
|
+
s(this, "aoClicar", (e) => {
|
|
958
|
+
var c;
|
|
959
|
+
const t = e.target;
|
|
960
|
+
if (!t || typeof t.closest != "function") return;
|
|
961
|
+
const a = (c = t.closest("[data-acao]")) == null ? void 0 : c.dataset.acao;
|
|
962
|
+
if (a === "anterior") return this.mesAnterior();
|
|
963
|
+
if (a === "proximo") return this.proximoMes();
|
|
964
|
+
if (a === "hoje") return this.hoje();
|
|
965
|
+
const r = t.closest(".ui-calendario__dia");
|
|
966
|
+
if (!r) return;
|
|
967
|
+
const n = _(r.dataset.data);
|
|
968
|
+
if (!n) return;
|
|
969
|
+
const l = t.closest(".ui-calendario__evento");
|
|
970
|
+
if (l) {
|
|
971
|
+
const d = (this._porDia.get(b(n)) ?? [])[Number(l.dataset.indice)];
|
|
972
|
+
if (d) {
|
|
973
|
+
this.dispatchEvent(new CustomEvent("ui-evento-click", {
|
|
974
|
+
detail: { evento: d, data: b(n) },
|
|
975
|
+
bubbles: !0,
|
|
976
|
+
composed: !0
|
|
977
|
+
}));
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
(n.ano !== this._ano || n.mes !== this._mes) && this.definirFoco(n, !1), this.selecionar(n), this.focarCelula();
|
|
982
|
+
});
|
|
983
|
+
s(this, "aoTeclar", (e) => {
|
|
984
|
+
const t = e;
|
|
985
|
+
if (t.key === "Enter" || t.key === " ") {
|
|
986
|
+
t.preventDefault(), this.selecionar(this._foco), this.focarCelula();
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
const a = Oe(t.key, this._foco, this.inicioSemana, t.shiftKey);
|
|
990
|
+
a && (t.preventDefault(), this.definirFoco(a, !0));
|
|
991
|
+
});
|
|
992
|
+
s(this, "aoMudarSeletor", () => {
|
|
993
|
+
const e = E(this.selectMes.value, 1, 12, this._mes), t = E(this.selectAno.value, 1, 9999, this._ano), a = Math.min(this._foco.dia, N(t, e));
|
|
994
|
+
this.definirFoco({ ano: t, mes: e, dia: a }, !1);
|
|
995
|
+
});
|
|
996
|
+
const e = this.attachShadow({ mode: "open" });
|
|
997
|
+
e.innerHTML = `<style>${ze}</style>${Ue()}`, this.raiz = e.querySelector(".ui-calendario"), this.tituloEl = e.querySelector(".ui-calendario__titulo"), this.selectMes = e.querySelector('[data-seletor="mes"]'), this.selectAno = e.querySelector('[data-seletor="ano"]'), this.semanaEl = e.querySelector(".ui-calendario__semana"), this.gradeEl = e.querySelector(".ui-calendario__grade");
|
|
998
|
+
const t = I();
|
|
999
|
+
this._ano = t.ano, this._mes = t.mes, this._foco = t;
|
|
1000
|
+
}
|
|
1001
|
+
static get observedAttributes() {
|
|
1002
|
+
return Le;
|
|
1003
|
+
}
|
|
1004
|
+
connectedCallback() {
|
|
1005
|
+
this.listeners.cleanup(), this.listeners.add(this.raiz, "click", this.aoClicar), this.listeners.add(this.gradeEl, "keydown", this.aoTeclar), this.listeners.add(this.selectMes, "change", this.aoMudarSeletor), this.listeners.add(this.selectAno, "change", this.aoMudarSeletor), this._conectado = !0, this.lerAtributosIniciais(), this.renderizar();
|
|
1006
|
+
}
|
|
1007
|
+
disconnectedCallback() {
|
|
1008
|
+
this.listeners.cleanup(), this._conectado = !1;
|
|
1009
|
+
}
|
|
1010
|
+
attributeChangedCallback(e, t, a) {
|
|
1011
|
+
if (t !== a) {
|
|
1012
|
+
if (e === "mes") {
|
|
1013
|
+
const r = S(a);
|
|
1014
|
+
r && (r.ano !== this._ano || r.mes !== this._mes) && (this._ano = r.ano, this._mes = r.mes, this._foco = this.focoDentroDoMes(this._foco));
|
|
1015
|
+
} else if (e === "valor" || e === "value") {
|
|
1016
|
+
const r = _(a);
|
|
1017
|
+
r && (this._foco = r, this._ano = r.ano, this._mes = r.mes);
|
|
1018
|
+
} else e === "eventos" && this._eventosAttr && (this._eventos = this.lerEventosDoAtributo(a), this._porDia = M(this._eventos));
|
|
1019
|
+
this._conectado && this.renderizar();
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
// === API pública ===
|
|
1023
|
+
get eventos() {
|
|
1024
|
+
return this._eventos;
|
|
1025
|
+
}
|
|
1026
|
+
set eventos(e) {
|
|
1027
|
+
this._eventosAttr = !1, this._eventos = Array.isArray(e) ? e : [], this._porDia = M(this._eventos), this._conectado && this.renderizar();
|
|
1028
|
+
}
|
|
1029
|
+
get valor() {
|
|
1030
|
+
return this.getAttribute("valor") || this.getAttribute("value") || "";
|
|
1031
|
+
}
|
|
1032
|
+
set valor(e) {
|
|
1033
|
+
e ? this.setAttribute("valor", e) : this.removeAttribute("valor");
|
|
1034
|
+
}
|
|
1035
|
+
/** Mês exibido (`AAAA-MM`). */
|
|
1036
|
+
get mes() {
|
|
1037
|
+
return D(this._ano, this._mes);
|
|
1038
|
+
}
|
|
1039
|
+
set mes(e) {
|
|
1040
|
+
this.setAttribute("mes", e);
|
|
1041
|
+
}
|
|
1042
|
+
mesAnterior() {
|
|
1043
|
+
this.mudarMes(-1);
|
|
1044
|
+
}
|
|
1045
|
+
proximoMes() {
|
|
1046
|
+
this.mudarMes(1);
|
|
1047
|
+
}
|
|
1048
|
+
/** Vai para o mês da data informada (`AAAA-MM-DD` ou `AAAA-MM`) e foca o dia. */
|
|
1049
|
+
irPara(e) {
|
|
1050
|
+
const t = _(e);
|
|
1051
|
+
if (t) {
|
|
1052
|
+
this.definirFoco(t, !1);
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
const a = S(e);
|
|
1056
|
+
a && this.definirFoco({ ano: a.ano, mes: a.mes, dia: 1 }, !1);
|
|
1057
|
+
}
|
|
1058
|
+
/** Vai para o mês atual, foca e seleciona o dia de hoje. */
|
|
1059
|
+
hoje() {
|
|
1060
|
+
const e = I();
|
|
1061
|
+
this.definirFoco(e, !1), this.selecionar(e);
|
|
1062
|
+
}
|
|
1063
|
+
// === Estado derivado dos atributos ===
|
|
1064
|
+
get inicioSemana() {
|
|
1065
|
+
return E(this.getAttribute("inicio-semana"), 0, 6, 0);
|
|
1066
|
+
}
|
|
1067
|
+
get locale() {
|
|
1068
|
+
return this.getAttribute("locale") || "pt-BR";
|
|
1069
|
+
}
|
|
1070
|
+
get selecao() {
|
|
1071
|
+
return A(this.getAttribute("selecao"), je, "unico");
|
|
1072
|
+
}
|
|
1073
|
+
get exibicao() {
|
|
1074
|
+
return A(this.getAttribute("exibicao"), Ne, "completo");
|
|
1075
|
+
}
|
|
1076
|
+
lerAtributosIniciais() {
|
|
1077
|
+
const e = S(this.getAttribute("mes")) || S(this.getAttribute("valor") || this.getAttribute("value"));
|
|
1078
|
+
e && (this._ano = e.ano, this._mes = e.mes);
|
|
1079
|
+
const t = _(this.getAttribute("valor") || this.getAttribute("value"));
|
|
1080
|
+
this._foco = this.focoDentroDoMes(t || this._foco), this._eventosAttr && this.hasAttribute("eventos") && (this._eventos = this.lerEventosDoAtributo(this.getAttribute("eventos")), this._porDia = M(this._eventos));
|
|
1081
|
+
}
|
|
1082
|
+
lerEventosDoAtributo(e) {
|
|
1083
|
+
if (!e) return [];
|
|
1084
|
+
try {
|
|
1085
|
+
const t = JSON.parse(e);
|
|
1086
|
+
return Array.isArray(t) ? t : [];
|
|
1087
|
+
} catch {
|
|
1088
|
+
return [];
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
/** Mantém o foco dentro do mês exibido (hoje, se for o mês atual; senão dia 1). */
|
|
1092
|
+
focoDentroDoMes(e) {
|
|
1093
|
+
if (e.ano === this._ano && e.mes === this._mes) return e;
|
|
1094
|
+
const t = I();
|
|
1095
|
+
return t.ano === this._ano && t.mes === this._mes ? t : { ano: this._ano, mes: this._mes, dia: 1 };
|
|
1096
|
+
}
|
|
1097
|
+
// === Mutações de estado ===
|
|
1098
|
+
mudarMes(e) {
|
|
1099
|
+
const t = L({ ano: this._ano, mes: this._mes, dia: this._foco.dia }, e);
|
|
1100
|
+
this.definirFoco(t, !1);
|
|
1101
|
+
}
|
|
1102
|
+
definirFoco(e, t) {
|
|
1103
|
+
const a = e.ano !== this._ano || e.mes !== this._mes;
|
|
1104
|
+
this._ano = e.ano, this._mes = e.mes, this._foco = e, a && this.setAttribute("mes", D(e.ano, e.mes)), this.renderizar(), t && this.focarCelula(), a && this.dispatchEvent(new CustomEvent("ui-mes-change", {
|
|
1105
|
+
detail: { mes: D(e.ano, e.mes) },
|
|
1106
|
+
bubbles: !0,
|
|
1107
|
+
composed: !0
|
|
1108
|
+
}));
|
|
1109
|
+
}
|
|
1110
|
+
selecionar(e) {
|
|
1111
|
+
if (this.selecao === "nenhum") return;
|
|
1112
|
+
const t = b(e);
|
|
1113
|
+
this.setAttribute("valor", t), this._foco = e, this.renderizar(), this.dispatchEvent(new CustomEvent("ui-change", {
|
|
1114
|
+
detail: { data: t, eventos: this._porDia.get(t) ?? [] },
|
|
1115
|
+
bubbles: !0,
|
|
1116
|
+
composed: !0
|
|
1117
|
+
}));
|
|
1118
|
+
}
|
|
1119
|
+
focarCelula() {
|
|
1120
|
+
const e = this.gradeEl.querySelector(`[data-data="${b(this._foco)}"]`);
|
|
1121
|
+
e == null || e.focus();
|
|
1122
|
+
}
|
|
1123
|
+
// === Renderização ===
|
|
1124
|
+
renderizar() {
|
|
1125
|
+
const e = this.ownerDocument, t = this.locale, a = this.inicioSemana, r = b(I()), n = _(this.valor), l = n ? b(n) : "", c = b(this._foco), d = E(this.getAttribute("max-eventos"), 1, 6, 3), u = K(t);
|
|
1126
|
+
this.raiz.dataset.exibicao = this.exibicao, this.raiz.dataset.variante = A(this.getAttribute("variante"), Re, "moldura");
|
|
1127
|
+
const h = this.getAttribute("titulo") || "";
|
|
1128
|
+
this.tituloEl.textContent = h, this.tituloEl.hidden = !h, this.selectMes.replaceChildren(...u.map((v, p) => {
|
|
1129
|
+
const g = e.createElement("option");
|
|
1130
|
+
return g.value = String(p + 1), g.textContent = v, g;
|
|
1131
|
+
})), this.selectMes.value = String(this._mes);
|
|
1132
|
+
const m = [];
|
|
1133
|
+
for (let v = Math.max(1, this._ano - 10); v <= Math.min(9999, this._ano + 10); v++) {
|
|
1134
|
+
const p = e.createElement("option");
|
|
1135
|
+
p.value = String(v), p.textContent = String(v), m.push(p);
|
|
1136
|
+
}
|
|
1137
|
+
this.selectAno.replaceChildren(...m), this.selectAno.value = String(this._ano), this.semanaEl.replaceChildren(...Z(t, a).map((v) => {
|
|
1138
|
+
const p = e.createElement("span");
|
|
1139
|
+
return p.className = "ui-calendario__semana-dia", p.textContent = J(v), p;
|
|
1140
|
+
}));
|
|
1141
|
+
const y = Pe(this._ano, this._mes, a), W = this.criarFormatadorDia(t);
|
|
1142
|
+
this.gradeEl.setAttribute("aria-label", `${u[this._mes - 1]} de ${this._ano}`);
|
|
1143
|
+
const R = [];
|
|
1144
|
+
for (let v = 0; v < y.length / 7; v++) {
|
|
1145
|
+
const p = e.createElement("div");
|
|
1146
|
+
p.className = "ui-calendario__linha", p.setAttribute("role", "row"), y.slice(v * 7, v * 7 + 7).forEach((g) => {
|
|
1147
|
+
const k = this._porDia.get(g.iso) ?? [], T = [W(g)];
|
|
1148
|
+
k.length && T.push(k.length === 1 ? "1 evento" : `${k.length} eventos`), g.iso === r && T.push("hoje"), p.appendChild(qe(e, {
|
|
1149
|
+
dia: g,
|
|
1150
|
+
eventos: k,
|
|
1151
|
+
maxEventos: d,
|
|
1152
|
+
hoje: g.iso === r,
|
|
1153
|
+
selecionado: g.iso === l,
|
|
1154
|
+
foco: g.iso === c,
|
|
1155
|
+
rotulo: T.join(", ")
|
|
1156
|
+
}));
|
|
1157
|
+
}), R.push(p);
|
|
1158
|
+
}
|
|
1159
|
+
this.gradeEl.replaceChildren(...R);
|
|
1160
|
+
}
|
|
1161
|
+
criarFormatadorDia(e) {
|
|
1162
|
+
try {
|
|
1163
|
+
const t = new Intl.DateTimeFormat(e, { weekday: "long", day: "numeric", month: "long", year: "numeric", timeZone: "UTC" });
|
|
1164
|
+
return (a) => t.format(new Date(Date.UTC(a.ano, a.mes - 1, a.dia)));
|
|
1165
|
+
} catch {
|
|
1166
|
+
return (t) => b(t);
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
f("ui-calendario", Fe);
|
|
1171
|
+
const Be = ':host{--_espaco: var(--ui-espaco-sm, 8px);display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:var(--ui-linha-espaco, var(--_espaco));box-sizing:border-box;min-width:0;max-width:100%}:host([inline]){display:inline-flex;vertical-align:middle}:host([hidden]){display:none}:host([sem-quebra]){flex-wrap:nowrap}:host([espaco="nenhum"]){--_espaco: 0}:host([espaco="xs"]){--_espaco: var(--ui-espaco-xs, 4px)}:host([espaco="sm"]){--_espaco: var(--ui-espaco-sm, 8px)}:host([espaco="md"]){--_espaco: var(--ui-espaco-md, 16px)}:host([espaco="lg"]){--_espaco: var(--ui-espaco-lg, 24px)}:host([alinhar="inicio"]){align-items:flex-start}:host([alinhar="centro"]){align-items:center}:host([alinhar="fim"]){align-items:flex-end}:host([alinhar="esticar"]){align-items:stretch}:host([justificar="centro"]){justify-content:center}:host([justificar="fim"]){justify-content:flex-end}:host([justificar="entre"]){justify-content:space-between}:host([justificar="ao-redor"]){justify-content:space-around}::slotted(*){flex:0 0 auto;width:auto;max-width:100%;margin-top:0;margin-bottom:0}::slotted(ui-campo-texto),::slotted(ui-input),::slotted(ui-lista-flutuante),::slotted(ui-select){flex:1 1 var(--ui-linha-campo-base, 12rem);min-width:0}::slotted([expandir]){flex:1 1 0;min-width:0}';
|
|
1172
|
+
class Ve extends C {
|
|
1173
|
+
static get observedAttributes() {
|
|
1174
|
+
return ["tamanho", "size", "densidade", "altura", "height"];
|
|
1175
|
+
}
|
|
1176
|
+
constructor() {
|
|
1177
|
+
super();
|
|
1178
|
+
const o = this.attachShadow({ mode: "open" });
|
|
1179
|
+
o.innerHTML = `<style>${Be}</style><slot></slot>`;
|
|
1180
|
+
}
|
|
1181
|
+
connectedCallback() {
|
|
1182
|
+
P(this);
|
|
1183
|
+
}
|
|
1184
|
+
attributeChangedCallback(o, e, t) {
|
|
1185
|
+
e !== t && P(this);
|
|
1186
|
+
}
|
|
1187
|
+
lerTexto(o) {
|
|
1188
|
+
return this.getAttribute(o);
|
|
1189
|
+
}
|
|
1190
|
+
definirTexto(o, e) {
|
|
1191
|
+
e == null || e === "" ? this.removeAttribute(o) : this.setAttribute(o, String(e));
|
|
1192
|
+
}
|
|
1193
|
+
get tamanho() {
|
|
1194
|
+
return this.lerTexto("tamanho");
|
|
1195
|
+
}
|
|
1196
|
+
set tamanho(o) {
|
|
1197
|
+
this.definirTexto("tamanho", o);
|
|
1198
|
+
}
|
|
1199
|
+
get altura() {
|
|
1200
|
+
return this.lerTexto("altura");
|
|
1201
|
+
}
|
|
1202
|
+
set altura(o) {
|
|
1203
|
+
this.definirTexto("altura", o === null ? null : String(o));
|
|
1204
|
+
}
|
|
1205
|
+
get alinhar() {
|
|
1206
|
+
return this.lerTexto("alinhar");
|
|
1207
|
+
}
|
|
1208
|
+
set alinhar(o) {
|
|
1209
|
+
this.definirTexto("alinhar", o);
|
|
1210
|
+
}
|
|
1211
|
+
get justificar() {
|
|
1212
|
+
return this.lerTexto("justificar");
|
|
1213
|
+
}
|
|
1214
|
+
set justificar(o) {
|
|
1215
|
+
this.definirTexto("justificar", o);
|
|
1216
|
+
}
|
|
1217
|
+
get espaco() {
|
|
1218
|
+
return this.lerTexto("espaco");
|
|
1219
|
+
}
|
|
1220
|
+
set espaco(o) {
|
|
1221
|
+
this.definirTexto("espaco", o);
|
|
1222
|
+
}
|
|
1223
|
+
get semQuebra() {
|
|
1224
|
+
return this.hasAttribute("sem-quebra");
|
|
1225
|
+
}
|
|
1226
|
+
set semQuebra(o) {
|
|
1227
|
+
this.toggleAttribute("sem-quebra", !!o);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
f("ui-linha", Ve);
|
|
1231
|
+
const Xe = () => import("./mapa.js"), Ke = () => import("./canvas.js"), Ze = () => import("./prancha.js");
|
|
30
1232
|
if (typeof document < "u") {
|
|
31
|
-
const
|
|
1233
|
+
const i = () => {
|
|
32
1234
|
document.querySelector("ui-mapa, ui-mapa-marcador, ui-mapa-linha") && !customElements.get("ui-mapa") && import("./mapa.js"), document.querySelector("ui-canvas-cad") && !customElements.get("ui-canvas-cad") && import("./canvas.js"), document.querySelector("ui-canvas-prancha, ui-editor-prancha") && !(customElements.get("ui-canvas-prancha") && customElements.get("ui-editor-prancha")) && import("./prancha.js");
|
|
33
1235
|
};
|
|
34
|
-
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
1236
|
+
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", i, { once: !0 }) : i();
|
|
35
1237
|
}
|
|
36
|
-
typeof document < "u" &&
|
|
1238
|
+
typeof document < "u" && ae();
|
|
37
1239
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
1240
|
+
U as ATRIBUTOS_DEGRADE,
|
|
1241
|
+
Ct as ATRIBUTOS_OBSERVADOS_CAMPO_TEXTO,
|
|
1242
|
+
Pt as ATRIBUTOS_OBSERVADOS_LISTA_FLUTUANTE,
|
|
1243
|
+
Ce as ATRIBUTOS_OBSERVADOS_SEGMENTED,
|
|
1244
|
+
Qe as CLASSES_DEGRADE,
|
|
1245
|
+
Jt as CamadasDragDropManager,
|
|
1246
|
+
Oa as GerenciadorValoresPropriedades,
|
|
1247
|
+
Wt as ICONES,
|
|
1248
|
+
fo as ICONES_ALERTA,
|
|
1249
|
+
Lo as ICONES_FERRAMENTAS,
|
|
1250
|
+
Qt as LIMITE_FEICOES_POR_CAMADA,
|
|
1251
|
+
La as LembrancaCategoriasPropriedades,
|
|
1252
|
+
Ot as ListaFlutuantePosicionamento,
|
|
1253
|
+
Lt as ListaFlutuanteTeclado,
|
|
1254
|
+
j as ListenerBag,
|
|
1255
|
+
Yt as MAPAS_BASE_PADRAO,
|
|
1256
|
+
No as PALETA_CORES_PADRAO,
|
|
1257
|
+
Ye as PRESETS_DEGRADE,
|
|
1258
|
+
Ut as RadioGrupoRegistry,
|
|
1259
|
+
et as SELETOR_CAMPOS_PADRAO,
|
|
1260
|
+
C as SafeHTMLElement,
|
|
1261
|
+
ye as SegmentedIndicadorController,
|
|
1262
|
+
Ua as TEXTOS_PADRAO,
|
|
1263
|
+
qa as TEXTO_MISTO_PADRAO,
|
|
1264
|
+
ja as TabelaOrquestradorDados,
|
|
1265
|
+
Na as TabelaRemotaController,
|
|
1266
|
+
Ra as TabelaSelecaoController,
|
|
1267
|
+
xo as UIAlerta,
|
|
1268
|
+
qt as UIAreaTexto,
|
|
1269
|
+
Ae as UIAvatar,
|
|
1270
|
+
Go as UIBadge,
|
|
1271
|
+
Yo as UIBotao,
|
|
1272
|
+
er as UIBotaoPrimario,
|
|
1273
|
+
tt as UIBus,
|
|
1274
|
+
Fe as UICalendario,
|
|
1275
|
+
ea as UICamadas,
|
|
1276
|
+
kt as UICampoTexto,
|
|
1277
|
+
ar as UICard,
|
|
1278
|
+
jt as UICheckbox,
|
|
1279
|
+
Xo as UIChip,
|
|
1280
|
+
or as UIControleCores,
|
|
1281
|
+
nr as UIDialog,
|
|
1282
|
+
_o as UIDrawer,
|
|
1283
|
+
Ao as UIEsqueleto,
|
|
1284
|
+
yo as UIGaveta,
|
|
1285
|
+
ge as UIIcone,
|
|
1286
|
+
St as UIInput,
|
|
1287
|
+
Ko as UIKpi,
|
|
1288
|
+
ta as UILayerPanel,
|
|
1289
|
+
Ve as UILinha,
|
|
1290
|
+
Nt as UIListaFlutuante,
|
|
1291
|
+
mr as UIMapaBase,
|
|
1292
|
+
Zo as UIMetrica,
|
|
1293
|
+
sr as UIModal,
|
|
1294
|
+
aa as UIPainelCamadas,
|
|
1295
|
+
Eo as UIPainelLateral,
|
|
1296
|
+
Fa as UIPainelPropriedades,
|
|
1297
|
+
Uo as UIPaletaFerramentas,
|
|
1298
|
+
wo as UIPopover,
|
|
1299
|
+
Ba as UIPropriedades,
|
|
1300
|
+
Rt as UIRadio,
|
|
1301
|
+
qo as UIRibbon,
|
|
1302
|
+
X as UISegmented,
|
|
1303
|
+
Ie as UISegmento,
|
|
1304
|
+
Ft as UISelect,
|
|
1305
|
+
gr as UISeletorCor,
|
|
1306
|
+
pr as UISeletorMapaBase,
|
|
1307
|
+
Co as UISheet,
|
|
1308
|
+
ko as UISkeleton,
|
|
1309
|
+
Jo as UIStat,
|
|
1310
|
+
Bt as UISwitch,
|
|
109
1311
|
Va as UITabela,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
1312
|
+
$a as UITabelaPropriedades,
|
|
1313
|
+
Wo as UITag,
|
|
1314
|
+
Vt as UITextarea,
|
|
1315
|
+
ce as UITexto,
|
|
1316
|
+
G as UITextoEditavel,
|
|
1317
|
+
So as UIToast,
|
|
1318
|
+
$t as UIToggle,
|
|
1319
|
+
Io as UITooltip,
|
|
1320
|
+
Ha as VALOR_MISTO,
|
|
1321
|
+
Ga as abertoPadraoDaCategoria,
|
|
1322
|
+
Xa as abrirPopoverRedimensionamento,
|
|
1323
|
+
br as abrirSeletorCor,
|
|
1324
|
+
Ka as alternarCategoria,
|
|
1325
|
+
Za as alternarDirecaoOrdenacao,
|
|
1326
|
+
Ja as alternarPosicionamentoFlutuante,
|
|
1327
|
+
q as aplicarDegradeNoElemento,
|
|
1328
|
+
lr as aplicarInertForaDoModal,
|
|
1329
|
+
Wa as aplicarLimitesNumericos,
|
|
1330
|
+
Qa as aplicarOrdenacaoTabela,
|
|
1331
|
+
Ya as atualizarCampoVisual,
|
|
1332
|
+
Ht as atualizarEstadoSelecaoLista,
|
|
1333
|
+
zo as atualizarScrollLockDrawer,
|
|
1334
|
+
ei as avaliarExpressaoMatematica,
|
|
1335
|
+
ti as buscarLinhaPropriedade,
|
|
1336
|
+
ia as calcularAreaAnelSimples,
|
|
1337
|
+
oa as calcularAreaPoligono,
|
|
1338
|
+
ra as calcularComprimentoLinha,
|
|
1339
|
+
Gt as calcularContador,
|
|
1340
|
+
na as calcularDistanciaPontos,
|
|
1341
|
+
sa as calcularSelecaoFeicao,
|
|
1342
|
+
la as carregarEstadoPersistido,
|
|
1343
|
+
ai as carregarEstadoPropriedades,
|
|
1344
|
+
at as carregarLeaflet,
|
|
1345
|
+
Ke as carregarModuloCanvas,
|
|
1346
|
+
Xe as carregarModuloMapa,
|
|
1347
|
+
Ze as carregarModuloPrancha,
|
|
1348
|
+
it as chaveDoCampo,
|
|
1349
|
+
ot as cliqueVeioDeRotuloExterno,
|
|
1350
|
+
ii as colapsarTodasCategorias,
|
|
1351
|
+
oi as combinarValores,
|
|
1352
|
+
ri as conectarArrastoFlutuante,
|
|
1353
|
+
ni as conectarPainelControles,
|
|
1354
|
+
cr as confirmarAcao,
|
|
1355
|
+
dr as confirmarDescarteSeSujo,
|
|
1356
|
+
ca as construirHierarquiaCamadas,
|
|
1357
|
+
da as converterCamadaItemParaCanvasLayer,
|
|
1358
|
+
ua as converterCanvasLayerParaCamadaItem,
|
|
1359
|
+
ha as converterFeicaoParaItem,
|
|
1360
|
+
Ro as coresUnicas,
|
|
1361
|
+
Se as criarBotaoOpcao,
|
|
1362
|
+
si as criarControladorSplitter,
|
|
1363
|
+
li as criarEditorAcao,
|
|
1364
|
+
ci as criarEditorBooleano,
|
|
1365
|
+
di as criarEditorCorCad,
|
|
1366
|
+
ui as criarEditorCorSwatch,
|
|
1367
|
+
hi as criarEditorLinetype,
|
|
1368
|
+
mi as criarEditorLineweight,
|
|
1369
|
+
pi as criarEditorNumero,
|
|
1370
|
+
vi as criarEditorReadonly,
|
|
1371
|
+
gi as criarEditorSelecao,
|
|
1372
|
+
bi as criarEditorTexto,
|
|
1373
|
+
fi as criarEditorValor,
|
|
1374
|
+
xi as criarLinhaPropriedade,
|
|
1375
|
+
rt as criarRascunhoFormulario,
|
|
1376
|
+
It as criarTemplateCampoTexto,
|
|
1377
|
+
Xt as criarTemplateListaFlutuante,
|
|
1378
|
+
ke as criarTemplateSegmented,
|
|
1379
|
+
f as definirCustomElement,
|
|
1380
|
+
nt as definirValorCampo,
|
|
1381
|
+
st as ehAtributoDegrade,
|
|
1382
|
+
lt as ehCampoMarcavel,
|
|
1383
|
+
Fo as escaparHtml,
|
|
1384
|
+
ma as escapeHtml,
|
|
1385
|
+
_i as executarOrquestracaoCorpo,
|
|
1386
|
+
Ai as executarOrquestracaoHeader,
|
|
1387
|
+
yi as executarRedimensionamentoColuna,
|
|
1388
|
+
Ei as executarRedimensionamentoTeclado,
|
|
1389
|
+
wi as exibirPromptPopoverRedimensionamento,
|
|
1390
|
+
Ci as expandirTodasCategorias,
|
|
1391
|
+
fr as fecharSeletorCor,
|
|
1392
|
+
pa as filtrarCamadasPorBusca,
|
|
1393
|
+
va as filtrarFeicoesPorBusca,
|
|
1394
|
+
ki as focarEditorAnterior,
|
|
1395
|
+
Si as focarPrimeiroEditor,
|
|
1396
|
+
Ii as focarProximoEditor,
|
|
1397
|
+
zi as formatWidth,
|
|
1398
|
+
ga as formatarMetricaFeicoes,
|
|
1399
|
+
ba as formatarOpcoesCamadasHierarquicas,
|
|
1400
|
+
fa as gerarChaveStorage,
|
|
1401
|
+
Ti as gerarChaveStoragePropriedades,
|
|
1402
|
+
ct as gerarIdUnico,
|
|
1403
|
+
To as gerenciarTabTrap,
|
|
1404
|
+
Di as getAlignmentClass,
|
|
1405
|
+
Mi as getRowHeight,
|
|
1406
|
+
Pi as getTextAlign,
|
|
1407
|
+
dt as gradienteSeguro,
|
|
1408
|
+
Oi as idDaCategoria,
|
|
1409
|
+
Li as inicializarScrollVirtualizacao,
|
|
1410
|
+
Ui as iniciarRedimensionamentoColuna,
|
|
1411
|
+
ae as initZeroJSTriggers,
|
|
1412
|
+
qi as interpretarEntradaNumerica,
|
|
1413
|
+
ji as interpretarIndice,
|
|
1414
|
+
ut as isBrowser,
|
|
1415
|
+
Do as isTopMostDrawer,
|
|
1416
|
+
Ni as isValorMisto,
|
|
1417
|
+
ht as lerValorCampo,
|
|
1418
|
+
mt as ligarAtalhosFormulario,
|
|
1419
|
+
Ri as limitarLarguraColuna,
|
|
1420
|
+
pt as limparErros,
|
|
1421
|
+
xa as limparEstadoPersistido,
|
|
1422
|
+
Fi as limparEstadoPropriedades,
|
|
1423
|
+
vt as listarCampos,
|
|
1424
|
+
gt as localizarCampo,
|
|
1425
|
+
Bi as localizarIndiceItem,
|
|
1426
|
+
Vi as marcarSelectMisto,
|
|
1427
|
+
_a as montarEstadoPersistido,
|
|
1428
|
+
$i as montarEstruturaDOM,
|
|
1429
|
+
Aa as nomeDoMapaBase,
|
|
1430
|
+
Bo as normalizarCor,
|
|
1431
|
+
Vo as normalizarEspessura,
|
|
1432
|
+
ya as normalizarEstadoPersistido,
|
|
1433
|
+
Hi as normalizarEstadoPersistidoPropriedades,
|
|
1434
|
+
$o as normalizarOpacidade,
|
|
1435
|
+
Gi as normalizarTexto,
|
|
1436
|
+
bt as observarLimpezaDeErros,
|
|
1437
|
+
Xi as obterCasasDecimais,
|
|
1438
|
+
Mo as obterElementosFocaveis,
|
|
1439
|
+
Ea as obterIdsVisiveisFeicoes,
|
|
1440
|
+
ft as obterLeafletSincrono,
|
|
1441
|
+
Ki as obterPassoNumerico,
|
|
1442
|
+
xt as obterRotuloExterno,
|
|
1443
|
+
_t as obterValorAtributoDegrade,
|
|
1444
|
+
Zi as orquestrarEstruturaInicial,
|
|
1445
|
+
At as preencherCampos,
|
|
1446
|
+
Ji as proximaDensidade,
|
|
1447
|
+
Wi as redimensionarColunaPorDelta,
|
|
1448
|
+
Qi as registrarAtualizadorEditor,
|
|
1449
|
+
Po as registrarToastNoBus,
|
|
1450
|
+
wa as reidratarCamadasComOverrides,
|
|
1451
|
+
ur as removerInertForaDoModal,
|
|
1452
|
+
Ca as removerSelecoesInvalidas,
|
|
1453
|
+
ka as renderizarArvoreCamadas,
|
|
1454
|
+
Yi as renderizarCategoriasETree,
|
|
1455
|
+
eo as renderizarCorpoTabela,
|
|
1456
|
+
Sa as renderizarGridMapasBase,
|
|
1457
|
+
to as renderizarHeaderTabela,
|
|
1458
|
+
Kt as renderizarItensLista,
|
|
1459
|
+
Ia as renderizarRodapeAcoes,
|
|
1460
|
+
ao as renderizarSeletorTipos,
|
|
1461
|
+
za as renderizarThumbGeometria,
|
|
1462
|
+
yt as resolverDegrade,
|
|
1463
|
+
Ta as rotuloRodape,
|
|
1464
|
+
Da as salvarEstadoPersistido,
|
|
1465
|
+
io as salvarEstadoPropriedades,
|
|
1466
|
+
oo as sincronizarAtributosTabela,
|
|
1467
|
+
ro as sincronizarCampoAberto,
|
|
1468
|
+
no as sincronizarDomCategorias,
|
|
1469
|
+
zt as sincronizarFeedbackErro,
|
|
1470
|
+
so as sincronizarFlutuanteExterno,
|
|
1471
|
+
Tt as sincronizarIconeSenha,
|
|
1472
|
+
Dt as sincronizarLabelEPlaceholder,
|
|
1473
|
+
lo as sincronizarPainelControles,
|
|
1474
|
+
co as sincronizarSelect,
|
|
1475
|
+
Ma as snapshotCamada,
|
|
1476
|
+
uo as textoDoHost,
|
|
1477
|
+
ho as textoMistoDe,
|
|
1478
|
+
mo as tratarMudancaAtributoTabela,
|
|
1479
|
+
Ee as tratarTecladoSegmented,
|
|
1480
|
+
Et as validarCampos,
|
|
1481
|
+
po as valorComum,
|
|
1482
|
+
vo as valorInicialDaPropriedade,
|
|
1483
|
+
go as valoresIguais
|
|
282
1484
|
};
|