@thibezer/ui-components-kit 2.8.1 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -103
- package/README.md +8 -32
- package/dist/botao.cjs +1 -1
- package/dist/botao.js +1 -1
- package/dist/camadas.cjs +110 -114
- package/dist/camadas.js +1177 -1343
- package/dist/campo-texto.cjs +1 -1
- package/dist/campo-texto.js +1 -1
- package/dist/canvas.cjs +63 -64
- package/dist/canvas.js +3544 -4025
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/components/ui-avatar/ui-avatar.d.ts +0 -11
- package/dist/components/ui-badge/ui-badge.d.ts +0 -2
- package/dist/components/ui-barra-ferramentas/ferramentas-comum.d.ts +22 -1
- package/dist/components/ui-barra-ferramentas/tipos.d.ts +31 -0
- package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +17 -1
- package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +17 -0
- package/dist/components/ui-camadas/camadas-arraste-controles.d.ts +0 -2
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +11 -4
- package/dist/components/ui-camadas/camadas-drag-drop.d.ts +1 -13
- package/dist/components/ui-camadas/camadas-host.d.ts +0 -1
- package/dist/components/ui-camadas/camadas-mapas-base.d.ts +1 -3
- package/dist/components/ui-camadas/camadas-selecao.d.ts +0 -12
- package/dist/components/ui-camadas/ui-camadas.d.ts +5 -8
- package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +1 -2
- package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +1 -1
- package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +8 -3
- package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +106 -39
- package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +1 -3
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +1 -15
- package/dist/components/ui-checkbox/ui-checkbox.d.ts +1 -4
- package/dist/components/ui-cores/tipos.d.ts +0 -2
- package/dist/components/ui-cores/ui-controle-cores.d.ts +3 -8
- package/dist/components/ui-cores/ui-seletor-cor.d.ts +1 -3
- package/dist/components/ui-mapa/ui-mapa-linha.d.ts +5 -12
- package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +6 -15
- package/dist/components/ui-mapa/ui-mapa.d.ts +1 -14
- package/dist/components/ui-modal/modal-acessibilidade.d.ts +5 -5
- package/dist/components/ui-modal/ui-modal.d.ts +11 -1
- package/dist/components/ui-radio/radio-grupo-registry.d.ts +0 -10
- package/dist/components/ui-radio/ui-radio.d.ts +2 -9
- package/dist/components/ui-skeleton/ui-skeleton.d.ts +0 -9
- package/dist/components/ui-switch/ui-switch.d.ts +1 -3
- package/dist/components/ui-tabela/ui-tabela.d.ts +19 -1
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +1 -24
- package/dist/core/index.d.ts +0 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +18 -28
- package/dist/cores.cjs +1 -1
- package/dist/cores.js +1 -1
- package/dist/custom-elements.json +13585 -18764
- package/dist/data.cjs +1 -1
- package/dist/data.js +2 -2
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +2 -2
- package/dist/form-validacao-BIOXxt-1.js +140 -0
- package/dist/form-validacao-ytRYSF3E.cjs +1 -0
- package/dist/forms.cjs +1 -1
- package/dist/forms.js +2 -2
- package/dist/gerencigeo-canvas/canvas_interacao.d.ts +1 -0
- package/dist/gerencigeo-canvas/feature_metricas.d.ts +9 -0
- package/dist/gerencigeo-canvas/feature_popup.d.ts +0 -2
- package/dist/gerencigeo-canvas/mapa_core.d.ts +0 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +176 -179
- package/dist/mapa.cjs +16 -11
- package/dist/mapa.js +170 -242
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/register.cjs +1 -1
- package/dist/register.js +11 -11
- package/dist/svg-seguro-ChVJ2L2z.js +74 -0
- package/dist/svg-seguro-J2RM1Ssf.cjs +1 -0
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +1 -1
- package/dist/tipos-elementos.d.ts +20 -48
- package/dist/tipos-react.d.ts +0 -2
- package/dist/tipos-vue.d.ts +15 -44
- package/dist/tools.cjs +1 -1
- package/dist/tools.js +1 -1
- package/dist/ui-badge-BxT-sDmV.cjs +28 -0
- package/dist/ui-badge-C0eKBI8E.js +183 -0
- package/dist/ui-botao-BOOnP8ds.cjs +12 -0
- package/dist/ui-botao-DfqSivHl.js +165 -0
- package/dist/ui-botao-OGJV6Vfk.js +165 -0
- package/dist/ui-botao-psS1juof.cjs +12 -0
- package/dist/ui-campo-texto-Cnn2UAkS.cjs +16 -0
- package/dist/{ui-campo-texto-B_OHVGiN.js → ui-campo-texto-Uu2dJE_0.js} +51 -51
- package/dist/ui-card-B86lJXTP.cjs +20 -0
- package/dist/{ui-card-BNYCQ7g-.js → ui-card-C_o5_0cB.js} +42 -50
- package/dist/ui-controle-cores-BS0WYPdi.js +572 -0
- package/dist/ui-controle-cores-Er6ZcQ7U.cjs +111 -0
- package/dist/ui-kit.css +1 -1
- package/dist/ui-modal-CvGFGh1h.cjs +18 -0
- package/dist/{ui-modal-BkYvNP0G.js → ui-modal-DBOtSTbR.js} +140 -116
- package/dist/ui-paleta-ferramentas-CEZYcN4J.js +624 -0
- package/dist/ui-paleta-ferramentas-CU4icLl0.js +1171 -0
- package/dist/{ui-paleta-ferramentas-bDLPbiGA.cjs → ui-paleta-ferramentas-Ccmo-rB5.cjs} +7 -7
- package/dist/ui-paleta-ferramentas-DLwZHIDv.cjs +21 -0
- package/dist/{ui-paleta-ferramentas-Ksh6gMW3.js → ui-paleta-ferramentas-DNN5i6nL.js} +329 -359
- package/dist/ui-paleta-ferramentas-Dbj1kBS9.cjs +18 -0
- package/dist/ui-paleta-ferramentas-DbwdWVtT.js +1173 -0
- package/dist/ui-paleta-ferramentas-bvqxj1Yd.cjs +21 -0
- package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
- package/dist/ui-segmented-DyF5YLsV.js +418 -0
- package/dist/ui-segmented-rn9RxRGM.cjs +19 -0
- package/dist/{ui-linha-nCDh2wPm.js → ui-segmented-wUraId2e.js} +105 -200
- package/dist/ui-skeleton-DI4_9WOX.js +428 -0
- package/dist/{ui-skeleton-DiOxTBZK.cjs → ui-skeleton-SPYqku8P.cjs} +10 -10
- package/dist/{ui-skeleton-B2Rgrv8o.js → ui-skeleton-W9uwIceA.js} +191 -254
- package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
- package/dist/{ui-switch-DO1R0Ce7.js → ui-switch-BcOqOkiV.js} +128 -187
- package/dist/ui-switch-D7iPKDj-.cjs +53 -0
- package/dist/ui-tabela-propriedades-BBr5sqki.cjs +145 -0
- package/dist/{ui-tabela-propriedades-DzZlyNZ_.cjs → ui-tabela-propriedades-BecPqC-e.cjs} +10 -10
- package/dist/{ui-tabela-propriedades-D9Echt2X.js → ui-tabela-propriedades-BokvDD3b.js} +826 -845
- package/dist/ui-tabela-propriedades-Boy7I5yW.js +2412 -0
- package/dist/ui-tabela-propriedades-C-PeuW1i.cjs +141 -0
- package/dist/ui-tabela-propriedades-Df9ajC6M.js +2648 -0
- package/dist/ui-toast-Bp_NlM5G.js +156 -0
- package/dist/ui-toast-DGTZKne5.cjs +20 -0
- package/dist/zero-js-triggers-C_KrvFOQ.js +244 -0
- package/dist/zero-js-triggers-C_gtaojZ.cjs +1 -0
- package/package.json +3 -3
- package/dist/acessibilidade-CSzX-DkG.cjs +0 -1
- package/dist/acessibilidade-CUlSXc2X.js +0 -38
- package/dist/altura-controle-ukMRPckR.cjs +0 -1
- package/dist/altura-controle-vxQiXG4q.js +0 -62
- package/dist/components/ui-barra-ferramentas/paleta-atalhos.d.ts +0 -16
- package/dist/components/ui-barra-ferramentas/paleta-pressao-longa.d.ts +0 -24
- package/dist/components/ui-barra-ferramentas/ribbon-render.d.ts +0 -14
- package/dist/components/ui-barra-ferramentas/ribbon-teclado.d.ts +0 -17
- package/dist/components/ui-camadas/camadas-colecao.d.ts +0 -27
- package/dist/components/ui-camadas/camadas-drop-ops.d.ts +0 -31
- package/dist/components/ui-camadas/camadas-hierarquia.d.ts +0 -10
- package/dist/components/ui-camadas/camadas-lembranca.d.ts +0 -34
- package/dist/components/ui-camadas/camadas-render.d.ts +0 -15
- package/dist/components/ui-camadas/camadas-renomear.d.ts +0 -12
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +0 -17
- package/dist/components/ui-camadas/camadas-thumb.d.ts +0 -1
- package/dist/components/ui-canvas-cad/cad-acessibilidade.d.ts +0 -15
- package/dist/components/ui-canvas-cad/cad-evento-coordenadas.d.ts +0 -22
- package/dist/components/ui-canvas-cad/cad-feicoes-camera.d.ts +0 -26
- package/dist/components/ui-canvas-cad/cad-feicoes-consulta.d.ts +0 -21
- package/dist/components/ui-canvas-cad/cad-feicoes-dados.d.ts +0 -39
- package/dist/components/ui-canvas-cad/cad-feicoes-desenho.d.ts +0 -68
- package/dist/components/ui-canvas-cad/cad-feicoes-edicao.d.ts +0 -37
- package/dist/components/ui-canvas-cad/cad-feicoes-operacoes.d.ts +0 -48
- package/dist/components/ui-canvas-cad/cad-feicoes-ponteiro.d.ts +0 -28
- package/dist/components/ui-canvas-cad/cad-feicoes-selecao-regiao.d.ts +0 -22
- package/dist/components/ui-canvas-cad/cad-feicoes-tipos.d.ts +0 -53
- package/dist/components/ui-canvas-cad/cad-feicoes-versoes.d.ts +0 -33
- package/dist/components/ui-canvas-cad/cad-leaflet-adaptador.d.ts +0 -5
- package/dist/components/ui-canvas-cad/cad-selecao-pontos.d.ts +0 -5
- package/dist/components/ui-canvas-cad/tipos.d.ts +0 -37
- package/dist/components/ui-linha/index.d.ts +0 -1
- package/dist/components/ui-linha/ui-linha.d.ts +0 -48
- package/dist/components/ui-mapa/mapa-atributos.d.ts +0 -14
- package/dist/components/ui-mapa/mapa-basemaps.d.ts +0 -7
- package/dist/components/ui-mapa/mapa-icones.d.ts +0 -4
- package/dist/components/ui-mapa/mapa-leaflet.d.ts +0 -5
- package/dist/components/ui-mapa/mapa-vinculo-pai.d.ts +0 -22
- package/dist/components/ui-mapa/tipos.d.ts +0 -13
- package/dist/components/ui-modal/modal-foco.d.ts +0 -28
- package/dist/components/ui-tabela/tabela-estados.d.ts +0 -16
- package/dist/components/ui-tabela/tabela-rolagem.d.ts +0 -44
- package/dist/components/ui-tabela/tabela-teclado.d.ts +0 -16
- package/dist/components/ui-tooltip/tooltip-popover.d.ts +0 -7
- package/dist/components/ui-tooltip/tooltip-posicionamento.d.ts +0 -29
- package/dist/core/altura-controle.d.ts +0 -34
- package/dist/core/opcoes.d.ts +0 -9
- package/dist/core/rotulo-controle.d.ts +0 -13
- package/dist/form-validacao-BlQFxUVj.js +0 -104
- package/dist/form-validacao-DIeyQVH5.cjs +0 -1
- package/dist/gerencigeo-canvas/popup_gate.d.ts +0 -30
- package/dist/gerencigeo-canvas/zoom_opcoes.d.ts +0 -10
- package/dist/opcoes-CJYLi6kd.js +0 -12
- package/dist/opcoes-CkyDxBuQ.cjs +0 -1
- package/dist/ui-badge-BWhoGgo9.js +0 -197
- package/dist/ui-badge-SIR81R9l.cjs +0 -28
- package/dist/ui-botao-D24oXySA.cjs +0 -12
- package/dist/ui-botao-Dsj08jjw.js +0 -165
- package/dist/ui-campo-texto-DauJCde3.cjs +0 -16
- package/dist/ui-card-BrjBL-yo.cjs +0 -20
- package/dist/ui-controle-cores-DgEza3wF.js +0 -612
- package/dist/ui-controle-cores-uY__TgwW.cjs +0 -117
- package/dist/ui-linha-C6HBnsaw.cjs +0 -19
- package/dist/ui-modal-CUNbpbZ1.cjs +0 -18
- package/dist/ui-switch-D9a8XlVX.cjs +0 -53
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var u = (s,
|
|
4
|
-
import { d
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { b as f, c as S } from "./altura-controle-vxQiXG4q.js";
|
|
10
|
-
const k = ':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}.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}.ui-texto--truncar{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}', b = ["h1", "h2", "h3", "h4", "h5", "h6", "corpo", "corpo-sm", "caption", "codigo"], C = ["primaria", "secundaria", "destaque", "erro", "sucesso", "alerta"], T = ["normal", "medio", "seminegrito", "negrito"], I = ["esquerda", "centro", "direita", "justificado"], q = /* @__PURE__ */ new Set([
|
|
1
|
+
var g = Object.defineProperty;
|
|
2
|
+
var v = (s, n, t) => n in s ? g(s, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[n] = t;
|
|
3
|
+
var u = (s, n, t) => v(s, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { d, S as h } from "./ssr-safe-5cWfJP-s.js";
|
|
5
|
+
import { L as f } from "./listener-bag-DQgv7OON.js";
|
|
6
|
+
import { F as b } from "./ui-campo-texto-Uu2dJE_0.js";
|
|
7
|
+
import { a as x } from "./parts-CaoQiCfI.js";
|
|
8
|
+
const _ = ':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}.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}.ui-texto--truncar{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}', y = /* @__PURE__ */ new Set([
|
|
11
9
|
"p",
|
|
12
10
|
"span",
|
|
13
11
|
"div",
|
|
@@ -27,12 +25,12 @@ const k = ':host{display:block;box-sizing:border-box;margin:0;padding:0;color:va
|
|
|
27
25
|
"b",
|
|
28
26
|
"i"
|
|
29
27
|
]);
|
|
30
|
-
class
|
|
28
|
+
class A extends h {
|
|
31
29
|
constructor() {
|
|
32
30
|
super();
|
|
33
31
|
u(this, "container");
|
|
34
32
|
u(this, "shadow");
|
|
35
|
-
typeof this.attachShadow == "function" && typeof document < "u" ? (this.shadow = this.attachShadow({ mode: "open" }), this.container = document.createElement("p"), this.container.className = "ui-texto ui-texto--corpo", this.container.appendChild(document.createElement("slot")), this.shadow.innerHTML = `<style>${
|
|
33
|
+
typeof this.attachShadow == "function" && typeof document < "u" ? (this.shadow = this.attachShadow({ mode: "open" }), this.container = document.createElement("p"), this.container.className = "ui-texto ui-texto--corpo", this.container.appendChild(document.createElement("slot")), this.shadow.innerHTML = `<style>${_}</style>`, this.shadow.appendChild(this.container)) : (this.shadow = null, this.container = null);
|
|
36
34
|
}
|
|
37
35
|
static get observedAttributes() {
|
|
38
36
|
return ["variante", "tag", "cor", "peso", "alinhamento", "truncar"];
|
|
@@ -47,11 +45,11 @@ class O extends v {
|
|
|
47
45
|
const t = this.getAttribute("tag");
|
|
48
46
|
if (t) {
|
|
49
47
|
const e = t.toLowerCase().trim();
|
|
50
|
-
if (
|
|
48
|
+
if (y.has(e))
|
|
51
49
|
return e;
|
|
52
50
|
console.warn(`[ui-texto] Tag "${t}" não permitida ou inválida. Utilizando fallback semântico.`);
|
|
53
51
|
}
|
|
54
|
-
const i =
|
|
52
|
+
const i = (this.getAttribute("variante") || "corpo").toLowerCase();
|
|
55
53
|
switch (i) {
|
|
56
54
|
case "h1":
|
|
57
55
|
case "h2":
|
|
@@ -71,29 +69,25 @@ class O extends v {
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
render() {
|
|
74
|
-
const t = this.resolveTag(), i =
|
|
72
|
+
const t = this.resolveTag(), i = this.getAttribute("variante") || "corpo", e = this.getAttribute("cor"), a = this.getAttribute("peso"), r = this.getAttribute("alinhamento"), o = this.hasAttribute("truncar");
|
|
75
73
|
if (this.container.tagName.toLowerCase() !== t) {
|
|
76
74
|
const c = document.createElement(t);
|
|
77
75
|
c.appendChild(document.createElement("slot")), this.shadow.replaceChild(c, this.container), this.container = c;
|
|
78
76
|
}
|
|
79
77
|
const l = ["ui-texto", `ui-texto--${i}`];
|
|
80
|
-
e && l.push(`ui-texto--cor-${e}`),
|
|
78
|
+
e && l.push(`ui-texto--cor-${e}`), a && l.push(`ui-texto--peso-${a}`), r && l.push(`ui-texto--alinhamento-${r}`), o && l.push("ui-texto--truncar"), this.container.className = l.join(" ");
|
|
81
79
|
}
|
|
82
80
|
}
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
class
|
|
81
|
+
d("ui-texto", A);
|
|
82
|
+
const E = ':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-color: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-color:var(--ui-cor-primaria, #00E08A)}.ui-avatar__status--offline{background-color:#889}.ui-avatar__status--ausente{background-color:#ffb86c}.ui-avatar__status--ocupado{background-color:#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}';
|
|
83
|
+
class w extends h {
|
|
86
84
|
constructor() {
|
|
87
85
|
super();
|
|
88
86
|
u(this, "avatarElement");
|
|
89
87
|
u(this, "statusElement");
|
|
90
|
-
/** O que este componente escreveu em aria-label / aria-hidden (para distinguir do que o consumidor definiu). */
|
|
91
|
-
u(this, "_rotuloAuto", null);
|
|
92
|
-
u(this, "_ocultoAuto", !1);
|
|
93
|
-
u(this, "_sincronizando", !1);
|
|
94
88
|
const t = this.attachShadow({ mode: "open" });
|
|
95
89
|
t.innerHTML = `
|
|
96
|
-
<style>${
|
|
90
|
+
<style>${E}</style>
|
|
97
91
|
<div class="ui-avatar">
|
|
98
92
|
<span class="ui-avatar__content"></span>
|
|
99
93
|
</div>
|
|
@@ -108,64 +102,42 @@ class $ extends v {
|
|
|
108
102
|
"tamanho",
|
|
109
103
|
"size",
|
|
110
104
|
"formato",
|
|
111
|
-
"status"
|
|
112
|
-
"aria-label"
|
|
105
|
+
"status"
|
|
113
106
|
];
|
|
114
107
|
}
|
|
115
108
|
connectedCallback() {
|
|
116
109
|
this.syncState();
|
|
117
110
|
}
|
|
118
111
|
attributeChangedCallback(t, i, e) {
|
|
119
|
-
this.
|
|
112
|
+
this.syncState();
|
|
120
113
|
}
|
|
121
|
-
/** Iniciais por ponto de código (emoji e caracteres fora do BMP não são cortados ao meio). */
|
|
122
114
|
extrairIniciais(t) {
|
|
123
115
|
const i = t.trim().split(/\s+/).filter(Boolean);
|
|
124
116
|
if (i.length === 0) return "?";
|
|
125
117
|
if (i.length === 1)
|
|
126
|
-
return
|
|
127
|
-
const e =
|
|
128
|
-
return (e +
|
|
129
|
-
}
|
|
130
|
-
lerNome() {
|
|
131
|
-
return this.getAttribute("nome") || this.getAttribute("name") || "";
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Nome acessível: com nome, o host é uma imagem nomeada ("Ana, online"); sem nome, é decorativo.
|
|
135
|
-
* Um `aria-label`/`aria-hidden` definido pelo consumidor nunca é sobrescrito.
|
|
136
|
-
*/
|
|
137
|
-
sincronizarAcessibilidade(t, i) {
|
|
138
|
-
const e = this.getAttribute("aria-label"), r = e !== null && e !== this._rotuloAuto, o = this.hasAttribute("aria-hidden") && !this._ocultoAuto;
|
|
139
|
-
if (!(r || o)) {
|
|
140
|
-
if (this._sincronizando = !0, t) {
|
|
141
|
-
const n = i ? `${t}, ${i}` : t;
|
|
142
|
-
this.setAttribute("role", "img"), this.setAttribute("aria-label", n), this._rotuloAuto = n, this.removeAttribute("aria-hidden"), this._ocultoAuto = !1;
|
|
143
|
-
} else
|
|
144
|
-
this._rotuloAuto !== null && this.removeAttribute("aria-label"), this._rotuloAuto = null, this.removeAttribute("role"), this.setAttribute("aria-hidden", "true"), this._ocultoAuto = !0;
|
|
145
|
-
this._sincronizando = !1;
|
|
146
|
-
}
|
|
118
|
+
return i[0].substring(0, 2).toUpperCase();
|
|
119
|
+
const e = i[0][0], a = i[i.length - 1][0];
|
|
120
|
+
return (e + a).toUpperCase();
|
|
147
121
|
}
|
|
148
122
|
syncState() {
|
|
149
|
-
const t = this.getAttribute("src"), i = this.
|
|
150
|
-
this.avatarElement.className = "ui-avatar";
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const c = this.avatarElement.querySelector(".ui-avatar__content");
|
|
154
|
-
if (c)
|
|
123
|
+
const t = this.getAttribute("src"), i = this.getAttribute("nome") || this.getAttribute("name") || "", e = this.getAttribute("tamanho") || this.getAttribute("size") || "md", a = this.getAttribute("formato") || "circulo", r = this.getAttribute("status");
|
|
124
|
+
this.avatarElement.className = "ui-avatar", ["xs", "sm", "md", "lg", "xl"].includes(e) ? (this.avatarElement.classList.add(`ui-avatar--${e}`), this.avatarElement.style.removeProperty("--ui-tamanho-avatar")) : isNaN(parseInt(e, 10)) ? this.avatarElement.style.removeProperty("--ui-tamanho-avatar") : this.avatarElement.style.setProperty("--ui-tamanho-avatar", `${parseInt(e, 10)}px`), a === "quadrado" && this.avatarElement.classList.add("ui-avatar--quadrado");
|
|
125
|
+
const o = this.avatarElement.querySelector(".ui-avatar__content");
|
|
126
|
+
if (o)
|
|
155
127
|
if (t) {
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
-
|
|
128
|
+
const l = o.querySelector("img");
|
|
129
|
+
if (l && l.getAttribute("src") === t)
|
|
130
|
+
l.alt = i || "Avatar";
|
|
159
131
|
else {
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
this.renderFallback(
|
|
164
|
-
},
|
|
132
|
+
o.textContent = "";
|
|
133
|
+
const c = document.createElement("img");
|
|
134
|
+
c.className = "ui-avatar__img", c.src = t, c.alt = i || "Avatar", c.onerror = () => {
|
|
135
|
+
this.renderFallback(o, i);
|
|
136
|
+
}, o.appendChild(c);
|
|
165
137
|
}
|
|
166
138
|
} else
|
|
167
|
-
|
|
168
|
-
|
|
139
|
+
o.textContent = "", this.renderFallback(o, i);
|
|
140
|
+
r && ["online", "offline", "ausente", "ocupado"].includes(r) ? (this.statusElement.className = `ui-avatar__status ui-avatar__status--${r}`, this.statusElement.style.display = "block") : this.statusElement.style.display = "none";
|
|
169
141
|
}
|
|
170
142
|
renderFallback(t, i) {
|
|
171
143
|
i ? t.textContent = this.extrairIniciais(i) : t.innerHTML = `
|
|
@@ -176,17 +148,17 @@ class $ extends v {
|
|
|
176
148
|
`;
|
|
177
149
|
}
|
|
178
150
|
}
|
|
179
|
-
|
|
180
|
-
class
|
|
181
|
-
constructor(
|
|
151
|
+
d("ui-avatar", w);
|
|
152
|
+
class z {
|
|
153
|
+
constructor(n, t) {
|
|
182
154
|
u(this, "rafId", null);
|
|
183
155
|
u(this, "resizeObserver");
|
|
184
|
-
this.trackElement =
|
|
156
|
+
this.trackElement = n, this.indicadorElement = t;
|
|
185
157
|
}
|
|
186
|
-
iniciarObserver(
|
|
158
|
+
iniciarObserver(n, t) {
|
|
187
159
|
typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(() => {
|
|
188
160
|
this.atualizar(), t && t();
|
|
189
|
-
}), this.resizeObserver.observe(
|
|
161
|
+
}), this.resizeObserver.observe(n));
|
|
190
162
|
}
|
|
191
163
|
destruir() {
|
|
192
164
|
this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = void 0), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
@@ -194,59 +166,56 @@ class V {
|
|
|
194
166
|
atualizar() {
|
|
195
167
|
this.rafId !== null && cancelAnimationFrame(this.rafId), this.rafId = requestAnimationFrame(() => {
|
|
196
168
|
this.rafId = null;
|
|
197
|
-
const
|
|
198
|
-
if (!
|
|
169
|
+
const n = this.trackElement.querySelector(".ui-segmented__item--ativo");
|
|
170
|
+
if (!n) {
|
|
199
171
|
this.indicadorElement.style.opacity = "0";
|
|
200
172
|
return;
|
|
201
173
|
}
|
|
202
|
-
const t = Math.round(
|
|
174
|
+
const t = Math.round(n.offsetLeft), i = Math.round(n.offsetWidth);
|
|
203
175
|
this.indicadorElement.style.transform = `translateX(${t}px)`, this.indicadorElement.style.width = `${i}px`, this.indicadorElement.style.opacity = "1";
|
|
204
176
|
});
|
|
205
177
|
}
|
|
206
178
|
}
|
|
207
|
-
function
|
|
179
|
+
function k(s, n, t, i) {
|
|
208
180
|
if (t) return;
|
|
209
181
|
const e = Array.from(
|
|
210
|
-
|
|
182
|
+
n.querySelectorAll(".ui-segmented__item:not(:disabled)")
|
|
211
183
|
);
|
|
212
184
|
if (e.length === 0) return;
|
|
213
|
-
const
|
|
214
|
-
let
|
|
185
|
+
const a = e.findIndex((l) => l.classList.contains("ui-segmented__item--ativo"));
|
|
186
|
+
let r = a;
|
|
215
187
|
if (s.key === "ArrowRight" || s.key === "ArrowDown")
|
|
216
|
-
s.preventDefault(),
|
|
188
|
+
s.preventDefault(), r = (a + 1) % e.length;
|
|
217
189
|
else if (s.key === "ArrowLeft" || s.key === "ArrowUp")
|
|
218
|
-
s.preventDefault(),
|
|
190
|
+
s.preventDefault(), r = (a - 1 + e.length) % e.length;
|
|
219
191
|
else if (s.key === "Home")
|
|
220
|
-
s.preventDefault(),
|
|
192
|
+
s.preventDefault(), r = 0;
|
|
221
193
|
else if (s.key === "End")
|
|
222
|
-
s.preventDefault(),
|
|
194
|
+
s.preventDefault(), r = e.length - 1;
|
|
223
195
|
else
|
|
224
196
|
return;
|
|
225
|
-
const
|
|
226
|
-
if (
|
|
227
|
-
const l = parseInt(
|
|
197
|
+
const o = e[r];
|
|
198
|
+
if (o && o.dataset.indice) {
|
|
199
|
+
const l = parseInt(o.dataset.indice, 10);
|
|
228
200
|
i(l);
|
|
229
201
|
}
|
|
230
202
|
}
|
|
231
|
-
const
|
|
203
|
+
const S = ':host{display:inline-block;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{display:inline-flex;position:relative;background-color: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:3px;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{padding:2px;height:28px}.ui-segmented--sm .ui-segmented__item{font-size:12px;padding:0 8px;height:22px}.ui-segmented--md{padding:3px;height:36px}.ui-segmented--md .ui-segmented__item{font-size:13px;padding:0 14px;height:28px}.ui-segmented--lg{padding:4px;height:42px}.ui-segmented--lg .ui-segmented__item{font-size:14px;padding:0 18px;height:32px}.ui-segmented__indicador{position:absolute;top:3px;bottom:3px;left:0;background-color: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--sm .ui-segmented__indicador{top:2px;bottom:2px}.ui-segmented--lg .ui-segmented__indicador{top:4px;bottom:4px}.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}.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}', C = [
|
|
232
204
|
"valor",
|
|
233
205
|
"value",
|
|
234
206
|
"name",
|
|
235
207
|
"disabled",
|
|
236
208
|
"tamanho",
|
|
237
209
|
"size",
|
|
238
|
-
"densidade",
|
|
239
|
-
"altura",
|
|
240
|
-
"height",
|
|
241
210
|
"largura-total",
|
|
242
211
|
"full-width",
|
|
243
212
|
"obrigatorio",
|
|
244
213
|
"required",
|
|
245
214
|
"mensagem-validacao"
|
|
246
215
|
];
|
|
247
|
-
function
|
|
216
|
+
function I() {
|
|
248
217
|
return `
|
|
249
|
-
<style>${
|
|
218
|
+
<style>${S}</style>
|
|
250
219
|
<div class="ui-segmented ui-segmented--md" part="base" role="radiogroup">
|
|
251
220
|
<div class="ui-segmented__indicador" part="indicador"></div>
|
|
252
221
|
<div class="ui-segmented__track" style="display: contents;"></div>
|
|
@@ -254,22 +223,22 @@ function U() {
|
|
|
254
223
|
</div>
|
|
255
224
|
`;
|
|
256
225
|
}
|
|
257
|
-
function
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
226
|
+
function q(s, n, t, i, e) {
|
|
227
|
+
const a = document.createElement("button");
|
|
228
|
+
a.type = "button", a.role = "radio", a.className = "ui-segmented__item", a.setAttribute("part", s.valor === t ? "opcao opcao-selecionada" : "opcao"), a.dataset.valor = s.valor, a.dataset.indice = String(n);
|
|
229
|
+
const r = s.valor === t;
|
|
230
|
+
if (a.setAttribute("aria-checked", String(r)), a.tabIndex = r ? 0 : -1, r && a.classList.add("ui-segmented__item--ativo"), (i || s.disabled) && (a.disabled = !0), s.icone) {
|
|
262
231
|
const l = document.createElement("span");
|
|
263
232
|
l.className = "ui-segmented__icone";
|
|
264
233
|
const c = document.createElement("ui-icone");
|
|
265
|
-
c.setAttribute("nome", s.icone), c.setAttribute("tamanho", "14"), l.appendChild(c),
|
|
234
|
+
c.setAttribute("nome", s.icone), c.setAttribute("tamanho", "14"), l.appendChild(c), a.appendChild(l);
|
|
266
235
|
}
|
|
267
|
-
const
|
|
268
|
-
return
|
|
236
|
+
const o = document.createElement("span");
|
|
237
|
+
return o.className = "ui-segmented__texto", o.textContent = s.rotulo, a.appendChild(o), a.addEventListener("click", (l) => {
|
|
269
238
|
l.stopPropagation(), e();
|
|
270
|
-
}),
|
|
239
|
+
}), a;
|
|
271
240
|
}
|
|
272
|
-
class
|
|
241
|
+
class m extends b {
|
|
273
242
|
constructor() {
|
|
274
243
|
super();
|
|
275
244
|
u(this, "rootElement");
|
|
@@ -278,24 +247,24 @@ class _ extends E {
|
|
|
278
247
|
u(this, "slotElement");
|
|
279
248
|
u(this, "_opcoes", []);
|
|
280
249
|
u(this, "_defaultValue", "");
|
|
281
|
-
u(this, "listeners", new
|
|
250
|
+
u(this, "listeners", new f());
|
|
282
251
|
u(this, "indicadorController");
|
|
283
252
|
u(this, "handleSlotChange", () => {
|
|
284
253
|
this._opcoes.length === 0 && this.carregarOpcoes();
|
|
285
254
|
});
|
|
286
255
|
u(this, "handleKeyDown", (t) => {
|
|
287
|
-
|
|
256
|
+
k(t, this.trackElement, this.disabled, (i) => {
|
|
288
257
|
this.selecionarIndice(i);
|
|
289
258
|
});
|
|
290
259
|
});
|
|
291
260
|
const t = this.attachShadow({ mode: "open" });
|
|
292
|
-
t.innerHTML =
|
|
261
|
+
t.innerHTML = I(), this.rootElement = t.querySelector(".ui-segmented"), this.indicadorElement = t.querySelector(".ui-segmented__indicador"), this.trackElement = t.querySelector(".ui-segmented__track"), this.slotElement = t.querySelector("slot"), this.indicadorController = new z(
|
|
293
262
|
this.trackElement,
|
|
294
263
|
this.indicadorElement
|
|
295
264
|
);
|
|
296
265
|
}
|
|
297
266
|
static get observedAttributes() {
|
|
298
|
-
return
|
|
267
|
+
return C;
|
|
299
268
|
}
|
|
300
269
|
connectedCallback() {
|
|
301
270
|
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();
|
|
@@ -368,10 +337,10 @@ class _ extends E {
|
|
|
368
337
|
if (t.length > 0) {
|
|
369
338
|
const i = [];
|
|
370
339
|
t.forEach((e) => {
|
|
371
|
-
var
|
|
340
|
+
var a, r;
|
|
372
341
|
if (e instanceof HTMLElement) {
|
|
373
|
-
const
|
|
374
|
-
i.push({ valor:
|
|
342
|
+
const o = e.getAttribute("valor") || e.getAttribute("value") || e.getAttribute("data-value") || ((a = e.textContent) == null ? void 0 : a.trim()) || "", l = e.getAttribute("label") || e.getAttribute("rotulo") || ((r = e.textContent) == null ? void 0 : r.trim()) || o, c = e.getAttribute("icone") || e.getAttribute("icon") || void 0, p = e.hasAttribute("disabled");
|
|
343
|
+
i.push({ valor: o, rotulo: l, icone: c, disabled: p });
|
|
375
344
|
}
|
|
376
345
|
}), this._opcoes = i, this.renderizarOpcoes();
|
|
377
346
|
}
|
|
@@ -379,26 +348,26 @@ class _ extends E {
|
|
|
379
348
|
renderizarOpcoes() {
|
|
380
349
|
this.trackElement.innerHTML = "";
|
|
381
350
|
const t = this.valor, i = this.disabled;
|
|
382
|
-
this._opcoes.forEach((
|
|
383
|
-
const
|
|
351
|
+
this._opcoes.forEach((a, r) => {
|
|
352
|
+
const o = q(
|
|
353
|
+
a,
|
|
384
354
|
r,
|
|
385
|
-
o,
|
|
386
355
|
t,
|
|
387
356
|
i,
|
|
388
|
-
() => this.selecionarIndice(
|
|
357
|
+
() => this.selecionarIndice(r)
|
|
389
358
|
);
|
|
390
|
-
this.trackElement.appendChild(
|
|
359
|
+
this.trackElement.appendChild(o);
|
|
391
360
|
});
|
|
392
361
|
const e = this.required || this.hasAttribute("sem-selecao-inicial");
|
|
393
362
|
!t && this._opcoes.length > 0 && !e ? this.selecionarIndice(0, !1) : this.indicadorController.atualizar(), this.atualizarValidade();
|
|
394
363
|
}
|
|
395
364
|
selecionarIndice(t, i = !0) {
|
|
396
|
-
var
|
|
365
|
+
var r, o;
|
|
397
366
|
if (this.disabled) return;
|
|
398
367
|
const e = this._opcoes[t];
|
|
399
368
|
if (!e || e.disabled) return;
|
|
400
|
-
const
|
|
401
|
-
this.setAttribute("valor", e.valor), this.internals && ((
|
|
369
|
+
const a = this.valor;
|
|
370
|
+
this.setAttribute("valor", e.valor), this.internals && ((o = (r = this.internals).setFormValue) == null || o.call(r, e.valor)), this.atualizarSelecao(e.valor), i && a !== e.valor && (this.dispatchEvent(
|
|
402
371
|
new CustomEvent("ui-change", {
|
|
403
372
|
detail: { valor: e.valor, rotulo: e.rotulo, indice: t },
|
|
404
373
|
bubbles: !0,
|
|
@@ -413,95 +382,31 @@ class _ extends E {
|
|
|
413
382
|
));
|
|
414
383
|
}
|
|
415
384
|
atualizarSelecao(t) {
|
|
416
|
-
var e,
|
|
417
|
-
Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
}), this.internals && ((
|
|
385
|
+
var e, a;
|
|
386
|
+
Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((r) => {
|
|
387
|
+
const o = r.dataset.valor === t;
|
|
388
|
+
r.classList.toggle("ui-segmented__item--ativo", o), x(r, "opcao-selecionada", o), r.setAttribute("aria-checked", String(o)), r.tabIndex = o ? 0 : -1, o && r.focus();
|
|
389
|
+
}), this.internals && ((a = (e = this.internals).setFormValue) == null || a.call(e, t)), this.indicadorController.atualizar(), this.atualizarValidade();
|
|
421
390
|
}
|
|
422
391
|
syncState() {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
) ?? "md", i = this.hasAttribute("largura-total") || this.hasAttribute("full-width"), e = this.disabled;
|
|
427
|
-
this.rootElement.className = `ui-segmented ui-segmented--${t}`, i && this.rootElement.classList.add("ui-segmented--full"), this.rootElement.setAttribute("aria-disabled", String(e)), Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((o) => {
|
|
428
|
-
o.disabled = e;
|
|
392
|
+
const t = this.getAttribute("tamanho") || this.getAttribute("size") || "md", i = this.hasAttribute("largura-total") || this.hasAttribute("full-width"), e = this.disabled;
|
|
393
|
+
this.rootElement.className = `ui-segmented ui-segmented--${t}`, i && this.rootElement.classList.add("ui-segmented--full"), this.rootElement.setAttribute("aria-disabled", String(e)), Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((r) => {
|
|
394
|
+
r.disabled = e;
|
|
429
395
|
}), this.indicadorController.atualizar(), this.atualizarValidade();
|
|
430
396
|
}
|
|
431
397
|
}
|
|
432
|
-
class
|
|
433
|
-
}
|
|
434
|
-
p("ui-segmented", _);
|
|
435
|
-
p("ui-segmento", P);
|
|
436
|
-
const B = ':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}';
|
|
437
|
-
class X extends v {
|
|
438
|
-
static get observedAttributes() {
|
|
439
|
-
return ["tamanho", "size", "densidade", "altura", "height"];
|
|
440
|
-
}
|
|
441
|
-
constructor() {
|
|
442
|
-
super();
|
|
443
|
-
const a = this.attachShadow({ mode: "open" });
|
|
444
|
-
a.innerHTML = `<style>${B}</style><slot></slot>`;
|
|
445
|
-
}
|
|
446
|
-
connectedCallback() {
|
|
447
|
-
f(this);
|
|
448
|
-
}
|
|
449
|
-
attributeChangedCallback(a, t, i) {
|
|
450
|
-
t !== i && f(this);
|
|
451
|
-
}
|
|
452
|
-
lerTexto(a) {
|
|
453
|
-
return this.getAttribute(a);
|
|
454
|
-
}
|
|
455
|
-
definirTexto(a, t) {
|
|
456
|
-
t == null || t === "" ? this.removeAttribute(a) : this.setAttribute(a, String(t));
|
|
457
|
-
}
|
|
458
|
-
get tamanho() {
|
|
459
|
-
return this.lerTexto("tamanho");
|
|
460
|
-
}
|
|
461
|
-
set tamanho(a) {
|
|
462
|
-
this.definirTexto("tamanho", a);
|
|
463
|
-
}
|
|
464
|
-
get altura() {
|
|
465
|
-
return this.lerTexto("altura");
|
|
466
|
-
}
|
|
467
|
-
set altura(a) {
|
|
468
|
-
this.definirTexto("altura", a === null ? null : String(a));
|
|
469
|
-
}
|
|
470
|
-
get alinhar() {
|
|
471
|
-
return this.lerTexto("alinhar");
|
|
472
|
-
}
|
|
473
|
-
set alinhar(a) {
|
|
474
|
-
this.definirTexto("alinhar", a);
|
|
475
|
-
}
|
|
476
|
-
get justificar() {
|
|
477
|
-
return this.lerTexto("justificar");
|
|
478
|
-
}
|
|
479
|
-
set justificar(a) {
|
|
480
|
-
this.definirTexto("justificar", a);
|
|
481
|
-
}
|
|
482
|
-
get espaco() {
|
|
483
|
-
return this.lerTexto("espaco");
|
|
484
|
-
}
|
|
485
|
-
set espaco(a) {
|
|
486
|
-
this.definirTexto("espaco", a);
|
|
487
|
-
}
|
|
488
|
-
get semQuebra() {
|
|
489
|
-
return this.hasAttribute("sem-quebra");
|
|
490
|
-
}
|
|
491
|
-
set semQuebra(a) {
|
|
492
|
-
this.toggleAttribute("sem-quebra", !!a);
|
|
493
|
-
}
|
|
398
|
+
class L extends m {
|
|
494
399
|
}
|
|
495
|
-
|
|
400
|
+
d("ui-segmented", m);
|
|
401
|
+
d("ui-segmento", L);
|
|
496
402
|
export {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
D as t
|
|
403
|
+
C as A,
|
|
404
|
+
z as S,
|
|
405
|
+
w as U,
|
|
406
|
+
m as a,
|
|
407
|
+
L as b,
|
|
408
|
+
A as c,
|
|
409
|
+
q as d,
|
|
410
|
+
I as e,
|
|
411
|
+
k as t
|
|
507
412
|
};
|