@thibezer/ui-components-kit 2.6.1 → 2.8.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 +265 -204
- package/README.md +815 -791
- package/dist/acessibilidade-CSzX-DkG.cjs +1 -0
- package/dist/acessibilidade-CUlSXc2X.js +38 -0
- package/dist/altura-controle-ukMRPckR.cjs +1 -0
- package/dist/altura-controle-vxQiXG4q.js +62 -0
- package/dist/botao.cjs +1 -1
- package/dist/botao.js +1 -1
- package/dist/camadas.cjs +94 -94
- package/dist/camadas.js +1218 -1124
- package/dist/campo-texto.cjs +1 -1
- package/dist/campo-texto.js +1 -1
- package/dist/canvas.cjs +66 -65
- package/dist/canvas.js +3769 -3389
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/components/ui-alerta/ui-toast.d.ts +4 -15
- package/dist/components/ui-avatar/ui-avatar.d.ts +11 -0
- package/dist/components/ui-badge/ui-badge.d.ts +2 -0
- package/dist/components/ui-barra-ferramentas/paleta-atalhos.d.ts +16 -0
- package/dist/components/ui-barra-ferramentas/paleta-pressao-longa.d.ts +24 -0
- package/dist/components/ui-barra-ferramentas/ribbon-render.d.ts +14 -0
- package/dist/components/ui-barra-ferramentas/ribbon-teclado.d.ts +17 -0
- package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +1 -7
- package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +0 -1
- package/dist/components/ui-camadas/camadas-arraste-controles.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +4 -11
- package/dist/components/ui-camadas/camadas-colecao.d.ts +27 -0
- package/dist/components/ui-camadas/camadas-drag-drop.d.ts +13 -1
- package/dist/components/ui-camadas/camadas-drop-ops.d.ts +31 -0
- package/dist/components/ui-camadas/camadas-hierarquia.d.ts +10 -0
- package/dist/components/ui-camadas/camadas-lembranca.d.ts +34 -0
- package/dist/components/ui-camadas/camadas-render.d.ts +14 -0
- package/dist/components/ui-camadas/camadas-renomear.d.ts +12 -0
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +17 -0
- package/dist/components/ui-camadas/camadas-thumb.d.ts +1 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +3 -5
- package/dist/components/ui-canvas-cad/cad-acessibilidade.d.ts +15 -0
- package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +2 -1
- package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +1 -1
- package/dist/components/ui-canvas-cad/cad-evento-coordenadas.d.ts +22 -0
- package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +3 -8
- package/dist/components/ui-canvas-cad/cad-feicoes-camera.d.ts +26 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-consulta.d.ts +21 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-dados.d.ts +39 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-desenho.d.ts +68 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-edicao.d.ts +37 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-operacoes.d.ts +48 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-ponteiro.d.ts +24 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-selecao-regiao.d.ts +22 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-tipos.d.ts +53 -0
- package/dist/components/ui-canvas-cad/cad-feicoes-versoes.d.ts +33 -0
- package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +26 -106
- package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +3 -1
- package/dist/components/ui-canvas-cad/cad-leaflet-adaptador.d.ts +5 -0
- package/dist/components/ui-canvas-cad/cad-selecao-pontos.d.ts +5 -0
- package/dist/components/ui-canvas-cad/tipos.d.ts +37 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +4 -1
- package/dist/components/ui-checkbox/ui-checkbox.d.ts +4 -1
- package/dist/components/ui-linha/index.d.ts +1 -0
- package/dist/components/ui-linha/ui-linha.d.ts +48 -0
- package/dist/components/ui-mapa/mapa-atributos.d.ts +14 -0
- package/dist/components/ui-mapa/mapa-basemaps.d.ts +7 -0
- package/dist/components/ui-mapa/mapa-icones.d.ts +4 -0
- package/dist/components/ui-mapa/mapa-leaflet.d.ts +5 -0
- package/dist/components/ui-mapa/mapa-vinculo-pai.d.ts +22 -0
- package/dist/components/ui-mapa/tipos.d.ts +13 -0
- package/dist/components/ui-mapa/ui-mapa-linha.d.ts +12 -5
- package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +15 -6
- package/dist/components/ui-mapa/ui-mapa.d.ts +14 -1
- package/dist/components/ui-modal/modal-acessibilidade.d.ts +5 -5
- package/dist/components/ui-modal/modal-foco.d.ts +28 -0
- package/dist/components/ui-modal/ui-modal.d.ts +1 -11
- package/dist/components/ui-radio/radio-grupo-registry.d.ts +10 -0
- package/dist/components/ui-radio/ui-radio.d.ts +9 -2
- package/dist/components/ui-skeleton/ui-skeleton.d.ts +9 -0
- package/dist/components/ui-switch/ui-switch.d.ts +3 -1
- package/dist/components/ui-tabela/tabela-estados.d.ts +16 -0
- package/dist/components/ui-tabela/tabela-rolagem.d.ts +44 -0
- package/dist/components/ui-tabela/tabela-teclado.d.ts +16 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +1 -19
- package/dist/components/ui-tooltip/tooltip-popover.d.ts +7 -0
- package/dist/components/ui-tooltip/tooltip-posicionamento.d.ts +29 -0
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +24 -1
- package/dist/core/altura-controle.d.ts +34 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/opcoes.d.ts +9 -0
- package/dist/core/rotulo-controle.d.ts +13 -0
- package/dist/core/tipos-toast.d.ts +16 -0
- package/dist/core/ui-bus.d.ts +9 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +29 -19
- package/dist/custom-elements.json +20984 -15700
- package/dist/data.cjs +1 -1
- package/dist/data.js +2 -2
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +21 -21
- package/dist/form-validacao-BlQFxUVj.js +104 -0
- package/dist/form-validacao-DIeyQVH5.cjs +1 -0
- package/dist/forms.cjs +1 -1
- package/dist/forms.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +178 -177
- package/dist/mapa.cjs +11 -16
- package/dist/mapa.js +242 -170
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/opcoes-CJYLi6kd.js +12 -0
- package/dist/opcoes-CkyDxBuQ.cjs +1 -0
- package/dist/register.cjs +1 -1
- package/dist/register.js +13 -14
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +1 -1
- package/dist/tipos-elementos.d.ts +33 -3
- package/dist/tipos-react.d.ts +2 -0
- package/dist/tipos-vue.d.ts +32 -3
- package/dist/tools.cjs +1 -1
- package/dist/tools.js +1 -1
- package/dist/ui-badge-BWhoGgo9.js +197 -0
- package/dist/ui-badge-SIR81R9l.cjs +28 -0
- package/dist/ui-botao-D24oXySA.cjs +12 -0
- package/dist/ui-botao-Dsj08jjw.js +165 -0
- package/dist/{zero-js-triggers-C_KrvFOQ.js → ui-bus-CUd99VJi.js} +36 -103
- package/dist/ui-bus-XqBLlTYQ.cjs +1 -0
- package/dist/{ui-campo-texto-Uu2dJE_0.js → ui-campo-texto-B_OHVGiN.js} +51 -51
- package/dist/ui-campo-texto-DauJCde3.cjs +16 -0
- package/dist/{ui-card-C_o5_0cB.js → ui-card-BNYCQ7g-.js} +50 -42
- package/dist/ui-card-BrjBL-yo.cjs +20 -0
- package/dist/ui-kit.css +1 -1
- package/dist/ui-linha-C6HBnsaw.cjs +19 -0
- package/dist/{ui-segmented-wUraId2e.js → ui-linha-nCDh2wPm.js} +200 -105
- package/dist/{ui-modal-DBOtSTbR.js → ui-modal-BkYvNP0G.js} +116 -140
- package/dist/ui-modal-CUNbpbZ1.cjs +18 -0
- package/dist/{ui-paleta-ferramentas-DNN5i6nL.js → ui-paleta-ferramentas-Ksh6gMW3.js} +359 -329
- package/dist/{ui-paleta-ferramentas-Ccmo-rB5.cjs → ui-paleta-ferramentas-bDLPbiGA.cjs} +7 -7
- package/dist/ui-skeleton-B2Rgrv8o.js +648 -0
- package/dist/ui-skeleton-DiOxTBZK.cjs +52 -0
- package/dist/ui-switch-D9a8XlVX.cjs +53 -0
- package/dist/{ui-switch-BcOqOkiV.js → ui-switch-DO1R0Ce7.js} +187 -128
- package/dist/{ui-tabela-propriedades-BokvDD3b.js → ui-tabela-propriedades-D9Echt2X.js} +845 -826
- package/dist/{ui-tabela-propriedades-BecPqC-e.cjs → ui-tabela-propriedades-DzZlyNZ_.cjs} +10 -10
- package/dist/zero-js-triggers-CJT988bR.js +83 -0
- package/dist/zero-js-triggers-CgM9IIQB.cjs +1 -0
- package/package.json +9 -2
- package/dist/form-validacao-BIOXxt-1.js +0 -140
- package/dist/form-validacao-ytRYSF3E.cjs +0 -1
- package/dist/ui-badge-BxT-sDmV.cjs +0 -28
- package/dist/ui-badge-C0eKBI8E.js +0 -183
- package/dist/ui-botao-BOOnP8ds.cjs +0 -12
- package/dist/ui-botao-DfqSivHl.js +0 -165
- package/dist/ui-campo-texto-Cnn2UAkS.cjs +0 -16
- package/dist/ui-card-B86lJXTP.cjs +0 -20
- package/dist/ui-modal-CvGFGh1h.cjs +0 -18
- package/dist/ui-segmented-D6b6zxVs.cjs +0 -19
- package/dist/ui-skeleton-DI4_9WOX.js +0 -428
- package/dist/ui-skeleton-elhKIh2B.cjs +0 -33
- package/dist/ui-switch-D7iPKDj-.cjs +0 -53
- package/dist/ui-toast-Bp_NlM5G.js +0 -156
- package/dist/ui-toast-DGTZKne5.cjs +0 -20
- package/dist/zero-js-triggers-C_gtaojZ.cjs +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var a = (
|
|
4
|
-
import { L as
|
|
5
|
-
import { a as
|
|
1
|
+
var k = Object.defineProperty;
|
|
2
|
+
var y = (o, i, t) => i in o ? k(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t;
|
|
3
|
+
var a = (o, i, t) => y(o, typeof i != "symbol" ? i + "" : i, t);
|
|
4
|
+
import { L as u } from "./listener-bag-DQgv7OON.js";
|
|
5
|
+
import { a as w } from "./parts-CaoQiCfI.js";
|
|
6
6
|
import { d as h } from "./ssr-safe-5cWfJP-s.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
7
|
+
import { b as f } from "./altura-controle-vxQiXG4q.js";
|
|
8
|
+
import { F as d, r as A } from "./ui-campo-texto-B_OHVGiN.js";
|
|
9
|
+
import { g as b, o as x, c as m } from "./acessibilidade-CUlSXc2X.js";
|
|
10
|
+
class E {
|
|
10
11
|
constructor(i, t, e) {
|
|
11
12
|
a(this, "scrollHandler");
|
|
12
13
|
a(this, "resizeHandler");
|
|
@@ -46,7 +47,7 @@ class A {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
class
|
|
50
|
+
class C {
|
|
50
51
|
constructor(i) {
|
|
51
52
|
a(this, "focusedIndex", -1);
|
|
52
53
|
this.listElement = i;
|
|
@@ -72,12 +73,12 @@ class E {
|
|
|
72
73
|
i.preventDefault(), this.moverFoco(-1);
|
|
73
74
|
else if (i.key === "Home" || i.key === "End") {
|
|
74
75
|
i.preventDefault();
|
|
75
|
-
const
|
|
76
|
-
this.focusedIndex =
|
|
76
|
+
const n = i.key === "End";
|
|
77
|
+
this.focusedIndex = n ? -1 : 0, n ? this.moverFoco(-1) : this.moverFoco(0);
|
|
77
78
|
} else i.key === "Tab" ? s() : i.key === "Enter" || i.key === " " ? (i.preventDefault(), this.focusedIndex >= 0 && this.focusedIndex < t.length && e(t[this.focusedIndex])) : i.key === "Escape" && (i.preventDefault(), s(), r.focus());
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
const S = ':host{display:inline-block;position:relative;width:100%;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){width:auto}.ui-lista-flutuante__container{display:flex;flex-direction:column;width:100%;position:relative}.ui-lista-flutuante__label{font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-medio, 500);color:var(--ui-cor-texto, #e1e1e6);margin-bottom:4px;-webkit-user-select:none;user-select:none;flex-shrink:0}.ui-lista-flutuante__asterisco{color:var(--ui-cor-texto-erro, #ff5555);margin-left:2px}.ui-lista-flutuante__gatilho{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;height:var(--ui-campo-altura,
|
|
81
|
+
const S = ':host{display:inline-block;position:relative;width:100%;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){width:auto;vertical-align:middle}.ui-lista-flutuante__container{display:flex;flex-direction:column;width:100%;position:relative}.ui-lista-flutuante__label{font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-medio, 500);color:var(--ui-cor-texto, #e1e1e6);margin-bottom:4px;-webkit-user-select:none;user-select:none;flex-shrink:0}.ui-lista-flutuante__asterisco{color:var(--ui-cor-texto-erro, #ff5555);margin-left:2px}.ui-lista-flutuante__gatilho{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;height:var(--ui-campo-altura, 34px);min-height:var(--ui-campo-altura, 34px);padding:0 8px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:clamp(11px,.85rem,13px);line-height:1;cursor:pointer;box-sizing:border-box;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:border-color .15s ease,background-color .15s ease}.ui-lista-flutuante__gatilho:hover:not(:disabled){border-color:var(--ui-cor-primaria, #00E08A)}.ui-lista-flutuante__gatilho:disabled{opacity:.5;cursor:not-allowed}.ui-lista-flutuante__texto{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;text-align:left}.ui-lista-flutuante__seta{font-size:10px;line-height:1;display:inline-flex;align-items:center;justify-content:center;transition:transform .2s ease;color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0;shape-rendering:geometricPrecision}:host([aberta]) .ui-lista-flutuante__seta{transform:rotate(180deg)}.ui-lista-flutuante__backdrop{display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;z-index:calc(var(--ui-z-popover, 1050) - 1)}:host([aberta]) .ui-lista-flutuante__backdrop{display:block}:host(:not([aberta])) .ui-lista-flutuante__conteudo{display:none!important}:host([aberta]) .ui-lista-flutuante__conteudo{display:block}.ui-lista-flutuante__conteudo{position:fixed;margin:0;padding:4px;list-style:none;background-color:var(--ui-cor-fundo-menu, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .14));border-radius:var(--ui-raio-borda, 6px);box-shadow:var(--ui-sombra-lg, 0 8px 28px rgba(0, 0, 0, .55));max-height:220px;overflow-y:auto;z-index:var(--ui-z-popover, 1050);box-sizing:border-box;inset:auto}.ui-lista-flutuante__sheet-header{display:none;width:100%;margin-bottom:8px}.ui-lista-flutuante__handle{width:36px;height:4px;border-radius:2px;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent);margin:2px auto 8px}.ui-lista-flutuante__sheet-title-bar{display:flex;align-items:center;justify-content:space-between;width:100%;padding:4px 6px 8px;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));margin-bottom:6px}.ui-lista-flutuante__sheet-titulo{font-size:13px;font-weight:600;color:var(--ui-cor-primaria, #00E08A);letter-spacing:.3px;text-transform:uppercase}.ui-lista-flutuante__sheet-close{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-size:14px;cursor:pointer;padding:4px 8px;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:color .15s,background-color .15s}.ui-lista-flutuante__sheet-close:hover{color:#fff;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-lista-flutuante__item{padding:6px 10px;font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:12px;line-height:1.2;color:var(--ui-cor-texto, #e1e1e6);border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .12s ease,color .12s ease;-webkit-user-select:none;user-select:none}.ui-lista-flutuante__item:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-lista-flutuante__item--selecionado{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent);color:var(--ui-cor-primaria, #00E08A);font-weight:600}.ui-lista-flutuante__item--selecionado:after{content:"✓";font-size:11px;color:var(--ui-cor-primaria, #00E08A)}@media (max-width: 640px){.ui-lista-flutuante__gatilho{min-height:max(var(--ui-campo-altura, 38px),38px);font-size:15px}:host([aberta]) .ui-lista-flutuante__backdrop{background-color:#00000059;-webkit-backdrop-filter:none;backdrop-filter:none}.ui-lista-flutuante__conteudo{position:fixed!important;bottom:0!important;top:auto!important;left:0!important;width:100vw!important;max-width:100vw!important;min-width:100vw!important;max-height:70vh!important;max-height:70dvh!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;border-bottom:none!important;padding:10px 16px calc(24px + env(safe-area-inset-bottom,0px)) 16px!important;box-shadow:0 -8px 32px #000000b3!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;animation:ui-bottom-sheet-slide .22s cubic-bezier(.4,0,.2,1)}.ui-lista-flutuante__sheet-header{display:flex!important;flex-direction:column!important}.ui-lista-flutuante__sheet-close{min-width:44px;min-height:44px;font-size:18px}.ui-lista-flutuante__item{padding:12px 14px!important;font-size:15px!important;margin-bottom:3px}}:host([bottom-sheet][aberta]) .ui-lista-flutuante__backdrop,:host([modo-mobile][aberta]) .ui-lista-flutuante__backdrop{background-color:#00000059;-webkit-backdrop-filter:none;backdrop-filter:none}:host([bottom-sheet]) .ui-lista-flutuante__conteudo,:host([modo-mobile]) .ui-lista-flutuante__conteudo{position:fixed!important;bottom:0!important;top:auto!important;left:0!important;width:100vw!important;max-width:100vw!important;min-width:100vw!important;max-height:70vh!important;max-height:70dvh!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;border-bottom:none!important;padding:10px 16px calc(24px + env(safe-area-inset-bottom,0px)) 16px!important;box-shadow:0 -8px 32px #000000b3!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;animation:ui-bottom-sheet-slide .22s cubic-bezier(.4,0,.2,1)}:host([bottom-sheet]) .ui-lista-flutuante__sheet-header,:host([modo-mobile]) .ui-lista-flutuante__sheet-header{display:flex!important;flex-direction:column!important}:host([bottom-sheet]) .ui-lista-flutuante__sheet-close,:host([modo-mobile]) .ui-lista-flutuante__sheet-close{min-width:44px;min-height:44px;font-size:18px}:host([bottom-sheet]) .ui-lista-flutuante__item,:host([modo-mobile]) .ui-lista-flutuante__item{padding:12px 14px!important;font-size:15px!important;margin-bottom:3px}@keyframes ui-bottom-sheet-slide{0%{transform:translateY(100%)}to{transform:translateY(0)}}', L = [
|
|
81
82
|
"aberta",
|
|
82
83
|
"texto-padrao",
|
|
83
84
|
"value",
|
|
@@ -98,7 +99,7 @@ const S = ':host{display:inline-block;position:relative;width:100%;box-sizing:bo
|
|
|
98
99
|
"mensagem-validacao",
|
|
99
100
|
"aria-label"
|
|
100
101
|
];
|
|
101
|
-
function
|
|
102
|
+
function z() {
|
|
102
103
|
return `
|
|
103
104
|
<style>${S}</style>
|
|
104
105
|
<div class="ui-lista-flutuante__container">
|
|
@@ -121,19 +122,19 @@ function C() {
|
|
|
121
122
|
</div>
|
|
122
123
|
`;
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
125
|
+
function g(o, i, t) {
|
|
126
|
+
o.innerHTML = "", i.forEach((e) => {
|
|
126
127
|
const s = document.createElement("li"), r = String(e.id) === String(t);
|
|
127
|
-
s.className = `ui-lista-flutuante__item ${r ? "ui-lista-flutuante__item--selecionado" : ""}`, s.setAttribute("data-id", e.id), s.textContent = e.label, s.role = "option", s.tabIndex = -1, s.setAttribute("part", r ? "opcao opcao-selecionada" : "opcao"), r && s.setAttribute("aria-selected", "true"),
|
|
128
|
+
s.className = `ui-lista-flutuante__item ${r ? "ui-lista-flutuante__item--selecionado" : ""}`, s.setAttribute("data-id", e.id), s.textContent = e.label, s.role = "option", s.tabIndex = -1, s.setAttribute("part", r ? "opcao opcao-selecionada" : "opcao"), r && s.setAttribute("aria-selected", "true"), o.appendChild(s);
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
-
|
|
131
|
+
function q(o, i) {
|
|
132
|
+
o.querySelectorAll(".ui-lista-flutuante__item").forEach((e) => {
|
|
132
133
|
const s = e.getAttribute("data-id");
|
|
133
|
-
|
|
134
|
+
w(e, "opcao-selecionada", s === String(i)), s === String(i) ? (e.classList.add("ui-lista-flutuante__item--selecionado"), e.setAttribute("aria-selected", "true")) : (e.classList.remove("ui-lista-flutuante__item--selecionado"), e.removeAttribute("aria-selected"));
|
|
134
135
|
});
|
|
135
136
|
}
|
|
136
|
-
class
|
|
137
|
+
class v extends d {
|
|
137
138
|
constructor() {
|
|
138
139
|
super();
|
|
139
140
|
a(this, "labelElement");
|
|
@@ -145,7 +146,7 @@ class g extends u {
|
|
|
145
146
|
a(this, "sheetTituloElement");
|
|
146
147
|
a(this, "sheetCloseButton");
|
|
147
148
|
a(this, "idsAcessibilidade");
|
|
148
|
-
a(this, "listeners", new
|
|
149
|
+
a(this, "listeners", new u());
|
|
149
150
|
a(this, "_itens", []);
|
|
150
151
|
a(this, "_value", "");
|
|
151
152
|
a(this, "_defaultValue", "");
|
|
@@ -187,25 +188,25 @@ class g extends u {
|
|
|
187
188
|
this.disabled || this.button.focus();
|
|
188
189
|
});
|
|
189
190
|
a(this, "handleHostClick", (t) => {
|
|
190
|
-
|
|
191
|
+
m(this, t) && this.focarGatilho();
|
|
191
192
|
});
|
|
192
193
|
a(this, "handleListClick", (t) => {
|
|
193
|
-
var
|
|
194
|
+
var n;
|
|
194
195
|
t.stopPropagation();
|
|
195
|
-
const e = (
|
|
196
|
+
const e = (n = t.target) == null ? void 0 : n.closest("li[data-id]");
|
|
196
197
|
if (!e) return;
|
|
197
|
-
const s = e.getAttribute("data-id"), r = this._itens.find((
|
|
198
|
+
const s = e.getAttribute("data-id"), r = this._itens.find((c) => String(c.id) === String(s));
|
|
198
199
|
r && this.selecionarItem(r);
|
|
199
200
|
});
|
|
200
201
|
const t = this.attachShadow({ mode: "open" });
|
|
201
|
-
t.innerHTML =
|
|
202
|
-
const e =
|
|
202
|
+
t.innerHTML = z(), this.labelElement = t.querySelector(".ui-lista-flutuante__label"), this.button = t.querySelector(".ui-lista-flutuante__gatilho"), this.content = t.querySelector(".ui-lista-flutuante__conteudo"), this.listElement = t.querySelector(".ui-lista-flutuante__lista"), this.textoElement = t.querySelector(".ui-lista-flutuante__texto"), this.backdropElement = t.querySelector(".ui-lista-flutuante__backdrop"), this.sheetTituloElement = t.querySelector(".ui-lista-flutuante__sheet-titulo"), this.sheetCloseButton = t.querySelector(".ui-lista-flutuante__sheet-close");
|
|
203
|
+
const e = b("ui-select");
|
|
203
204
|
this.idsAcessibilidade = {
|
|
204
205
|
label: `${e}-label`,
|
|
205
206
|
gatilho: `${e}-gatilho`,
|
|
206
207
|
texto: `${e}-texto`,
|
|
207
208
|
lista: `${e}-lista`
|
|
208
|
-
}, this.labelElement.id = this.idsAcessibilidade.label, this.button.id = this.idsAcessibilidade.gatilho, this.textoElement.id = this.idsAcessibilidade.texto, this.content.id = this.idsAcessibilidade.lista, this.button.setAttribute("aria-controls", this.idsAcessibilidade.lista), this.posicionamento = new
|
|
209
|
+
}, this.labelElement.id = this.idsAcessibilidade.label, this.button.id = this.idsAcessibilidade.gatilho, this.textoElement.id = this.idsAcessibilidade.texto, this.content.id = this.idsAcessibilidade.lista, this.button.setAttribute("aria-controls", this.idsAcessibilidade.lista), this.posicionamento = new E(this, this.button, this.content), this.teclado = new C(this.listElement);
|
|
209
210
|
}
|
|
210
211
|
static get observedAttributes() {
|
|
211
212
|
return L;
|
|
@@ -218,25 +219,25 @@ class g extends u {
|
|
|
218
219
|
carregarItensFilhos() {
|
|
219
220
|
const t = Array.from(this.querySelectorAll('option, ui-opcao, [role="option"], [data-opcao], [data-value]:not(input):not(select)'));
|
|
220
221
|
t.length > 0 && (this._itens = t.map((e, s) => {
|
|
221
|
-
var
|
|
222
|
+
var n;
|
|
222
223
|
const r = e.getAttribute("value") || e.getAttribute("data-value") || String(s + 1);
|
|
223
224
|
return {
|
|
224
225
|
id: r,
|
|
225
|
-
label: ((
|
|
226
|
+
label: ((n = e.textContent) == null ? void 0 : n.trim()) || r || `Opção ${s + 1}`
|
|
226
227
|
};
|
|
227
|
-
}),
|
|
228
|
+
}), g(this.listElement, this._itens, this._value), this.syncLabel());
|
|
228
229
|
}
|
|
229
230
|
disconnectedCallback() {
|
|
230
231
|
this.listeners.cleanup(), this.observer && this.observer.disconnect(), this.fechar();
|
|
231
232
|
}
|
|
232
233
|
attributeChangedCallback(t, e, s) {
|
|
233
|
-
t === "aberta" && this.button.setAttribute("aria-expanded", String(s !== null)), (t === "texto-padrao" || t === "placeholder" || t === "label" || t === "rotulo" || t === "aria-label") && this.syncLabel(), t === "value" && s !== this._value && (this.value = s || ""), t === "disabled" && (this.button.disabled = this.disabled), (t === "altura" || t === "height"
|
|
234
|
+
t === "aberta" && this.button.setAttribute("aria-expanded", String(s !== null)), (t === "texto-padrao" || t === "placeholder" || t === "label" || t === "rotulo" || t === "aria-label") && this.syncLabel(), t === "value" && s !== this._value && (this.value = s || ""), t === "disabled" && (this.button.disabled = this.disabled), (t === "altura" || t === "height" || t === "tamanho" || t === "size" || t === "densidade") && f(this);
|
|
234
235
|
}
|
|
235
236
|
get value() {
|
|
236
237
|
return this._value;
|
|
237
238
|
}
|
|
238
239
|
set value(t) {
|
|
239
|
-
this._value = t, this.setAttribute("value", t), this.internals.setFormValue(t), this.syncLabel(),
|
|
240
|
+
this._value = t, this.setAttribute("value", t), this.internals.setFormValue(t), this.syncLabel(), q(this.listElement, this._value), this.atualizarValidade();
|
|
240
241
|
}
|
|
241
242
|
get label() {
|
|
242
243
|
return this.getAttribute("label") || this.getAttribute("rotulo") || "";
|
|
@@ -290,7 +291,7 @@ class g extends u {
|
|
|
290
291
|
return this._itens;
|
|
291
292
|
}
|
|
292
293
|
set itens(t) {
|
|
293
|
-
this._itens = t || [],
|
|
294
|
+
this._itens = t || [], g(this.listElement, this._itens, this._value), this.syncLabel();
|
|
294
295
|
}
|
|
295
296
|
abrir() {
|
|
296
297
|
this.disabled || this.hasAttribute("aberta") || (this.setAttribute("aberta", ""), this.posicionamento.posicionar(), this.posicionamento.ativarAcompanhamento(this.fechar));
|
|
@@ -298,7 +299,7 @@ class g extends u {
|
|
|
298
299
|
syncLabel() {
|
|
299
300
|
const t = this.getAttribute("label") || this.getAttribute("rotulo");
|
|
300
301
|
if (t)
|
|
301
|
-
|
|
302
|
+
A(this.labelElement, t, this.required, "ui-lista-flutuante__asterisco"), this.labelElement.style.display = "block", this.sheetTituloElement.textContent = t, this.button.setAttribute("aria-labelledby", `${this.idsAcessibilidade.label} ${this.idsAcessibilidade.texto}`), this.content.setAttribute("aria-labelledby", this.idsAcessibilidade.label), this.button.removeAttribute("aria-label"), this.content.removeAttribute("aria-label");
|
|
302
303
|
else {
|
|
303
304
|
this.labelElement.style.display = "none", this.sincronizarRotuloExterno();
|
|
304
305
|
const s = this.getAttribute("texto-padrao") || this.getAttribute("placeholder") || "Opções";
|
|
@@ -315,12 +316,11 @@ class g extends u {
|
|
|
315
316
|
/** Sem o atributo `label`, usa o rótulo de fora do Shadow DOM (aria-label, <label for>, <label> envolvente). */
|
|
316
317
|
sincronizarRotuloExterno() {
|
|
317
318
|
this.button.removeAttribute("aria-labelledby"), this.content.removeAttribute("aria-labelledby");
|
|
318
|
-
const t =
|
|
319
|
+
const t = x(this, this.internals);
|
|
319
320
|
t ? (this.button.setAttribute("aria-labelledby", `${this.idsAcessibilidade.gatilho} ${this.idsAcessibilidade.texto}`), this.button.setAttribute("aria-label", t), this.content.setAttribute("aria-label", t)) : (this.button.removeAttribute("aria-label"), this.content.removeAttribute("aria-label"));
|
|
320
321
|
}
|
|
321
322
|
syncState() {
|
|
322
|
-
|
|
323
|
-
t && this.style.setProperty("--ui-campo-altura", isNaN(Number(t)) ? t : `${t}px`), this.hasAttribute("value") && (this._value = this.getAttribute("value") || "", this.internals.setFormValue(this._value)), this.syncLabel(), this.atualizarValidade();
|
|
323
|
+
f(this), this.hasAttribute("value") && (this._value = this.getAttribute("value") || "", this.internals.setFormValue(this._value)), this.syncLabel(), this.atualizarValidade();
|
|
324
324
|
}
|
|
325
325
|
selecionarItem(t) {
|
|
326
326
|
var r;
|
|
@@ -344,23 +344,35 @@ class g extends u {
|
|
|
344
344
|
);
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
class
|
|
347
|
+
class D extends v {
|
|
348
|
+
}
|
|
349
|
+
h("ui-lista-flutuante", v);
|
|
350
|
+
h("ui-select", D);
|
|
351
|
+
const I = ':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-checkbox{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:1;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-checkbox--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-checkbox__box{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;min-width:16px;min-height:16px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-sm, 4px);box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;flex-shrink:0}.ui-checkbox:focus-visible .ui-checkbox__box,.ui-checkbox--foco .ui-checkbox__box{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-checkbox--checked .ui-checkbox__box,.ui-checkbox--indeterminate .ui-checkbox__box{background-color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-checkbox__mark{width:12px;height:12px;display:flex;align-items:center;justify-content:center;transition:transform .15s cubic-bezier(.4,0,.2,1),opacity .15s ease;transform:scale(0);opacity:0}.ui-checkbox--checked .ui-checkbox__mark,.ui-checkbox--indeterminate .ui-checkbox__mark{transform:scale(1);opacity:1}.ui-checkbox__mark svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;shape-rendering:geometricPrecision}.ui-checkbox__label{display:inline-flex;align-items:center;font-size:clamp(11px,.85rem,14px);color:var(--ui-cor-texto, #e1e1e6);line-height:1}.ui-checkbox--label-esquerda{flex-direction:row-reverse}@media (max-width: 640px){.ui-checkbox{min-height:40px;padding:4px 0}.ui-checkbox__box{width:20px;height:20px;min-width:20px;min-height:20px}.ui-checkbox__mark{width:14px;height:14px}.ui-checkbox__label{font-size:14px}}';
|
|
352
|
+
function p({ host: o, internals: i, controle: t, rotulo: e, texto: s }) {
|
|
353
|
+
if (s) {
|
|
354
|
+
e.textContent = s, e.style.display = "inline", t.setAttribute("aria-labelledby", e.id), t.removeAttribute("aria-label");
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
e.style.display = "none", t.removeAttribute("aria-labelledby");
|
|
358
|
+
const r = x(o, i);
|
|
359
|
+
r ? t.setAttribute("aria-label", r) : t.removeAttribute("aria-label");
|
|
348
360
|
}
|
|
349
|
-
|
|
350
|
-
h("ui-select", I);
|
|
351
|
-
const q = ':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-checkbox{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:1;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-checkbox--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-checkbox__box{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;min-width:16px;min-height:16px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-sm, 4px);box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;flex-shrink:0}.ui-checkbox:focus-visible .ui-checkbox__box,.ui-checkbox--foco .ui-checkbox__box{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-checkbox--checked .ui-checkbox__box,.ui-checkbox--indeterminate .ui-checkbox__box{background-color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-checkbox__mark{width:12px;height:12px;display:flex;align-items:center;justify-content:center;transition:transform .15s cubic-bezier(.4,0,.2,1),opacity .15s ease;transform:scale(0);opacity:0}.ui-checkbox--checked .ui-checkbox__mark,.ui-checkbox--indeterminate .ui-checkbox__mark{transform:scale(1);opacity:1}.ui-checkbox__mark svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;shape-rendering:geometricPrecision}.ui-checkbox__label{display:inline-flex;align-items:center;font-size:clamp(11px,.85rem,14px);color:var(--ui-cor-texto, #e1e1e6);line-height:1}.ui-checkbox--label-esquerda{flex-direction:row-reverse}@media (max-width: 640px){.ui-checkbox{min-height:40px;padding:4px 0}.ui-checkbox__box{width:20px;height:20px;min-width:20px;min-height:20px}.ui-checkbox__mark{width:14px;height:14px}.ui-checkbox__label{font-size:14px}}';
|
|
352
|
-
class V extends u {
|
|
361
|
+
class V extends d {
|
|
353
362
|
constructor() {
|
|
354
363
|
super();
|
|
355
364
|
a(this, "containerElement");
|
|
356
365
|
a(this, "markElement");
|
|
357
366
|
a(this, "labelElement");
|
|
358
|
-
a(this, "listeners", new
|
|
367
|
+
a(this, "listeners", new u());
|
|
359
368
|
a(this, "_defaultChecked", !1);
|
|
360
369
|
a(this, "_defaultIndeterminate", !1);
|
|
361
370
|
a(this, "handleClick", (t) => {
|
|
362
371
|
t.preventDefault(), this.alternar();
|
|
363
372
|
});
|
|
373
|
+
a(this, "handleHostClick", (t) => {
|
|
374
|
+
m(this, t) && (this.alternar(), this.containerElement.focus());
|
|
375
|
+
});
|
|
364
376
|
a(this, "handleKeyDown", (t) => {
|
|
365
377
|
(t.key === " " || t.key === "Enter") && (t.preventDefault(), this.alternar());
|
|
366
378
|
});
|
|
@@ -372,14 +384,14 @@ class V extends u {
|
|
|
372
384
|
});
|
|
373
385
|
const t = this.attachShadow({ mode: "open" });
|
|
374
386
|
t.innerHTML = `
|
|
375
|
-
<style>${
|
|
387
|
+
<style>${I}</style>
|
|
376
388
|
<div class="ui-checkbox" part="base" tabindex="0" role="checkbox" aria-checked="false">
|
|
377
389
|
<span class="ui-checkbox__box" part="controle">
|
|
378
390
|
<span class="ui-checkbox__mark" part="indicador"></span>
|
|
379
391
|
</span>
|
|
380
392
|
<span class="ui-checkbox__label" part="rotulo" style="display: none;"></span>
|
|
381
393
|
</div>
|
|
382
|
-
`, this.containerElement = t.querySelector(".ui-checkbox"), this.markElement = t.querySelector(".ui-checkbox__mark"), this.labelElement = t.querySelector(".ui-checkbox__label");
|
|
394
|
+
`, this.containerElement = t.querySelector(".ui-checkbox"), this.markElement = t.querySelector(".ui-checkbox__mark"), this.labelElement = t.querySelector(".ui-checkbox__label"), this.labelElement.id = b("ui-checkbox-label");
|
|
383
395
|
}
|
|
384
396
|
static get observedAttributes() {
|
|
385
397
|
return [
|
|
@@ -398,7 +410,7 @@ class V extends u {
|
|
|
398
410
|
];
|
|
399
411
|
}
|
|
400
412
|
connectedCallback() {
|
|
401
|
-
this.listeners.cleanup(), this.listeners.add(this.containerElement, "click", this.handleClick), this.listeners.add(this.containerElement, "keydown", this.handleKeyDown), this.listeners.add(this.containerElement, "focus", this.handleFocus), this.listeners.add(this.containerElement, "blur", this.handleBlur), this._defaultChecked = this.hasAttribute("marcado") || this.hasAttribute("checked"), this._defaultIndeterminate = this.hasAttribute("indeterminado") || this.hasAttribute("indeterminate"), this.syncState();
|
|
413
|
+
this.listeners.cleanup(), this.listeners.add(this.containerElement, "click", this.handleClick), this.listeners.add(this.containerElement, "keydown", this.handleKeyDown), this.listeners.add(this.containerElement, "focus", this.handleFocus), this.listeners.add(this.containerElement, "blur", this.handleBlur), this.listeners.add(this, "click", this.handleHostClick), this._defaultChecked = this.hasAttribute("marcado") || this.hasAttribute("checked"), this._defaultIndeterminate = this.hasAttribute("indeterminado") || this.hasAttribute("indeterminate"), this.syncState();
|
|
402
414
|
}
|
|
403
415
|
disconnectedCallback() {
|
|
404
416
|
this.listeners.cleanup();
|
|
@@ -462,6 +474,10 @@ class V extends u {
|
|
|
462
474
|
}
|
|
463
475
|
this.internals.setValidity({});
|
|
464
476
|
}
|
|
477
|
+
/** `focus()` no host leva o foco ao controle interno (necessário para o foco de validação do formulário). */
|
|
478
|
+
focus(t) {
|
|
479
|
+
this.containerElement.focus(t);
|
|
480
|
+
}
|
|
465
481
|
alternar() {
|
|
466
482
|
this.disabled || (this.indeterminado ? (this.indeterminado = !1, this.marcado = !0) : this.marcado = !this.marcado, this.dispatchEvent(
|
|
467
483
|
new CustomEvent("ui-change", {
|
|
@@ -481,11 +497,11 @@ class V extends u {
|
|
|
481
497
|
));
|
|
482
498
|
}
|
|
483
499
|
syncState() {
|
|
484
|
-
const t = this.marcado, e = this.indeterminado, s = this.disabled, r = this.getAttribute("label"),
|
|
500
|
+
const t = this.marcado, e = this.indeterminado, s = this.disabled, r = this.getAttribute("label"), n = this.getAttribute("posicao-label") || "direita";
|
|
485
501
|
this.containerElement.setAttribute(
|
|
486
502
|
"aria-checked",
|
|
487
503
|
e ? "mixed" : String(t)
|
|
488
|
-
), s ? (this.containerElement.classList.add("ui-checkbox--disabled"), this.containerElement.setAttribute("tabindex", "-1"), this.containerElement.setAttribute("aria-disabled", "true")) : (this.containerElement.classList.remove("ui-checkbox--disabled"), this.containerElement.setAttribute("tabindex", "0"), this.containerElement.removeAttribute("aria-disabled")), t ? this.containerElement.classList.add("ui-checkbox--checked") : this.containerElement.classList.remove("ui-checkbox--checked"), e ? this.containerElement.classList.add("ui-checkbox--indeterminate") : this.containerElement.classList.remove("ui-checkbox--indeterminate"),
|
|
504
|
+
), s ? (this.containerElement.classList.add("ui-checkbox--disabled"), this.containerElement.setAttribute("tabindex", "-1"), this.containerElement.setAttribute("aria-disabled", "true")) : (this.containerElement.classList.remove("ui-checkbox--disabled"), this.containerElement.setAttribute("tabindex", "0"), this.containerElement.removeAttribute("aria-disabled")), t ? this.containerElement.classList.add("ui-checkbox--checked") : this.containerElement.classList.remove("ui-checkbox--checked"), e ? this.containerElement.classList.add("ui-checkbox--indeterminate") : this.containerElement.classList.remove("ui-checkbox--indeterminate"), n === "esquerda" ? this.containerElement.classList.add("ui-checkbox--label-esquerda") : this.containerElement.classList.remove("ui-checkbox--label-esquerda"), e ? this.markElement.innerHTML = `
|
|
489
505
|
<svg viewBox="0 0 24 24">
|
|
490
506
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
491
507
|
</svg>
|
|
@@ -493,7 +509,13 @@ class V extends u {
|
|
|
493
509
|
<svg viewBox="0 0 24 24">
|
|
494
510
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
495
511
|
</svg>
|
|
496
|
-
` : this.markElement.innerHTML = "",
|
|
512
|
+
` : this.markElement.innerHTML = "", p({
|
|
513
|
+
host: this,
|
|
514
|
+
internals: this.internals,
|
|
515
|
+
controle: this.containerElement,
|
|
516
|
+
rotulo: this.labelElement,
|
|
517
|
+
texto: r
|
|
518
|
+
}), t ? this.internals.setFormValue(this.getAttribute("value") || "on") : this.internals.setFormValue(null), this.atualizarValidade();
|
|
497
519
|
}
|
|
498
520
|
// === Ciclo de Vida Form-Associated Custom Elements (W3C FACE) ===
|
|
499
521
|
formResetCallback() {
|
|
@@ -504,67 +526,74 @@ class V extends u {
|
|
|
504
526
|
}
|
|
505
527
|
}
|
|
506
528
|
h("ui-checkbox", V);
|
|
507
|
-
const
|
|
508
|
-
class
|
|
529
|
+
const R = ':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-radio{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:1;outline:none}.ui-radio--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-radio__circle{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;min-width:16px;min-height:16px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:50%;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;flex-shrink:0}.ui-radio:focus-visible .ui-radio__circle,.ui-radio--foco .ui-radio__circle{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-radio--checked .ui-radio__circle{border-color:var(--ui-cor-primaria, #00E08A)}.ui-radio__dot{width:8px;height:8px;border-radius:50%;background-color:var(--ui-cor-primaria, #00E08A);transition:transform .15s cubic-bezier(.4,0,.2,1),opacity .15s ease;transform:scale(0);opacity:0}.ui-radio--checked .ui-radio__dot{transform:scale(1);opacity:1}.ui-radio__label{display:inline-flex;align-items:center;font-size:clamp(11px,.85rem,14px);color:var(--ui-cor-texto, #e1e1e6);line-height:1}.ui-radio--label-esquerda{flex-direction:row-reverse}';
|
|
530
|
+
class l {
|
|
509
531
|
static getScopeNode(i) {
|
|
510
532
|
return i.closest("form") || i.getRootNode() || document;
|
|
511
533
|
}
|
|
534
|
+
/** Registra (ou re-registra, se o nome ou o escopo mudaram) o radio no grupo do seu nome atual. */
|
|
512
535
|
static registrar(i) {
|
|
536
|
+
this.desregistrar(i);
|
|
513
537
|
const t = i.name;
|
|
514
|
-
if (t)
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}
|
|
538
|
+
if (!t) return;
|
|
539
|
+
const e = this.getScopeNode(i);
|
|
540
|
+
let s = this.registry.get(e);
|
|
541
|
+
s || (s = /* @__PURE__ */ new Map(), this.registry.set(e, s));
|
|
542
|
+
let r = s.get(t);
|
|
543
|
+
r || (r = /* @__PURE__ */ new Set(), s.set(t, r)), r.add(i), this.registros.set(i, { scope: e, nome: t });
|
|
520
544
|
}
|
|
521
545
|
static desregistrar(i) {
|
|
522
|
-
const t = i
|
|
523
|
-
if (t)
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
r.delete(i), r.size === 0 && s.delete(t), s.size === 0 && this.registry.delete(e);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
546
|
+
const t = this.registros.get(i);
|
|
547
|
+
if (!t) return;
|
|
548
|
+
this.registros.delete(i);
|
|
549
|
+
const e = this.registry.get(t.scope), s = e == null ? void 0 : e.get(t.nome);
|
|
550
|
+
!e || !s || (s.delete(i), s.size === 0 && e.delete(t.nome), e.size === 0 && this.registry.delete(t.scope));
|
|
530
551
|
}
|
|
552
|
+
/** Radios do mesmo grupo que `radio`, usando o registro (não o nome atual, que pode ainda não ter sido registrado). */
|
|
531
553
|
static obterRadiosDoGrupo(i) {
|
|
532
|
-
|
|
554
|
+
var s;
|
|
555
|
+
const t = this.registros.get(i);
|
|
533
556
|
if (!t) return [];
|
|
534
|
-
const e =
|
|
535
|
-
return
|
|
557
|
+
const e = (s = this.registry.get(t.scope)) == null ? void 0 : s.get(t.nome);
|
|
558
|
+
return e ? Array.from(e) : [];
|
|
536
559
|
}
|
|
537
560
|
static desmarcarOutros(i) {
|
|
538
|
-
this.obterRadiosDoGrupo(i).forEach((
|
|
539
|
-
|
|
561
|
+
this.obterRadiosDoGrupo(i).forEach((t) => {
|
|
562
|
+
t !== i && (t.removeAttribute("marcado"), t.removeAttribute("checked"), t.syncState());
|
|
540
563
|
});
|
|
541
564
|
}
|
|
565
|
+
/** Reavalia o tabindex (roving) dos radios; use depois de entrar, sair ou mudar de grupo. */
|
|
566
|
+
static atualizarGrupo(i) {
|
|
567
|
+
i.forEach((t) => t.atualizarTabindex());
|
|
568
|
+
}
|
|
542
569
|
static tratarNavegacaoTeclado(i, t) {
|
|
543
|
-
if (["ArrowDown", "ArrowRight", "ArrowUp", "ArrowLeft"].includes(i.key))
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
l.selecionar(), l.focus();
|
|
552
|
-
}
|
|
570
|
+
if (!["ArrowDown", "ArrowRight", "ArrowUp", "ArrowLeft"].includes(i.key)) return;
|
|
571
|
+
i.preventDefault();
|
|
572
|
+
const e = this.obterRadiosDoGrupo(t).filter((c) => !c.disabled && c.isConnected);
|
|
573
|
+
if (e.length <= 1) return;
|
|
574
|
+
const s = e.indexOf(t), r = i.key === "ArrowDown" || i.key === "ArrowRight", n = (s + (r ? 1 : -1) + e.length) % e.length;
|
|
575
|
+
if (n !== s) {
|
|
576
|
+
const c = e[n];
|
|
577
|
+
c.selecionar(), c.focus();
|
|
553
578
|
}
|
|
554
579
|
}
|
|
555
580
|
}
|
|
556
|
-
a(
|
|
557
|
-
class M extends
|
|
581
|
+
a(l, "registry", /* @__PURE__ */ new WeakMap()), a(l, "registros", /* @__PURE__ */ new WeakMap());
|
|
582
|
+
class M extends d {
|
|
558
583
|
constructor() {
|
|
559
584
|
super();
|
|
560
585
|
a(this, "containerElement");
|
|
561
586
|
a(this, "labelElement");
|
|
587
|
+
a(this, "listeners", new u());
|
|
562
588
|
a(this, "_defaultChecked", !1);
|
|
563
589
|
a(this, "handleClick", (t) => {
|
|
564
590
|
t.preventDefault(), this.selecionar(), this.containerElement.focus();
|
|
565
591
|
});
|
|
592
|
+
a(this, "handleHostClick", (t) => {
|
|
593
|
+
m(this, t) && (this.selecionar(), this.containerElement.focus());
|
|
594
|
+
});
|
|
566
595
|
a(this, "handleKeyDown", (t) => {
|
|
567
|
-
t.key === " " || t.key === "Enter" ? (t.preventDefault(), this.selecionar()) :
|
|
596
|
+
t.key === " " || t.key === "Enter" ? (t.preventDefault(), this.selecionar()) : l.tratarNavegacaoTeclado(t, this);
|
|
568
597
|
});
|
|
569
598
|
a(this, "handleFocus", () => {
|
|
570
599
|
this.containerElement.classList.add("ui-radio--foco");
|
|
@@ -574,14 +603,14 @@ class M extends u {
|
|
|
574
603
|
});
|
|
575
604
|
const t = this.attachShadow({ mode: "open" });
|
|
576
605
|
t.innerHTML = `
|
|
577
|
-
<style>${
|
|
606
|
+
<style>${R}</style>
|
|
578
607
|
<div class="ui-radio" part="base" tabindex="0" role="radio" aria-checked="false">
|
|
579
608
|
<span class="ui-radio__circle" part="controle">
|
|
580
609
|
<span class="ui-radio__dot" part="indicador"></span>
|
|
581
610
|
</span>
|
|
582
611
|
<span class="ui-radio__label" part="rotulo" style="display: none;"></span>
|
|
583
612
|
</div>
|
|
584
|
-
`, this.containerElement = t.querySelector(".ui-radio"), this.labelElement = t.querySelector(".ui-radio__label");
|
|
613
|
+
`, this.containerElement = t.querySelector(".ui-radio"), this.labelElement = t.querySelector(".ui-radio__label"), this.labelElement.id = b("ui-radio-label");
|
|
585
614
|
}
|
|
586
615
|
static get observedAttributes() {
|
|
587
616
|
return [
|
|
@@ -599,12 +628,19 @@ class M extends u {
|
|
|
599
628
|
];
|
|
600
629
|
}
|
|
601
630
|
connectedCallback() {
|
|
602
|
-
this.
|
|
631
|
+
this.listeners.cleanup(), this.listeners.add(this.containerElement, "click", this.handleClick), this.listeners.add(this.containerElement, "keydown", this.handleKeyDown), this.listeners.add(this.containerElement, "focus", this.handleFocus), this.listeners.add(this.containerElement, "blur", this.handleBlur), this.listeners.add(this, "click", this.handleHostClick), this._defaultChecked = this.hasAttribute("marcado") || this.hasAttribute("checked"), l.registrar(this), this.syncState(), l.atualizarGrupo(l.obterRadiosDoGrupo(this).filter((t) => t !== this));
|
|
603
632
|
}
|
|
604
633
|
disconnectedCallback() {
|
|
605
|
-
this.
|
|
634
|
+
this.listeners.cleanup();
|
|
635
|
+
const t = l.obterRadiosDoGrupo(this).filter((e) => e !== this && e.isConnected);
|
|
636
|
+
l.desregistrar(this), l.atualizarGrupo(t);
|
|
606
637
|
}
|
|
607
638
|
attributeChangedCallback(t, e, s) {
|
|
639
|
+
if ((t === "name" || t === "nome") && this.isConnected) {
|
|
640
|
+
const r = l.obterRadiosDoGrupo(this).filter((n) => n !== this);
|
|
641
|
+
l.registrar(this), this.syncState(), l.atualizarGrupo([...r, ...l.obterRadiosDoGrupo(this).filter((n) => n !== this)]);
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
608
644
|
this.syncState();
|
|
609
645
|
}
|
|
610
646
|
get marcado() {
|
|
@@ -617,7 +653,7 @@ class M extends u {
|
|
|
617
653
|
return this.getAttribute("name") || this.getAttribute("nome") || "";
|
|
618
654
|
}
|
|
619
655
|
set name(t) {
|
|
620
|
-
|
|
656
|
+
this.setAttribute("name", t);
|
|
621
657
|
}
|
|
622
658
|
get disabled() {
|
|
623
659
|
return this.hasAttribute("disabled") || this._formDisabled;
|
|
@@ -638,7 +674,7 @@ class M extends u {
|
|
|
638
674
|
this.internals.setValidity({ customError: !0 }, this._customErrorMessage, this.containerElement);
|
|
639
675
|
return;
|
|
640
676
|
}
|
|
641
|
-
const t =
|
|
677
|
+
const t = l.obterRadiosDoGrupo(this);
|
|
642
678
|
if ((this.required || t.length > 0 && t.some((s) => s.required)) && !(this.marcado || t.length > 0 && t.some((r) => r.marcado))) {
|
|
643
679
|
const r = this.getAttribute("mensagem-validacao") || "Selecione uma opção.";
|
|
644
680
|
this.internals.setValidity({ valueMissing: !0 }, r, this.containerElement);
|
|
@@ -650,7 +686,7 @@ class M extends u {
|
|
|
650
686
|
this.containerElement.focus(t);
|
|
651
687
|
}
|
|
652
688
|
selecionar() {
|
|
653
|
-
this.disabled || this.marcado || (
|
|
689
|
+
this.disabled || this.marcado || (this.marcado = !0, l.desmarcarOutros(this), this.dispatchEvent(
|
|
654
690
|
new CustomEvent("ui-change", {
|
|
655
691
|
detail: {
|
|
656
692
|
marcado: !0,
|
|
@@ -665,18 +701,38 @@ class M extends u {
|
|
|
665
701
|
bubbles: !0,
|
|
666
702
|
composed: !0
|
|
667
703
|
})
|
|
668
|
-
),
|
|
704
|
+
), l.obterRadiosDoGrupo(this).forEach((t) => t.atualizarValidade()));
|
|
669
705
|
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
706
|
+
/**
|
|
707
|
+
* Roving tabindex: só um radio do grupo entra na ordem de Tab (o marcado; sem marcado, o primeiro habilitado).
|
|
708
|
+
* Isolado de `syncState` para reavaliar os vizinhos sem mexer no valor/validade do formulário.
|
|
709
|
+
*/
|
|
710
|
+
atualizarTabindex() {
|
|
711
|
+
if (this.disabled) {
|
|
712
|
+
this.containerElement.setAttribute("tabindex", "-1");
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
const t = l.obterRadiosDoGrupo(this).filter((e) => e.isConnected || e === this);
|
|
716
|
+
if (t.length === 0) {
|
|
717
|
+
this.containerElement.setAttribute("tabindex", "0");
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
if (t.some((e) => e.marcado))
|
|
721
|
+
this.containerElement.setAttribute("tabindex", this.marcado ? "0" : "-1");
|
|
674
722
|
else {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
o.length > 0 ? o.some((v) => v.marcado) ? this.containerElement.setAttribute("tabindex", t ? "0" : "-1") : this.containerElement.setAttribute("tabindex", o[0] === this ? "0" : "-1") : this.containerElement.setAttribute("tabindex", "0");
|
|
723
|
+
const e = t.find((s) => !s.disabled);
|
|
724
|
+
this.containerElement.setAttribute("tabindex", e === this ? "0" : "-1");
|
|
678
725
|
}
|
|
679
|
-
|
|
726
|
+
}
|
|
727
|
+
syncState() {
|
|
728
|
+
const t = this.marcado, e = this.disabled, s = this.getAttribute("label"), r = this.getAttribute("posicao-label") || "direita";
|
|
729
|
+
this.containerElement.setAttribute("aria-checked", String(t)), this.atualizarTabindex(), e ? (this.containerElement.classList.add("ui-radio--disabled"), this.containerElement.setAttribute("aria-disabled", "true")) : (this.containerElement.classList.remove("ui-radio--disabled"), this.containerElement.removeAttribute("aria-disabled")), t ? this.containerElement.classList.add("ui-radio--checked") : this.containerElement.classList.remove("ui-radio--checked"), r === "esquerda" ? this.containerElement.classList.add("ui-radio--label-esquerda") : this.containerElement.classList.remove("ui-radio--label-esquerda"), p({
|
|
730
|
+
host: this,
|
|
731
|
+
internals: this.internals,
|
|
732
|
+
controle: this.containerElement,
|
|
733
|
+
rotulo: this.labelElement,
|
|
734
|
+
texto: s
|
|
735
|
+
}), t ? this.internals.setFormValue(this.getAttribute("value") || "on") : this.internals.setFormValue(null), this.atualizarValidade();
|
|
680
736
|
}
|
|
681
737
|
// === Ciclo de Vida Form-Associated Custom Elements (W3C FACE) ===
|
|
682
738
|
formResetCallback() {
|
|
@@ -687,20 +743,20 @@ class M extends u {
|
|
|
687
743
|
}
|
|
688
744
|
}
|
|
689
745
|
h("ui-radio", M);
|
|
690
|
-
const
|
|
691
|
-
class
|
|
746
|
+
const F = ':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:1;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-switch--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-switch__track{display:inline-flex;align-items:center;position:relative;width:36px;height:20px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-pill, 999px);box-sizing:border-box;padding:1px;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease;flex-shrink:0}.ui-switch:focus-visible .ui-switch__track,.ui-switch--foco .ui-switch__track{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-switch--checked .ui-switch__track{background-color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A)}.ui-switch__thumb{display:block;width:16px;height:16px;background-color:#fff;border-radius:50%;box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .3));transition:transform .2s cubic-bezier(.4,0,.2,1),background-color .2s ease;transform:translate(0)}.ui-switch--checked .ui-switch__thumb{transform:translate(16px);background-color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-switch--sm .ui-switch__track{width:28px;height:16px;padding:1px}.ui-switch--sm .ui-switch__thumb{width:12px;height:12px}.ui-switch--sm.ui-switch--checked .ui-switch__thumb{transform:translate(12px)}.ui-switch--lg .ui-switch__track{width:44px;height:24px;padding:1px}.ui-switch--lg .ui-switch__thumb{width:20px;height:20px}.ui-switch--lg.ui-switch--checked .ui-switch__thumb{transform:translate(20px)}.ui-switch__label{display:inline-flex;align-items:center;font-size:clamp(11px,.85rem,14px);color:var(--ui-cor-texto, #e1e1e6);line-height:1}.ui-switch--label-esquerda{flex-direction:row-reverse}@media (max-width: 640px){.ui-switch{min-height:40px;padding:4px 0}.ui-switch__label{font-size:14px}}';
|
|
747
|
+
class _ extends d {
|
|
692
748
|
constructor() {
|
|
693
749
|
super();
|
|
694
750
|
a(this, "containerElement");
|
|
695
751
|
a(this, "labelElement");
|
|
696
752
|
a(this, "labelId");
|
|
697
|
-
a(this, "listeners", new
|
|
753
|
+
a(this, "listeners", new u());
|
|
698
754
|
a(this, "_defaultChecked", !1);
|
|
699
755
|
a(this, "handleClick", (t) => {
|
|
700
756
|
t.preventDefault(), this.alternar();
|
|
701
757
|
});
|
|
702
758
|
a(this, "handleHostClick", (t) => {
|
|
703
|
-
|
|
759
|
+
m(this, t) && (this.alternar(), this.containerElement.focus());
|
|
704
760
|
});
|
|
705
761
|
a(this, "handleKeyDown", (t) => {
|
|
706
762
|
(t.key === " " || t.key === "Enter") && (t.preventDefault(), this.alternar());
|
|
@@ -713,14 +769,14 @@ class x extends u {
|
|
|
713
769
|
});
|
|
714
770
|
const t = this.attachShadow({ mode: "open" });
|
|
715
771
|
t.innerHTML = `
|
|
716
|
-
<style>${
|
|
772
|
+
<style>${F}</style>
|
|
717
773
|
<div class="ui-switch" part="base" tabindex="0" role="switch" aria-checked="false">
|
|
718
774
|
<span class="ui-switch__track" part="controle">
|
|
719
775
|
<span class="ui-switch__thumb" part="indicador"></span>
|
|
720
776
|
</span>
|
|
721
777
|
<span class="ui-switch__label" part="rotulo" style="display: none;"></span>
|
|
722
778
|
</div>
|
|
723
|
-
`, this.containerElement = t.querySelector(".ui-switch"), this.labelElement = t.querySelector(".ui-switch__label"), this.labelId =
|
|
779
|
+
`, this.containerElement = t.querySelector(".ui-switch"), this.labelElement = t.querySelector(".ui-switch__label"), this.labelId = b("ui-switch-label"), this.labelElement.id = this.labelId;
|
|
724
780
|
}
|
|
725
781
|
static get observedAttributes() {
|
|
726
782
|
return [
|
|
@@ -799,6 +855,10 @@ class x extends u {
|
|
|
799
855
|
}
|
|
800
856
|
this.internals.setValidity({});
|
|
801
857
|
}
|
|
858
|
+
/** `focus()` no host leva o foco ao controle interno (necessário para o foco de validação do formulário). */
|
|
859
|
+
focus(t) {
|
|
860
|
+
this.containerElement.focus(t);
|
|
861
|
+
}
|
|
802
862
|
alternar() {
|
|
803
863
|
this.disabled || (this.ativo = !this.ativo, this.dispatchEvent(
|
|
804
864
|
new CustomEvent("ui-change", {
|
|
@@ -817,15 +877,14 @@ class x extends u {
|
|
|
817
877
|
));
|
|
818
878
|
}
|
|
819
879
|
syncState() {
|
|
820
|
-
const t = this.ativo, e = this.disabled, s = this.getAttribute("tamanho") || this.getAttribute("size") || "md", r = this.getAttribute("label"),
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
}
|
|
828
|
-
t ? this.internals.setFormValue(this.getAttribute("value") || "on") : this.internals.setFormValue(null), this.atualizarValidade();
|
|
880
|
+
const t = this.ativo, e = this.disabled, s = this.getAttribute("tamanho") || this.getAttribute("size") || "md", r = this.getAttribute("label"), n = this.getAttribute("posicao-label") || "direita";
|
|
881
|
+
this.containerElement.setAttribute("aria-checked", String(t)), e ? (this.containerElement.classList.add("ui-switch--disabled"), this.containerElement.setAttribute("tabindex", "-1"), this.containerElement.setAttribute("aria-disabled", "true")) : (this.containerElement.classList.remove("ui-switch--disabled"), this.containerElement.setAttribute("tabindex", "0"), this.containerElement.removeAttribute("aria-disabled")), t ? this.containerElement.classList.add("ui-switch--checked") : this.containerElement.classList.remove("ui-switch--checked"), this.containerElement.classList.remove("ui-switch--sm", "ui-switch--md", "ui-switch--lg"), ["sm", "md", "lg"].includes(s) ? this.containerElement.classList.add(`ui-switch--${s}`) : this.containerElement.classList.add("ui-switch--md"), n === "esquerda" ? this.containerElement.classList.add("ui-switch--label-esquerda") : this.containerElement.classList.remove("ui-switch--label-esquerda"), p({
|
|
882
|
+
host: this,
|
|
883
|
+
internals: this.internals,
|
|
884
|
+
controle: this.containerElement,
|
|
885
|
+
rotulo: this.labelElement,
|
|
886
|
+
texto: r
|
|
887
|
+
}), t ? this.internals.setFormValue(this.getAttribute("value") || "on") : this.internals.setFormValue(null), this.atualizarValidade();
|
|
829
888
|
}
|
|
830
889
|
// === Ciclo de Vida Form-Associated Custom Elements (W3C FACE) ===
|
|
831
890
|
formResetCallback() {
|
|
@@ -835,22 +894,22 @@ class x extends u {
|
|
|
835
894
|
typeof t == "string" ? this.ativo = t === (this.getAttribute("value") || "on") : typeof t == "boolean" && (this.ativo = t), this.syncState();
|
|
836
895
|
}
|
|
837
896
|
}
|
|
838
|
-
class
|
|
897
|
+
class H extends _ {
|
|
839
898
|
}
|
|
840
|
-
h("ui-switch",
|
|
841
|
-
h("ui-toggle",
|
|
899
|
+
h("ui-switch", _);
|
|
900
|
+
h("ui-toggle", H);
|
|
842
901
|
export {
|
|
843
902
|
L as A,
|
|
844
|
-
|
|
845
|
-
|
|
903
|
+
E as L,
|
|
904
|
+
l as R,
|
|
846
905
|
V as U,
|
|
847
|
-
|
|
848
|
-
|
|
906
|
+
C as a,
|
|
907
|
+
v as b,
|
|
849
908
|
M as c,
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
909
|
+
D as d,
|
|
910
|
+
_ as e,
|
|
911
|
+
H as f,
|
|
912
|
+
q as g,
|
|
913
|
+
z as h,
|
|
914
|
+
g as r
|
|
856
915
|
};
|