@thibezer/ui-components-kit 1.0.0 → 2.1.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 +92 -0
- package/LICENSE +21 -21
- package/README.md +150 -14
- package/dist/botao.cjs +1 -1
- package/dist/botao.js +1 -1
- package/dist/camadas.cjs +65 -65
- package/dist/camadas.js +762 -729
- package/dist/campo-texto.cjs +1 -1
- package/dist/campo-texto.js +1 -1
- package/dist/canvas.cjs +105 -146
- package/dist/canvas.js +5132 -1199
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/components/ui-botao/ui-botao.d.ts +15 -0
- package/dist/components/ui-camadas/camadas-persistencia.d.ts +4 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +10 -0
- package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +5 -0
- package/dist/components/ui-canvas-cad/cad-estilos-externos.d.ts +16 -0
- package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +4 -0
- package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +262 -0
- package/dist/components/ui-canvas-cad/cad-ferramentas-barra.d.ts +15 -0
- package/dist/components/ui-canvas-cad/cad-snap.d.ts +32 -0
- package/dist/components/ui-canvas-cad/cad-toolbar-painel.d.ts +1 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +143 -0
- package/dist/components/ui-lista-flutuante/lista-flutuante-posicionamento.d.ts +2 -0
- package/dist/components/ui-lista-flutuante/ui-lista-flutuante.d.ts +1 -0
- package/dist/components/ui-modal/modal-pilha.d.ts +3 -0
- package/dist/components/ui-modal/ui-modal.d.ts +19 -4
- package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +3 -0
- package/dist/components/ui-tabela/tabela-atributos-sync.d.ts +3 -0
- package/dist/components/ui-tabela/tabela-corpo.d.ts +2 -0
- package/dist/components/ui-tabela/tabela-localizador.d.ts +8 -1
- package/dist/components/ui-tabela/tabela-orquestrador-dados.d.ts +4 -0
- package/dist/components/ui-tabela/tabela-renderizador.d.ts +1 -0
- package/dist/components/ui-tabela/tabela-selecao.d.ts +21 -6
- package/dist/components/ui-tabela/tipos.d.ts +6 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +56 -2
- package/dist/components/ui-tabela-propriedades/avaliador-expressao.d.ts +0 -5
- package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +17 -1
- package/dist/components/ui-tabela-propriedades/propriedades-flutuante.d.ts +2 -0
- package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +10 -1
- package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +3 -1
- package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +5 -1
- package/dist/components/ui-tooltip/ui-tooltip.d.ts +15 -0
- package/dist/core/alvo-digitavel.d.ts +1 -0
- package/dist/core/form-submissao.d.ts +16 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/parts.d.ts +6 -0
- package/dist/core/rotulo.d.ts +6 -0
- package/dist/core/svg-seguro.d.ts +10 -0
- package/dist/core/ui-bus.d.ts +13 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +14 -12
- package/dist/custom-elements.json +32905 -0
- package/dist/data.cjs +1 -1
- package/dist/data.js +51 -46
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +3 -3
- package/dist/form-submissao-C-SPRKgT.js +61 -0
- package/dist/form-submissao-DxKO5MHI.cjs +1 -0
- package/dist/forms.cjs +1 -1
- package/dist/forms.js +2 -2
- package/dist/gerencigeo-canvas/canvas_interacao.d.ts +18 -0
- package/dist/gerencigeo-canvas/feature_adapters.d.ts +35 -0
- package/dist/gerencigeo-canvas/feature_algoritmos.d.ts +45 -0
- package/dist/gerencigeo-canvas/feature_amostra.d.ts +4 -0
- package/dist/gerencigeo-canvas/feature_caixa.d.ts +19 -0
- package/dist/gerencigeo-canvas/feature_cluster.d.ts +61 -0
- package/dist/gerencigeo-canvas/feature_cursores.d.ts +17 -0
- package/dist/gerencigeo-canvas/feature_desenho.d.ts +53 -0
- package/dist/gerencigeo-canvas/feature_desenho_controle.d.ts +91 -0
- package/dist/gerencigeo-canvas/feature_edicao_ops.d.ts +19 -0
- package/dist/gerencigeo-canvas/feature_editor_vertices.d.ts +62 -0
- package/dist/gerencigeo-canvas/feature_formas.d.ts +7 -0
- package/dist/gerencigeo-canvas/feature_hud.d.ts +23 -0
- package/dist/gerencigeo-canvas/feature_indice.d.ts +36 -0
- package/dist/gerencigeo-canvas/feature_metricas.d.ts +16 -0
- package/dist/gerencigeo-canvas/feature_popup.d.ts +31 -0
- package/dist/gerencigeo-canvas/feature_selecao.d.ts +38 -0
- package/dist/gerencigeo-canvas/feature_simplificacao.d.ts +14 -0
- package/dist/gerencigeo-canvas/feature_snap.d.ts +25 -0
- package/dist/gerencigeo-canvas/feature_types.d.ts +86 -0
- package/dist/gerencigeo-canvas/feature_versoes.d.ts +19 -0
- package/dist/gerencigeo-canvas/index.d.ts +21 -0
- package/dist/gerencigeo-canvas/layer_hit_test.d.ts +30 -0
- package/dist/gerencigeo-canvas/layer_manager.d.ts +11 -3
- package/dist/gerencigeo-canvas/layer_pane_ops.d.ts +9 -0
- package/dist/gerencigeo-canvas/mapa_controller.d.ts +1 -0
- package/dist/gerencigeo-canvas/mapa_pontos_shapes.d.ts +24 -5
- package/dist/gerencigeo-canvas/renderers/feicoes_renderer.d.ts +89 -0
- package/dist/gerencigeo-canvas/renderers/vector_points_renderer.d.ts +1 -0
- package/dist/gerencigeo-canvas/renderers/vector_polygons_renderer.d.ts +2 -2
- package/dist/gerencigeo-canvas/types.d.ts +12 -0
- package/dist/gerencigeo-canvas/utils.d.ts +3 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +117 -112
- package/dist/leaflet-DcO7uRC-.cjs +1 -0
- package/dist/{leaflet-DkaFZYc5.js → leaflet-PPDKB6Dd.js} +37 -37
- package/dist/mapa.cjs +4 -4
- package/dist/mapa.js +2 -2
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/parts-CaoQiCfI.js +7 -0
- package/dist/parts-vQa2873h.cjs +1 -0
- package/dist/register.cjs +1 -1
- package/dist/register.js +12 -12
- package/dist/seletor-mapa-base.cjs +16 -16
- package/dist/seletor-mapa-base.js +111 -61
- package/dist/svg-seguro-BsbNQqpd.js +50 -0
- package/dist/svg-seguro-C76iLlAZ.cjs +1 -0
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +41 -36
- package/dist/tipos-elementos.d.ts +1232 -0
- package/dist/tipos-react.d.ts +113 -0
- package/dist/tipos-vue.d.ts +1201 -0
- 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-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_JF6POq.js → ui-campo-texto-Uu2dJE_0.js} +81 -63
- package/dist/{ui-card-Bhm6k91e.cjs → ui-card-B86lJXTP.cjs} +7 -7
- package/dist/{ui-card-BJ8SmvVf.js → ui-card-C_o5_0cB.js} +14 -14
- package/dist/ui-kit.css +1 -1
- package/dist/ui-modal-CvGFGh1h.cjs +18 -0
- package/dist/ui-modal-DBOtSTbR.js +238 -0
- package/dist/{ui-paleta-ferramentas-Bpp4XBVg.js → ui-paleta-ferramentas-CEZYcN4J.js} +18 -27
- package/dist/{ui-paleta-ferramentas-B6dJ0O6K.cjs → ui-paleta-ferramentas-Dbj1kBS9.cjs} +6 -6
- package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
- package/dist/{ui-segmented-C8wuycjJ.js → ui-segmented-wUraId2e.js} +68 -67
- package/dist/ui-skeleton-DI4_9WOX.js +428 -0
- package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
- package/dist/{ui-switch-CO9MoS8x.js → ui-switch-BcOqOkiV.js} +92 -62
- package/dist/ui-switch-D7iPKDj-.cjs +53 -0
- package/dist/ui-tabela-propriedades-BBr5sqki.cjs +145 -0
- package/dist/ui-tabela-propriedades-Boy7I5yW.js +2412 -0
- package/dist/{ui-toast-CwUmiqyG.js → ui-toast-Bp_NlM5G.js} +51 -51
- 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 +27 -7
- package/dist/leaflet-Cw6tqYFh.cjs +0 -1
- package/dist/ui-badge-92yelKls.js +0 -183
- package/dist/ui-badge-B95jSECC.cjs +0 -28
- package/dist/ui-botao-BShEouvi.js +0 -124
- package/dist/ui-botao-DF1yuUUD.cjs +0 -12
- package/dist/ui-campo-texto-BCh5HyCM.cjs +0 -16
- package/dist/ui-modal-Bi4isGYh.cjs +0 -18
- package/dist/ui-modal-DV-pw2x1.js +0 -194
- package/dist/ui-segmented-NC5cBXLh.cjs +0 -19
- package/dist/ui-skeleton-B3xQyn0Z.js +0 -396
- package/dist/ui-skeleton-D42oQufF.cjs +0 -33
- package/dist/ui-switch-C6o4yZUF.cjs +0 -53
- package/dist/ui-tabela-propriedades-7yJ9g7ti.cjs +0 -145
- package/dist/ui-tabela-propriedades-D-XKNVwK.js +0 -2078
- package/dist/ui-toast-CQBqvUm3.cjs +0 -20
- package/dist/zero-js-triggers-DdESy0tk.js +0 -205
- package/dist/zero-js-triggers-QGD7FOTv.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const p=e=>e==null?"":String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),d=(e,l=3)=>e==null||isNaN(e)?"—":e.toLocaleString("pt-BR",{minimumFractionDigits:l,maximumFractionDigits:l}),s=(e,l)=>{if(e==null||l===null||l===void 0)return null;const a=r=>{if(typeof r=="number")return r;if(typeof r=="string"){const i=r.trim().replace(",",".");return parseFloat(i)}return NaN},t=a(e),o=a(l);return isNaN(t)||isNaN(o)?null:Math.abs(t)>90||Math.abs(o)>180?(console.warn(`[gerencigeo-canvas] Coordenada fora do limite geográfico WGS-84 (Lat: ${t}, Lon: ${o}). Parece ser projeção UTM plana.`),null):t===0&&o===0?null:{lat:t,lon:o}},g=(e,l)=>!e||!Array.isArray(e)||e.length===0?"":`<div class="ui-popup-actions-footer">${e.map(t=>{const o=t.variante||"secondary";return`<button type="button" class="ui-popup-btn ui-popup-btn-${p(o)}" data-acao-id="${p(t.id)}" data-elemento-id="${p(String(l))}">${p(t.rotulo)}</button>`}).join("")}</div>`,u=(e,l,a,t)=>{const o=e!=null&&e.getElement?e.getElement():null;if(!o)return;o.querySelectorAll(".ui-popup-btn").forEach(i=>{i.onclick=n=>{n.preventDefault(),n.stopPropagation();const f=i.getAttribute("data-acao-id"),c=i.getAttribute("data-elemento-id")??(l==null?void 0:l.id);f&&c!==void 0&&c!==null&&(a.onPopupAcao&&a.onPopupAcao(f,c,l),t&&typeof t.closePopup=="function"?t.closePopup():e._map&&typeof e._map.closePopup=="function"&&e._map.closePopup())}})},b=(e,l)=>{const a={};return e.forEach(t=>{let o;l&&t[l]!==void 0&&t[l]!==null?o=t[l]:(o=t.grupoId??t.grupoKey,o==null&&(t.matricula_id!==void 0&&t.matricula_id!==null?o=`mat_${t.matricula_id}`:t.planilha_origem?o=t.planilha_origem:o="padrao"));const r=String(o);a[r]||(a[r]=[]),a[r].push(t)}),a},m=e=>[...e].sort((l,a)=>{const t=o=>{const r=o.ordem??o.indice??o.index??o.seq??o.ordem_caminhamento??o.id,i=Number(r);return isNaN(i)?999999:i};return t(l)-t(a)}),x=e=>{if(!e||typeof e!="string")return null;const l=/(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)/g;let a,t=0,o=0,r=0;for(;(a=l.exec(e))!==null;){const i=parseFloat(a[1]),n=parseFloat(a[2]);if(!isNaN(i)&&!isNaN(n)){const f=s(n,i)||s(i,n);f&&(t+=f.lat,o+=f.lon,r++)}}return r>0?{lat:t/r,lon:o/r}:null},h='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}';exports.agruparPontosPorChave=b;exports.bindPopupAcoesEvents=u;exports.escapeHtml=p;exports.extrairCentroDeWkt=x;exports.formatUTM=d;exports.leafletCss=h;exports.ordenarPontosPorSequencia=m;exports.parseCoordenada=s;exports.renderPopupAcoesHtml=g;
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
var g = Object.defineProperty;
|
|
2
|
-
var h = (a, o, e) => o in a ? g(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
|
|
3
|
-
var t = (a, o, e) => h(a, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
-
import { d as s, S as u } from "./ssr-safe-5cWfJP-s.js";
|
|
5
|
-
import { L as p } from "./listener-bag-DQgv7OON.js";
|
|
6
|
-
const m = ':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-stat{padding:18px 20px;border-radius:var(--ui-raio-borda, 10px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));background-color:var(--ui-cor-fundo-card, #18181c);color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box;display:flex;flex-direction:column;position:relative;transition:border-color .15s ease,box-shadow .15s ease}:root[data-tema=claro] .ui-stat,[data-tema=claro] .ui-stat{background-color:#fff;border-color:#00000017;color:#1a1a1e;box-shadow:0 1px 3px #0000000a}.ui-stat--baixa{box-shadow:0 2px 6px #0000004d}.ui-stat--media{box-shadow:0 4px 14px #0006}.ui-stat--alta{box-shadow:0 8px 24px #00000080}.ui-stat__cabecalho{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px}.ui-stat__rotulo{font-size:13px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);letter-spacing:.01em}:root[data-tema=claro] .ui-stat__rotulo,[data-tema=claro] .ui-stat__rotulo{color:#6c757d}.ui-stat__icone-slot{display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899)}.ui-stat__icone-slot svg,.ui-stat__icone-slot ::slotted(svg),.ui-stat__icone-slot ::slotted(ui-icone){shape-rendering:geometricPrecision}.ui-stat__conteudo{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:6px}.ui-stat__valor{font-size:28px;font-weight:700;color:var(--ui-cor-texto, #ffffff);line-height:1.15;letter-spacing:-.025em}:root[data-tema=claro] .ui-stat__valor,[data-tema=claro] .ui-stat__valor{color:#111114}.ui-stat__indicador{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:5px;font-size:12px;font-weight:600;line-height:1}.ui-stat__indicador--positivo,.ui-stat__indicador--alta{background-color:#00e08a24;color:var(--ui-cor-primaria, #00E08A)}.ui-stat__indicador--negativo,.ui-stat__indicador--baixa{background-color:#ff444424;color:var(--ui-cor-texto-erro, #ff5555)}.ui-stat__indicador--neutro{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}:root[data-tema=claro] .ui-stat__indicador--neutro,[data-tema=claro] .ui-stat__indicador--neutro{background-color:#f1f3f5;color:#495057}.ui-stat__seta{font-size:.85em;line-height:1}.ui-stat__rodape{display:flex;flex-direction:column;gap:6px}.ui-stat__descricao{font-size:12px;color:var(--ui-cor-texto-secundario, #888899);line-height:1.3}:root[data-tema=claro] .ui-stat__descricao,[data-tema=claro] .ui-stat__descricao{color:#6c757d}';
|
|
7
|
-
class n extends u {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
t(this, "statElement");
|
|
11
|
-
t(this, "rotuloElement");
|
|
12
|
-
t(this, "valorElement");
|
|
13
|
-
t(this, "indicadorElement");
|
|
14
|
-
t(this, "setaElement");
|
|
15
|
-
t(this, "variacaoElement");
|
|
16
|
-
t(this, "descricaoElement");
|
|
17
|
-
const e = this.attachShadow({ mode: "open" });
|
|
18
|
-
e.innerHTML = `
|
|
19
|
-
<style>${m}</style>
|
|
20
|
-
<div class="ui-stat">
|
|
21
|
-
<div class="ui-stat__cabecalho">
|
|
22
|
-
<span class="ui-stat__rotulo"></span>
|
|
23
|
-
<div class="ui-stat__icone-slot"><slot name="icone"></slot></div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="ui-stat__conteudo">
|
|
26
|
-
<div class="ui-stat__valor"></div>
|
|
27
|
-
<div class="ui-stat__indicador" style="display: none;">
|
|
28
|
-
<span class="ui-stat__seta" aria-hidden="true"></span>
|
|
29
|
-
<span class="ui-stat__variacao"></span>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="ui-stat__rodape">
|
|
33
|
-
<span class="ui-stat__descricao" style="display: none;"></span>
|
|
34
|
-
<slot name="grafico"></slot>
|
|
35
|
-
<slot></slot>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
`, this.statElement = e.querySelector(".ui-stat"), this.rotuloElement = e.querySelector(".ui-stat__rotulo"), this.valorElement = e.querySelector(".ui-stat__valor"), this.indicadorElement = e.querySelector(".ui-stat__indicador"), this.setaElement = e.querySelector(".ui-stat__seta"), this.variacaoElement = e.querySelector(".ui-stat__variacao"), this.descricaoElement = e.querySelector(".ui-stat__descricao");
|
|
39
|
-
}
|
|
40
|
-
static get observedAttributes() {
|
|
41
|
-
return [
|
|
42
|
-
"rotulo",
|
|
43
|
-
"label",
|
|
44
|
-
"valor",
|
|
45
|
-
"value",
|
|
46
|
-
"variacao",
|
|
47
|
-
"trend",
|
|
48
|
-
"tendencia",
|
|
49
|
-
"direction",
|
|
50
|
-
"descricao",
|
|
51
|
-
"description",
|
|
52
|
-
"elevacao",
|
|
53
|
-
"elevation"
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
connectedCallback() {
|
|
57
|
-
this.syncState();
|
|
58
|
-
}
|
|
59
|
-
attributeChangedCallback(e, r, i) {
|
|
60
|
-
this.syncState();
|
|
61
|
-
}
|
|
62
|
-
get rotulo() {
|
|
63
|
-
return this.getAttribute("rotulo") || this.getAttribute("label") || "";
|
|
64
|
-
}
|
|
65
|
-
set rotulo(e) {
|
|
66
|
-
this.setAttribute("rotulo", e);
|
|
67
|
-
}
|
|
68
|
-
get valor() {
|
|
69
|
-
return this.getAttribute("valor") || this.getAttribute("value") || "";
|
|
70
|
-
}
|
|
71
|
-
set valor(e) {
|
|
72
|
-
this.setAttribute("valor", e);
|
|
73
|
-
}
|
|
74
|
-
get variacao() {
|
|
75
|
-
return this.getAttribute("variacao") || this.getAttribute("trend") || "";
|
|
76
|
-
}
|
|
77
|
-
set variacao(e) {
|
|
78
|
-
this.setAttribute("variacao", e);
|
|
79
|
-
}
|
|
80
|
-
get tendencia() {
|
|
81
|
-
const e = (this.getAttribute("tendencia") || this.getAttribute("direction") || "positivo").toLowerCase();
|
|
82
|
-
return e === "baixa" || e === "negativo" || e === "down" ? "baixa" : e === "neutro" || e === "neutral" ? "neutro" : "alta";
|
|
83
|
-
}
|
|
84
|
-
set tendencia(e) {
|
|
85
|
-
this.setAttribute("tendencia", e);
|
|
86
|
-
}
|
|
87
|
-
get descricao() {
|
|
88
|
-
return this.getAttribute("descricao") || this.getAttribute("description") || "";
|
|
89
|
-
}
|
|
90
|
-
set descricao(e) {
|
|
91
|
-
this.setAttribute("descricao", e);
|
|
92
|
-
}
|
|
93
|
-
syncState() {
|
|
94
|
-
const e = this.rotulo, r = this.valor, i = this.variacao, l = this.tendencia, d = this.descricao, b = this.getAttribute("elevacao") || this.getAttribute("elevation") || "baixa";
|
|
95
|
-
this.statElement.className = `ui-stat ui-stat--${b}`, this.rotuloElement.textContent = e, this.valorElement.textContent = r, i ? (this.variacaoElement.textContent = i, this.indicadorElement.style.display = "inline-flex", l === "baixa" ? (this.indicadorElement.className = "ui-stat__indicador ui-stat__indicador--negativo", this.setaElement.textContent = "↓", this.indicadorElement.setAttribute("aria-label", `Queda de ${i}`)) : l === "neutro" ? (this.indicadorElement.className = "ui-stat__indicador ui-stat__indicador--neutro", this.setaElement.textContent = "→", this.indicadorElement.setAttribute("aria-label", `Variação estável de ${i}`)) : (this.indicadorElement.className = "ui-stat__indicador ui-stat__indicador--positivo", this.setaElement.textContent = "↑", this.indicadorElement.setAttribute("aria-label", `Aumento de ${i}`))) : this.indicadorElement.style.display = "none", d ? (this.descricaoElement.textContent = d, this.descricaoElement.style.display = "block") : this.descricaoElement.style.display = "none";
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
class v extends n {
|
|
99
|
-
}
|
|
100
|
-
class f extends n {
|
|
101
|
-
}
|
|
102
|
-
s("ui-stat", n);
|
|
103
|
-
s("ui-kpi", v);
|
|
104
|
-
s("ui-metrica", f);
|
|
105
|
-
const x = ':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-badge{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:600;line-height:1;-webkit-user-select:none;user-select:none;box-sizing:border-box;transition:background-color .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}::slotted(svg),::slotted(ui-icone){width:12px!important;height:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;vertical-align:middle!important;shape-rendering:geometricPrecision;flex-shrink:0}::slotted(span){display:inline-flex;align-items:center;line-height:1}.ui-badge--suave{background-color:var(--ui-cor-badge-fundo, rgba(255, 255, 255, .08));color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid transparent}.ui-badge--solido{background-color:var(--ui-cor-badge-solido, #888899);color:#000;border:1px solid transparent}.ui-badge--contornado{background-color:transparent;color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid var(--ui-cor-badge-borda, rgba(255, 255, 255, .2))}.ui-badge--sucesso.ui-badge--suave{background-color:#00e08a26;color:var(--ui-cor-primaria, #00E08A)}.ui-badge--sucesso.ui-badge--solido{background-color:var(--ui-cor-primaria, #00E08A);color:#000}.ui-badge--sucesso.ui-badge--contornado{color:var(--ui-cor-primaria, #00E08A);border-color:#00e08a66}.ui-badge--erro.ui-badge--suave{background-color:#ff555526;color:var(--ui-cor-texto-erro, #ff5555)}.ui-badge--erro.ui-badge--solido{background-color:var(--ui-cor-texto-erro, #ff5555);color:#fff}.ui-badge--erro.ui-badge--contornado{color:var(--ui-cor-texto-erro, #ff5555);border-color:#f556}.ui-badge--alerta.ui-badge--suave{background-color:#ffb86c26;color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-badge--alerta.ui-badge--solido{background-color:var(--ui-cor-texto-alerta, #ffb86c);color:#000}.ui-badge--alerta.ui-badge--contornado{color:var(--ui-cor-texto-alerta, #ffb86c);border-color:#ffb86c66}.ui-badge--info.ui-badge--suave,.ui-badge--primaria.ui-badge--suave{background-color:#00aaff26;color:#0af}.ui-badge--info.ui-badge--solido,.ui-badge--primaria.ui-badge--solido{background-color:#0af;color:#fff}.ui-badge--info.ui-badge--contornado,.ui-badge--primaria.ui-badge--contornado{color:#0af;border-color:#0af6}.ui-badge--neutro.ui-badge--suave{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}.ui-badge__close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;cursor:pointer;opacity:.7;transition:opacity .15s ease,background-color .15s ease;font-size:10px;line-height:1;margin-left:2px}.ui-badge__close:hover{opacity:1;background-color:#fff3}';
|
|
106
|
-
class c extends u {
|
|
107
|
-
constructor() {
|
|
108
|
-
super();
|
|
109
|
-
t(this, "badgeElement");
|
|
110
|
-
t(this, "labelElement");
|
|
111
|
-
t(this, "closeElement");
|
|
112
|
-
t(this, "listeners", new p());
|
|
113
|
-
t(this, "handleRemove", (e) => {
|
|
114
|
-
var r;
|
|
115
|
-
e.stopPropagation(), this.dispatchEvent(
|
|
116
|
-
new CustomEvent("ui-remove", {
|
|
117
|
-
detail: {
|
|
118
|
-
value: this.getAttribute("value") || ((r = this.textContent) == null ? void 0 : r.trim()) || ""
|
|
119
|
-
},
|
|
120
|
-
bubbles: !0,
|
|
121
|
-
composed: !0
|
|
122
|
-
})
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
const e = this.attachShadow({ mode: "open" });
|
|
126
|
-
e.innerHTML = `
|
|
127
|
-
<style>${x}</style>
|
|
128
|
-
<span class="ui-badge">
|
|
129
|
-
<slot></slot>
|
|
130
|
-
<span class="ui-badge__label" style="display: none;"></span>
|
|
131
|
-
<span class="ui-badge__close" role="button" tabindex="0" aria-label="Remover" style="display: none;" title="Remover">✕</span>
|
|
132
|
-
</span>
|
|
133
|
-
`, this.badgeElement = e.querySelector(".ui-badge"), this.labelElement = e.querySelector(".ui-badge__label"), this.closeElement = e.querySelector(".ui-badge__close");
|
|
134
|
-
}
|
|
135
|
-
static get observedAttributes() {
|
|
136
|
-
return [
|
|
137
|
-
"variante",
|
|
138
|
-
"variant",
|
|
139
|
-
"estilo",
|
|
140
|
-
"removivel",
|
|
141
|
-
"removable",
|
|
142
|
-
"disabled",
|
|
143
|
-
"label",
|
|
144
|
-
"value"
|
|
145
|
-
];
|
|
146
|
-
}
|
|
147
|
-
connectedCallback() {
|
|
148
|
-
this.listeners.cleanup(), this.listeners.add(this.closeElement, "click", this.handleRemove), this.listeners.add(this.closeElement, "keydown", (e) => {
|
|
149
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.handleRemove(e));
|
|
150
|
-
}), this.syncState();
|
|
151
|
-
}
|
|
152
|
-
disconnectedCallback() {
|
|
153
|
-
this.listeners.cleanup();
|
|
154
|
-
}
|
|
155
|
-
attributeChangedCallback(e, r, i) {
|
|
156
|
-
this.syncState();
|
|
157
|
-
}
|
|
158
|
-
get removivel() {
|
|
159
|
-
return this.hasAttribute("removivel") || this.hasAttribute("removable");
|
|
160
|
-
}
|
|
161
|
-
set removivel(e) {
|
|
162
|
-
e ? this.setAttribute("removivel", "") : (this.removeAttribute("removivel"), this.removeAttribute("removable"));
|
|
163
|
-
}
|
|
164
|
-
syncState() {
|
|
165
|
-
const e = this.getAttribute("variante") || this.getAttribute("variant") || "neutro", r = this.getAttribute("estilo") || "suave", i = this.getAttribute("label"), l = this.removivel;
|
|
166
|
-
this.badgeElement.className = "ui-badge", this.badgeElement.classList.add(`ui-badge--${e}`), this.badgeElement.classList.add(`ui-badge--${r}`), i ? (this.labelElement.textContent = i, this.labelElement.style.display = "inline") : this.labelElement.style.display = "none", l ? this.closeElement.style.display = "inline-flex" : this.closeElement.style.display = "none";
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
class _ extends c {
|
|
170
|
-
}
|
|
171
|
-
class y extends c {
|
|
172
|
-
}
|
|
173
|
-
s("ui-badge", c);
|
|
174
|
-
s("ui-chip", _);
|
|
175
|
-
s("ui-tag", y);
|
|
176
|
-
export {
|
|
177
|
-
c as U,
|
|
178
|
-
_ as a,
|
|
179
|
-
v as b,
|
|
180
|
-
f as c,
|
|
181
|
-
n as d,
|
|
182
|
-
y as e
|
|
183
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var v=(a,o,e)=>o in a?p(a,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[o]=e;var t=(a,o,e)=>v(a,typeof o!="symbol"?o+"":o,e);const s=require("./ssr-safe-CiHD1adl.cjs"),f=require("./listener-bag-D5omxZ9h.cjs"),x=':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-stat{padding:18px 20px;border-radius:var(--ui-raio-borda, 10px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));background-color:var(--ui-cor-fundo-card, #18181c);color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box;display:flex;flex-direction:column;position:relative;transition:border-color .15s ease,box-shadow .15s ease}:root[data-tema=claro] .ui-stat,[data-tema=claro] .ui-stat{background-color:#fff;border-color:#00000017;color:#1a1a1e;box-shadow:0 1px 3px #0000000a}.ui-stat--baixa{box-shadow:0 2px 6px #0000004d}.ui-stat--media{box-shadow:0 4px 14px #0006}.ui-stat--alta{box-shadow:0 8px 24px #00000080}.ui-stat__cabecalho{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px}.ui-stat__rotulo{font-size:13px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);letter-spacing:.01em}:root[data-tema=claro] .ui-stat__rotulo,[data-tema=claro] .ui-stat__rotulo{color:#6c757d}.ui-stat__icone-slot{display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899)}.ui-stat__icone-slot svg,.ui-stat__icone-slot ::slotted(svg),.ui-stat__icone-slot ::slotted(ui-icone){shape-rendering:geometricPrecision}.ui-stat__conteudo{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:6px}.ui-stat__valor{font-size:28px;font-weight:700;color:var(--ui-cor-texto, #ffffff);line-height:1.15;letter-spacing:-.025em}:root[data-tema=claro] .ui-stat__valor,[data-tema=claro] .ui-stat__valor{color:#111114}.ui-stat__indicador{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:5px;font-size:12px;font-weight:600;line-height:1}.ui-stat__indicador--positivo,.ui-stat__indicador--alta{background-color:#00e08a24;color:var(--ui-cor-primaria, #00E08A)}.ui-stat__indicador--negativo,.ui-stat__indicador--baixa{background-color:#ff444424;color:var(--ui-cor-texto-erro, #ff5555)}.ui-stat__indicador--neutro{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}:root[data-tema=claro] .ui-stat__indicador--neutro,[data-tema=claro] .ui-stat__indicador--neutro{background-color:#f1f3f5;color:#495057}.ui-stat__seta{font-size:.85em;line-height:1}.ui-stat__rodape{display:flex;flex-direction:column;gap:6px}.ui-stat__descricao{font-size:12px;color:var(--ui-cor-texto-secundario, #888899);line-height:1.3}:root[data-tema=claro] .ui-stat__descricao,[data-tema=claro] .ui-stat__descricao{color:#6c757d}';class n extends s.SafeHTMLElement{constructor(){super();t(this,"statElement");t(this,"rotuloElement");t(this,"valorElement");t(this,"indicadorElement");t(this,"setaElement");t(this,"variacaoElement");t(this,"descricaoElement");const e=this.attachShadow({mode:"open"});e.innerHTML=`
|
|
2
|
-
<style>${x}</style>
|
|
3
|
-
<div class="ui-stat">
|
|
4
|
-
<div class="ui-stat__cabecalho">
|
|
5
|
-
<span class="ui-stat__rotulo"></span>
|
|
6
|
-
<div class="ui-stat__icone-slot"><slot name="icone"></slot></div>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="ui-stat__conteudo">
|
|
9
|
-
<div class="ui-stat__valor"></div>
|
|
10
|
-
<div class="ui-stat__indicador" style="display: none;">
|
|
11
|
-
<span class="ui-stat__seta" aria-hidden="true"></span>
|
|
12
|
-
<span class="ui-stat__variacao"></span>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="ui-stat__rodape">
|
|
16
|
-
<span class="ui-stat__descricao" style="display: none;"></span>
|
|
17
|
-
<slot name="grafico"></slot>
|
|
18
|
-
<slot></slot>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
`,this.statElement=e.querySelector(".ui-stat"),this.rotuloElement=e.querySelector(".ui-stat__rotulo"),this.valorElement=e.querySelector(".ui-stat__valor"),this.indicadorElement=e.querySelector(".ui-stat__indicador"),this.setaElement=e.querySelector(".ui-stat__seta"),this.variacaoElement=e.querySelector(".ui-stat__variacao"),this.descricaoElement=e.querySelector(".ui-stat__descricao")}static get observedAttributes(){return["rotulo","label","valor","value","variacao","trend","tendencia","direction","descricao","description","elevacao","elevation"]}connectedCallback(){this.syncState()}attributeChangedCallback(e,r,i){this.syncState()}get rotulo(){return this.getAttribute("rotulo")||this.getAttribute("label")||""}set rotulo(e){this.setAttribute("rotulo",e)}get valor(){return this.getAttribute("valor")||this.getAttribute("value")||""}set valor(e){this.setAttribute("valor",e)}get variacao(){return this.getAttribute("variacao")||this.getAttribute("trend")||""}set variacao(e){this.setAttribute("variacao",e)}get tendencia(){const e=(this.getAttribute("tendencia")||this.getAttribute("direction")||"positivo").toLowerCase();return e==="baixa"||e==="negativo"||e==="down"?"baixa":e==="neutro"||e==="neutral"?"neutro":"alta"}set tendencia(e){this.setAttribute("tendencia",e)}get descricao(){return this.getAttribute("descricao")||this.getAttribute("description")||""}set descricao(e){this.setAttribute("descricao",e)}syncState(){const e=this.rotulo,r=this.valor,i=this.variacao,l=this.tendencia,d=this.descricao,h=this.getAttribute("elevacao")||this.getAttribute("elevation")||"baixa";this.statElement.className=`ui-stat ui-stat--${h}`,this.rotuloElement.textContent=e,this.valorElement.textContent=r,i?(this.variacaoElement.textContent=i,this.indicadorElement.style.display="inline-flex",l==="baixa"?(this.indicadorElement.className="ui-stat__indicador ui-stat__indicador--negativo",this.setaElement.textContent="↓",this.indicadorElement.setAttribute("aria-label",`Queda de ${i}`)):l==="neutro"?(this.indicadorElement.className="ui-stat__indicador ui-stat__indicador--neutro",this.setaElement.textContent="→",this.indicadorElement.setAttribute("aria-label",`Variação estável de ${i}`)):(this.indicadorElement.className="ui-stat__indicador ui-stat__indicador--positivo",this.setaElement.textContent="↑",this.indicadorElement.setAttribute("aria-label",`Aumento de ${i}`))):this.indicadorElement.style.display="none",d?(this.descricaoElement.textContent=d,this.descricaoElement.style.display="block"):this.descricaoElement.style.display="none"}}class u extends n{}class b extends n{}s.definirCustomElement("ui-stat",n);s.definirCustomElement("ui-kpi",u);s.definirCustomElement("ui-metrica",b);const _=':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-badge{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:600;line-height:1;-webkit-user-select:none;user-select:none;box-sizing:border-box;transition:background-color .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}::slotted(svg),::slotted(ui-icone){width:12px!important;height:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;vertical-align:middle!important;shape-rendering:geometricPrecision;flex-shrink:0}::slotted(span){display:inline-flex;align-items:center;line-height:1}.ui-badge--suave{background-color:var(--ui-cor-badge-fundo, rgba(255, 255, 255, .08));color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid transparent}.ui-badge--solido{background-color:var(--ui-cor-badge-solido, #888899);color:#000;border:1px solid transparent}.ui-badge--contornado{background-color:transparent;color:var(--ui-cor-badge-texto, #e1e1e6);border:1px solid var(--ui-cor-badge-borda, rgba(255, 255, 255, .2))}.ui-badge--sucesso.ui-badge--suave{background-color:#00e08a26;color:var(--ui-cor-primaria, #00E08A)}.ui-badge--sucesso.ui-badge--solido{background-color:var(--ui-cor-primaria, #00E08A);color:#000}.ui-badge--sucesso.ui-badge--contornado{color:var(--ui-cor-primaria, #00E08A);border-color:#00e08a66}.ui-badge--erro.ui-badge--suave{background-color:#ff555526;color:var(--ui-cor-texto-erro, #ff5555)}.ui-badge--erro.ui-badge--solido{background-color:var(--ui-cor-texto-erro, #ff5555);color:#fff}.ui-badge--erro.ui-badge--contornado{color:var(--ui-cor-texto-erro, #ff5555);border-color:#f556}.ui-badge--alerta.ui-badge--suave{background-color:#ffb86c26;color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-badge--alerta.ui-badge--solido{background-color:var(--ui-cor-texto-alerta, #ffb86c);color:#000}.ui-badge--alerta.ui-badge--contornado{color:var(--ui-cor-texto-alerta, #ffb86c);border-color:#ffb86c66}.ui-badge--info.ui-badge--suave,.ui-badge--primaria.ui-badge--suave{background-color:#00aaff26;color:#0af}.ui-badge--info.ui-badge--solido,.ui-badge--primaria.ui-badge--solido{background-color:#0af;color:#fff}.ui-badge--info.ui-badge--contornado,.ui-badge--primaria.ui-badge--contornado{color:#0af;border-color:#0af6}.ui-badge--neutro.ui-badge--suave{background-color:#ffffff14;color:var(--ui-cor-texto-secundario, #888899)}.ui-badge__close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;cursor:pointer;opacity:.7;transition:opacity .15s ease,background-color .15s ease;font-size:10px;line-height:1;margin-left:2px}.ui-badge__close:hover{opacity:1;background-color:#fff3}';class c extends s.SafeHTMLElement{constructor(){super();t(this,"badgeElement");t(this,"labelElement");t(this,"closeElement");t(this,"listeners",new f.ListenerBag);t(this,"handleRemove",e=>{var r;e.stopPropagation(),this.dispatchEvent(new CustomEvent("ui-remove",{detail:{value:this.getAttribute("value")||((r=this.textContent)==null?void 0:r.trim())||""},bubbles:!0,composed:!0}))});const e=this.attachShadow({mode:"open"});e.innerHTML=`
|
|
22
|
-
<style>${_}</style>
|
|
23
|
-
<span class="ui-badge">
|
|
24
|
-
<slot></slot>
|
|
25
|
-
<span class="ui-badge__label" style="display: none;"></span>
|
|
26
|
-
<span class="ui-badge__close" role="button" tabindex="0" aria-label="Remover" style="display: none;" title="Remover">✕</span>
|
|
27
|
-
</span>
|
|
28
|
-
`,this.badgeElement=e.querySelector(".ui-badge"),this.labelElement=e.querySelector(".ui-badge__label"),this.closeElement=e.querySelector(".ui-badge__close")}static get observedAttributes(){return["variante","variant","estilo","removivel","removable","disabled","label","value"]}connectedCallback(){this.listeners.cleanup(),this.listeners.add(this.closeElement,"click",this.handleRemove),this.listeners.add(this.closeElement,"keydown",e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleRemove(e))}),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,r,i){this.syncState()}get removivel(){return this.hasAttribute("removivel")||this.hasAttribute("removable")}set removivel(e){e?this.setAttribute("removivel",""):(this.removeAttribute("removivel"),this.removeAttribute("removable"))}syncState(){const e=this.getAttribute("variante")||this.getAttribute("variant")||"neutro",r=this.getAttribute("estilo")||"suave",i=this.getAttribute("label"),l=this.removivel;this.badgeElement.className="ui-badge",this.badgeElement.classList.add(`ui-badge--${e}`),this.badgeElement.classList.add(`ui-badge--${r}`),i?(this.labelElement.textContent=i,this.labelElement.style.display="inline"):this.labelElement.style.display="none",l?this.closeElement.style.display="inline-flex":this.closeElement.style.display="none"}}class g extends c{}class m extends c{}s.definirCustomElement("ui-badge",c);s.definirCustomElement("ui-chip",g);s.definirCustomElement("ui-tag",m);exports.UIBadge=c;exports.UIChip=g;exports.UIKpi=u;exports.UIMetrica=b;exports.UIStat=n;exports.UITag=m;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
var b = Object.defineProperty;
|
|
2
|
-
var h = (l, n, t) => n in l ? b(l, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[n] = t;
|
|
3
|
-
var s = (l, n, t) => h(l, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { L as m } from "./listener-bag-DQgv7OON.js";
|
|
5
|
-
import { d, S as g } from "./ssr-safe-5cWfJP-s.js";
|
|
6
|
-
const f = ':host{display:inline-block;width:100%;box-sizing:border-box}:host([inline]){width:auto;height:auto}.ui-botao-primario{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-espaco-sm, 6px);width:100%;height:var(--ui-campo-altura, 100%);min-height:var(--ui-campo-altura, var(--ui-altura-minima, 15px));box-sizing:border-box;padding:0 12px;border:1px solid transparent;border-radius:var(--ui-raio-borda, 6px);font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:clamp(11px,.85rem,13px);font-weight:600;line-height:1;transition:background-color .15s cubic-bezier(.16,1,.3,1),border-color .15s cubic-bezier(.16,1,.3,1),color .15s cubic-bezier(.16,1,.3,1),filter .15s cubic-bezier(.16,1,.3,1),transform .12s cubic-bezier(.34,1.56,.64,1),box-shadow .15s ease;text-align:center;-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-botao-primario:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-cor-fundo, #0b0b0d),0 0 0 4px var(--ui-cor-primaria, #00E08A)}.ui-botao-primario--has-icon-start{padding-left:8px!important;padding-right:12px!important}.ui-botao-primario--has-icon-end{padding-left:12px!important;padding-right:8px!important}::slotted(svg),::slotted(ui-icone){display:inline-flex!important;align-items:center!important;justify-content:center!important;vertical-align:middle!important;flex-shrink:0!important;line-height:1!important;width:14px!important;height:14px!important;box-sizing:content-box;shape-rendering:geometricPrecision}::slotted(span),::slotted(label),::slotted(p){display:inline-flex;align-items:center;line-height:1}::slotted(div){display:inline-flex;align-items:center;justify-content:center;line-height:1;height:100%}.ui-botao-primario,.ui-botao-primario--primary,.ui-botao-primario--primario{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000);border-color:transparent}.ui-botao-primario--primary:hover:not(:disabled),.ui-botao-primario--primario:hover:not(:disabled),.ui-botao-primario:hover:not(:disabled){filter:brightness(1.1)}.ui-botao-primario--destaque{background:var(--ui-cor-destaque, var(--ui-cor-primaria, #00E08A));color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-botao-primario--secondary,.ui-botao-primario--secundario{background:var(--ui-cor-botao-secundario-fundo, #1e1e24);color:var(--ui-cor-texto, #e1e1e6);border-color:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-botao-primario--secondary:hover:not(:disabled),.ui-botao-primario--secundario:hover:not(:disabled){background:var(--ui-cor-botao-secundario-hover, #2a2a34);border-color:#ffffff3d}.ui-botao-primario--ghost,.ui-botao-primario--terciario{background:transparent;color:var(--ui-cor-texto, #e1e1e6);border-color:transparent}.ui-botao-primario--ghost:hover:not(:disabled),.ui-botao-primario--terciario:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-botao-primario--destructive,.ui-botao-primario--destrutivo,.ui-botao-primario--erro{background:var(--ui-cor-botao-destrutivo-fundo, #ff4444);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:transparent}.ui-botao-primario--destructive:hover:not(:disabled),.ui-botao-primario--destrutivo:hover:not(:disabled),.ui-botao-primario--erro:hover:not(:disabled){background:var(--ui-cor-botao-destrutivo-hover, #e03333)}.ui-botao-primario--outline,.ui-botao-primario--borda{background:transparent;color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A)}.ui-botao-primario--outline:hover:not(:disabled),.ui-botao-primario--borda:hover:not(:disabled){background:#00e08a1f;border-color:var(--ui-cor-primaria, #00E08A);filter:brightness(1.08)}.ui-botao-primario--icon-only,.ui-botao-primario--icone{padding:0;width:var(--ui-campo-altura, var(--ui-altura-minima, 15px));min-width:var(--ui-campo-altura, var(--ui-altura-minima, 15px));height:var(--ui-campo-altura, var(--ui-altura-minima, 15px));aspect-ratio:1;border-radius:var(--ui-raio-borda, 6px)}.ui-botao-primario--hover{filter:brightness(1.15)!important}.ui-botao-primario:active:not(:disabled),.ui-botao-primario--active{transform:scale(.97)!important;filter:brightness(.9)!important}.ui-botao-primario:disabled,.ui-botao-primario--disabled{opacity:.45;cursor:not-allowed;transform:none!important;filter:none!important}.ui-botao-primario--carregando,.ui-botao-primario--loading{cursor:wait;opacity:.85;pointer-events:none}.ui-botao-primario__spinner{width:14px;height:14px;animation:ui-spin .75s linear infinite;flex-shrink:0;shape-rendering:geometricPrecision}@keyframes ui-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (max-width: 640px){:host(:not([inline])) .ui-botao-primario{min-height:max(var(--ui-campo-altura, 38px),38px);font-size:14px;padding:0 14px}}';
|
|
7
|
-
class p extends g {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
s(this, "button");
|
|
11
|
-
s(this, "spinnerContainer");
|
|
12
|
-
s(this, "slotElement");
|
|
13
|
-
s(this, "opticalState", null);
|
|
14
|
-
s(this, "listeners", new m());
|
|
15
|
-
s(this, "handleSlotChange", () => {
|
|
16
|
-
this.sanitizeAndBalanceContent(), this.syncState();
|
|
17
|
-
});
|
|
18
|
-
s(this, "handleClick", (t) => {
|
|
19
|
-
if (this.hasAttribute("disabled") || this.carregando) {
|
|
20
|
-
t.preventDefault(), t.stopPropagation();
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
this.dispatchEvent(new CustomEvent("ui-click", { detail: { originalEvent: t }, bubbles: !0, composed: !0 }));
|
|
24
|
-
const o = this.closest("form");
|
|
25
|
-
if (o) {
|
|
26
|
-
if (this.hasAttribute("tipo-reset") || this.getAttribute("type") === "reset")
|
|
27
|
-
o.reset();
|
|
28
|
-
else if (this.hasAttribute("tipo-submit") || this.getAttribute("type") === "submit")
|
|
29
|
-
try {
|
|
30
|
-
o.requestSubmit(this.button);
|
|
31
|
-
} catch {
|
|
32
|
-
o.requestSubmit();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
const t = this.attachShadow({ mode: "open" });
|
|
37
|
-
t.innerHTML = `
|
|
38
|
-
<style>${f}</style>
|
|
39
|
-
<button class="ui-botao-primario" type="button">
|
|
40
|
-
<span class="ui-botao-primario__spinner-container" style="display: none;">
|
|
41
|
-
<svg class="ui-botao-primario__spinner" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
42
|
-
<circle cx="12" cy="12" r="10" stroke-opacity="0.25"></circle>
|
|
43
|
-
<path d="M12 2 a 10 10 0 0 1 10 10"></path>
|
|
44
|
-
</svg>
|
|
45
|
-
</span>
|
|
46
|
-
<slot></slot>
|
|
47
|
-
</button>
|
|
48
|
-
`, this.button = t.querySelector("button"), this.spinnerContainer = t.querySelector(".ui-botao-primario__spinner-container"), this.slotElement = t.querySelector("slot");
|
|
49
|
-
}
|
|
50
|
-
static get observedAttributes() {
|
|
51
|
-
return ["disabled", "variante", "carregando", "loading", "estado", "tamanho", "size", "altura", "height", "densidade"];
|
|
52
|
-
}
|
|
53
|
-
connectedCallback() {
|
|
54
|
-
this.listeners.cleanup(), this.listeners.add(this.button, "click", this.handleClick), this.listeners.add(this.slotElement, "slotchange", this.handleSlotChange), this.sanitizeAndBalanceContent(), this.syncState();
|
|
55
|
-
}
|
|
56
|
-
disconnectedCallback() {
|
|
57
|
-
this.listeners.cleanup();
|
|
58
|
-
}
|
|
59
|
-
attributeChangedCallback(t, o, a) {
|
|
60
|
-
this.syncState();
|
|
61
|
-
}
|
|
62
|
-
get carregando() {
|
|
63
|
-
return this.hasAttribute("carregando") || this.hasAttribute("loading");
|
|
64
|
-
}
|
|
65
|
-
set carregando(t) {
|
|
66
|
-
t ? this.setAttribute("carregando", "") : (this.removeAttribute("carregando"), this.removeAttribute("loading"));
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Remove espaços e quebras de linha fantasmas no slot e identifica
|
|
70
|
-
* se há ícone no início ou fim para aplicar compensação óptica de padding.
|
|
71
|
-
*/
|
|
72
|
-
sanitizeAndBalanceContent() {
|
|
73
|
-
const t = (e) => {
|
|
74
|
-
if (e.nodeType !== Node.ELEMENT_NODE) return !1;
|
|
75
|
-
const i = e, r = i.tagName.toLowerCase();
|
|
76
|
-
if (r === "ui-icone" || r === "svg" || r === "i" || i.hasAttribute("data-icon") || i.classList.contains("icon") || i.classList.contains("icone")) return !0;
|
|
77
|
-
const c = typeof i.className == "string" ? i.className : "";
|
|
78
|
-
return !!/\b(fa[srlb]?|fa-[\w-]+|lucide|tabler)\b/i.test(c);
|
|
79
|
-
}, o = this.slotElement ? this.slotElement.assignedNodes() : Array.from(this.childNodes), a = [];
|
|
80
|
-
for (let e = 0; e < o.length; e++) {
|
|
81
|
-
const i = o[e];
|
|
82
|
-
if (i.nodeType === Node.TEXT_NODE) {
|
|
83
|
-
const r = i.textContent || "";
|
|
84
|
-
if (!r.trim())
|
|
85
|
-
o.length > 1 && (i.textContent = "");
|
|
86
|
-
else {
|
|
87
|
-
const c = o[e - 1];
|
|
88
|
-
c && t(c) && (i.textContent = r.replace(/^\s+/, ""));
|
|
89
|
-
const u = o[e + 1];
|
|
90
|
-
u && t(u) && (i.textContent = (i.textContent || "").replace(/\s+$/, "")), (i.textContent || "").trim().length > 0 && a.push(i);
|
|
91
|
-
}
|
|
92
|
-
} else i.nodeType === Node.ELEMENT_NODE && a.push(i);
|
|
93
|
-
}
|
|
94
|
-
if (a.length >= 2)
|
|
95
|
-
t(a[0]) ? this.opticalState = "icon-start" : t(a[a.length - 1]) ? this.opticalState = "icon-end" : this.opticalState = null;
|
|
96
|
-
else if (a.length === 1) {
|
|
97
|
-
const e = a[0];
|
|
98
|
-
if (t(e))
|
|
99
|
-
this.opticalState = "icon-only";
|
|
100
|
-
else if (e.nodeType === Node.ELEMENT_NODE) {
|
|
101
|
-
const i = e;
|
|
102
|
-
i.children.length >= 2 ? t(i.firstElementChild) ? this.opticalState = "icon-start" : t(i.lastElementChild) ? this.opticalState = "icon-end" : this.opticalState = null : i.children.length === 1 && t(i.firstElementChild) ? this.opticalState = "icon-only" : this.opticalState = null;
|
|
103
|
-
} else
|
|
104
|
-
this.opticalState = null;
|
|
105
|
-
} else
|
|
106
|
-
this.opticalState = null;
|
|
107
|
-
}
|
|
108
|
-
syncState() {
|
|
109
|
-
const t = this.getAttribute("altura") || this.getAttribute("height");
|
|
110
|
-
t ? this.style.setProperty("--ui-campo-altura", isNaN(Number(t)) ? t : `${t}px`) : this.style.removeProperty("--ui-campo-altura");
|
|
111
|
-
const o = this.carregando, a = this.hasAttribute("disabled") || o, e = this.getAttribute("variante") || "primario", i = this.getAttribute("estado");
|
|
112
|
-
this.button.disabled = a, this.spinnerContainer.style.display = o ? "inline-flex" : "none";
|
|
113
|
-
const r = ["ui-botao-primario", `ui-botao-primario--${e}`];
|
|
114
|
-
a && !o && r.push("ui-botao-primario--disabled"), o && r.push("ui-botao-primario--carregando"), i && r.push(`ui-botao-primario--${i}`), this.opticalState === "icon-start" ? r.push("ui-botao-primario--has-icon-start") : this.opticalState === "icon-end" && r.push("ui-botao-primario--has-icon-end"), (this.opticalState === "icon-only" || e === "icon-only" || e === "icone") && r.push("ui-botao-primario--icon-only"), this.button.className = r.join(" ");
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
class v extends p {
|
|
118
|
-
}
|
|
119
|
-
d("ui-botao", p);
|
|
120
|
-
d("ui-botao-primario", v);
|
|
121
|
-
export {
|
|
122
|
-
p as U,
|
|
123
|
-
v as a
|
|
124
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var m=(l,n,t)=>n in l?h(l,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[n]=t;var s=(l,n,t)=>m(l,typeof n!="symbol"?n+"":n,t);const g=require("./listener-bag-D5omxZ9h.cjs"),u=require("./ssr-safe-CiHD1adl.cjs"),f=':host{display:inline-block;width:100%;box-sizing:border-box}:host([inline]){width:auto;height:auto}.ui-botao-primario{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-espaco-sm, 6px);width:100%;height:var(--ui-campo-altura, 100%);min-height:var(--ui-campo-altura, var(--ui-altura-minima, 15px));box-sizing:border-box;padding:0 12px;border:1px solid transparent;border-radius:var(--ui-raio-borda, 6px);font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:clamp(11px,.85rem,13px);font-weight:600;line-height:1;transition:background-color .15s cubic-bezier(.16,1,.3,1),border-color .15s cubic-bezier(.16,1,.3,1),color .15s cubic-bezier(.16,1,.3,1),filter .15s cubic-bezier(.16,1,.3,1),transform .12s cubic-bezier(.34,1.56,.64,1),box-shadow .15s ease;text-align:center;-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-botao-primario:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-cor-fundo, #0b0b0d),0 0 0 4px var(--ui-cor-primaria, #00E08A)}.ui-botao-primario--has-icon-start{padding-left:8px!important;padding-right:12px!important}.ui-botao-primario--has-icon-end{padding-left:12px!important;padding-right:8px!important}::slotted(svg),::slotted(ui-icone){display:inline-flex!important;align-items:center!important;justify-content:center!important;vertical-align:middle!important;flex-shrink:0!important;line-height:1!important;width:14px!important;height:14px!important;box-sizing:content-box;shape-rendering:geometricPrecision}::slotted(span),::slotted(label),::slotted(p){display:inline-flex;align-items:center;line-height:1}::slotted(div){display:inline-flex;align-items:center;justify-content:center;line-height:1;height:100%}.ui-botao-primario,.ui-botao-primario--primary,.ui-botao-primario--primario{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000);border-color:transparent}.ui-botao-primario--primary:hover:not(:disabled),.ui-botao-primario--primario:hover:not(:disabled),.ui-botao-primario:hover:not(:disabled){filter:brightness(1.1)}.ui-botao-primario--destaque{background:var(--ui-cor-destaque, var(--ui-cor-primaria, #00E08A));color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-botao-primario--secondary,.ui-botao-primario--secundario{background:var(--ui-cor-botao-secundario-fundo, #1e1e24);color:var(--ui-cor-texto, #e1e1e6);border-color:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-botao-primario--secondary:hover:not(:disabled),.ui-botao-primario--secundario:hover:not(:disabled){background:var(--ui-cor-botao-secundario-hover, #2a2a34);border-color:#ffffff3d}.ui-botao-primario--ghost,.ui-botao-primario--terciario{background:transparent;color:var(--ui-cor-texto, #e1e1e6);border-color:transparent}.ui-botao-primario--ghost:hover:not(:disabled),.ui-botao-primario--terciario:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-botao-primario--destructive,.ui-botao-primario--destrutivo,.ui-botao-primario--erro{background:var(--ui-cor-botao-destrutivo-fundo, #ff4444);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:transparent}.ui-botao-primario--destructive:hover:not(:disabled),.ui-botao-primario--destrutivo:hover:not(:disabled),.ui-botao-primario--erro:hover:not(:disabled){background:var(--ui-cor-botao-destrutivo-hover, #e03333)}.ui-botao-primario--outline,.ui-botao-primario--borda{background:transparent;color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A)}.ui-botao-primario--outline:hover:not(:disabled),.ui-botao-primario--borda:hover:not(:disabled){background:#00e08a1f;border-color:var(--ui-cor-primaria, #00E08A);filter:brightness(1.08)}.ui-botao-primario--icon-only,.ui-botao-primario--icone{padding:0;width:var(--ui-campo-altura, var(--ui-altura-minima, 15px));min-width:var(--ui-campo-altura, var(--ui-altura-minima, 15px));height:var(--ui-campo-altura, var(--ui-altura-minima, 15px));aspect-ratio:1;border-radius:var(--ui-raio-borda, 6px)}.ui-botao-primario--hover{filter:brightness(1.15)!important}.ui-botao-primario:active:not(:disabled),.ui-botao-primario--active{transform:scale(.97)!important;filter:brightness(.9)!important}.ui-botao-primario:disabled,.ui-botao-primario--disabled{opacity:.45;cursor:not-allowed;transform:none!important;filter:none!important}.ui-botao-primario--carregando,.ui-botao-primario--loading{cursor:wait;opacity:.85;pointer-events:none}.ui-botao-primario__spinner{width:14px;height:14px;animation:ui-spin .75s linear infinite;flex-shrink:0;shape-rendering:geometricPrecision}@keyframes ui-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (max-width: 640px){:host(:not([inline])) .ui-botao-primario{min-height:max(var(--ui-campo-altura, 38px),38px);font-size:14px;padding:0 14px}}';class d extends u.SafeHTMLElement{constructor(){super();s(this,"button");s(this,"spinnerContainer");s(this,"slotElement");s(this,"opticalState",null);s(this,"listeners",new g.ListenerBag);s(this,"handleSlotChange",()=>{this.sanitizeAndBalanceContent(),this.syncState()});s(this,"handleClick",t=>{if(this.hasAttribute("disabled")||this.carregando){t.preventDefault(),t.stopPropagation();return}this.dispatchEvent(new CustomEvent("ui-click",{detail:{originalEvent:t},bubbles:!0,composed:!0}));const o=this.closest("form");if(o){if(this.hasAttribute("tipo-reset")||this.getAttribute("type")==="reset")o.reset();else if(this.hasAttribute("tipo-submit")||this.getAttribute("type")==="submit")try{o.requestSubmit(this.button)}catch{o.requestSubmit()}}});const t=this.attachShadow({mode:"open"});t.innerHTML=`
|
|
2
|
-
<style>${f}</style>
|
|
3
|
-
<button class="ui-botao-primario" type="button">
|
|
4
|
-
<span class="ui-botao-primario__spinner-container" style="display: none;">
|
|
5
|
-
<svg class="ui-botao-primario__spinner" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
6
|
-
<circle cx="12" cy="12" r="10" stroke-opacity="0.25"></circle>
|
|
7
|
-
<path d="M12 2 a 10 10 0 0 1 10 10"></path>
|
|
8
|
-
</svg>
|
|
9
|
-
</span>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`,this.button=t.querySelector("button"),this.spinnerContainer=t.querySelector(".ui-botao-primario__spinner-container"),this.slotElement=t.querySelector("slot")}static get observedAttributes(){return["disabled","variante","carregando","loading","estado","tamanho","size","altura","height","densidade"]}connectedCallback(){this.listeners.cleanup(),this.listeners.add(this.button,"click",this.handleClick),this.listeners.add(this.slotElement,"slotchange",this.handleSlotChange),this.sanitizeAndBalanceContent(),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(t,o,a){this.syncState()}get carregando(){return this.hasAttribute("carregando")||this.hasAttribute("loading")}set carregando(t){t?this.setAttribute("carregando",""):(this.removeAttribute("carregando"),this.removeAttribute("loading"))}sanitizeAndBalanceContent(){const t=e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;const i=e,r=i.tagName.toLowerCase();if(r==="ui-icone"||r==="svg"||r==="i"||i.hasAttribute("data-icon")||i.classList.contains("icon")||i.classList.contains("icone"))return!0;const c=typeof i.className=="string"?i.className:"";return!!/\b(fa[srlb]?|fa-[\w-]+|lucide|tabler)\b/i.test(c)},o=this.slotElement?this.slotElement.assignedNodes():Array.from(this.childNodes),a=[];for(let e=0;e<o.length;e++){const i=o[e];if(i.nodeType===Node.TEXT_NODE){const r=i.textContent||"";if(!r.trim())o.length>1&&(i.textContent="");else{const c=o[e-1];c&&t(c)&&(i.textContent=r.replace(/^\s+/,""));const p=o[e+1];p&&t(p)&&(i.textContent=(i.textContent||"").replace(/\s+$/,"")),(i.textContent||"").trim().length>0&&a.push(i)}}else i.nodeType===Node.ELEMENT_NODE&&a.push(i)}if(a.length>=2)t(a[0])?this.opticalState="icon-start":t(a[a.length-1])?this.opticalState="icon-end":this.opticalState=null;else if(a.length===1){const e=a[0];if(t(e))this.opticalState="icon-only";else if(e.nodeType===Node.ELEMENT_NODE){const i=e;i.children.length>=2?t(i.firstElementChild)?this.opticalState="icon-start":t(i.lastElementChild)?this.opticalState="icon-end":this.opticalState=null:i.children.length===1&&t(i.firstElementChild)?this.opticalState="icon-only":this.opticalState=null}else this.opticalState=null}else this.opticalState=null}syncState(){const t=this.getAttribute("altura")||this.getAttribute("height");t?this.style.setProperty("--ui-campo-altura",isNaN(Number(t))?t:`${t}px`):this.style.removeProperty("--ui-campo-altura");const o=this.carregando,a=this.hasAttribute("disabled")||o,e=this.getAttribute("variante")||"primario",i=this.getAttribute("estado");this.button.disabled=a,this.spinnerContainer.style.display=o?"inline-flex":"none";const r=["ui-botao-primario",`ui-botao-primario--${e}`];a&&!o&&r.push("ui-botao-primario--disabled"),o&&r.push("ui-botao-primario--carregando"),i&&r.push(`ui-botao-primario--${i}`),this.opticalState==="icon-start"?r.push("ui-botao-primario--has-icon-start"):this.opticalState==="icon-end"&&r.push("ui-botao-primario--has-icon-end"),(this.opticalState==="icon-only"||e==="icon-only"||e==="icone")&&r.push("ui-botao-primario--icon-only"),this.button.className=r.join(" ")}}class b extends d{}u.definirCustomElement("ui-botao",d);u.definirCustomElement("ui-botao-primario",b);exports.UIBotao=d;exports.UIBotaoPrimario=b;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var w=(a,s,t)=>s in a?A(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t;var i=(a,s,t)=>w(a,typeof s!="symbol"?s+"":s,t);const d=require("./ssr-safe-CiHD1adl.cjs"),c=require("./form-validacao-ytRYSF3E.cjs"),S=':host{display:flex;flex-direction:column;gap:4px;width:100%;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){width:auto;display:inline-flex}.ui-campo-texto__container{position:relative;width:100%;display:flex;flex-direction:column;justify-content:center}:host([label-flutuante]) .ui-campo-texto__container{margin-top:6px}.ui-campo-texto__label{display:flex;align-items:center;justify-content:space-between;font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-medio, 500);color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;margin-bottom:4px;flex-shrink:0}.ui-campo-texto__asterisco{color:var(--ui-cor-texto-erro, #ff5555);margin-left:2px;font-weight:600}.ui-campo-texto__wrapper{position:relative;display:flex;align-items:center;width:100%;height:var(--ui-campo-altura, 100%);min-height:var(--ui-campo-altura, var(--ui-altura-minima, 15px));background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);padding:0 8px;gap:6px;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ui-campo-texto__wrapper--foco{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px #00e08a2e;background-color:var(--ui-cor-fundo-menu, #18181c)}.ui-campo-texto__wrapper--erro{border-color:var(--ui-cor-texto-erro, #ff5555)!important;box-shadow:0 0 0 2px #ff55552e!important}.ui-campo-texto__wrapper--disabled{opacity:.5;cursor:not-allowed;background-color:#ffffff08}.ui-campo-texto__input{flex:1;width:100%;height:100%;min-height:0;background:transparent;border:none;outline:none;color:var(--ui-cor-texto, #e1e1e6);font-family:inherit;font-size:clamp(11px,.85rem,13px);line-height:1.2;padding:0;margin:0;box-sizing:border-box}.ui-campo-texto__input::placeholder{color:var(--ui-cor-texto-secundario, #888899);opacity:.65}.ui-campo-texto__input:disabled{cursor:not-allowed}.ui-campo-texto__icone{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0;font-size:14px;line-height:1;max-height:100%}.ui-campo-texto__icone svg,.ui-campo-texto__icone ::slotted(svg),.ui-campo-texto__icone ::slotted(ui-icone){shape-rendering:geometricPrecision;display:inline-flex;vertical-align:middle}.ui-campo-texto__icone--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none;transition:opacity .15s ease,transform .15s ease}.ui-campo-texto__icone--clicavel:hover{opacity:.85;transform:scale(1.1)}:host([label-flutuante]) .ui-campo-texto__label{position:absolute;left:8px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--ui-cor-texto-secundario, #888899);pointer-events:none;z-index:3;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);padding:0 4px;border-radius:3px;margin-bottom:0;white-space:nowrap;max-width:calc(100% - 16px);overflow:hidden;text-overflow:ellipsis;transition:top .15s cubic-bezier(.4,0,.2,1),transform .15s cubic-bezier(.4,0,.2,1),color .15s ease,font-size .15s ease}:host([label-flutuante][tem-icone-esquerda]) .ui-campo-texto__label{left:28px}:host([label-flutuante]) .ui-campo-texto__label--ativa{top:-8px;left:8px!important;transform:translateY(0) scale(.85);transform-origin:left top;font-weight:600;color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-elevado, #1a1a1e)}:host([label-flutuante][erro]) .ui-campo-texto__label--ativa,:host([label-flutuante][mensagem-erro]) .ui-campo-texto__label--ativa{color:var(--ui-cor-texto-erro, #ff5555)}.ui-campo-texto__helper{font-size:var(--ui-tamanho-caption, 11px);color:var(--ui-cor-texto-secundario, #888899);line-height:var(--ui-altura-linha-compacta, 1.2);margin-top:2px}.ui-campo-texto__helper--erro{color:var(--ui-cor-texto-erro, #ff5555);font-weight:500;display:flex;align-items:center;gap:4px}.ui-campo-texto__wrapper{touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-campo-texto__input{touch-action:manipulation}@media (max-width: 640px),(pointer: coarse) and (max-width: 1024px){.ui-campo-texto__input{font-size:16px!important}:host(:not([inline])) .ui-campo-texto__wrapper{min-height:max(var(--ui-campo-altura, 38px),38px);padding:0 10px}.ui-campo-texto__label{font-size:13px}.ui-campo-texto__icone--clicavel{min-width:32px;min-height:32px}}',x=["label","placeholder","value","tipo","type","obrigatorio","required","minlength","min-length","maxlength","max-length","pattern","min","max","step","mensagem-validacao","helper-text","erro","mensagem-erro","disabled","readonly","label-flutuante","alternar-senha","tamanho","size","altura","height","densidade","aria-label"];function f(){return`
|
|
2
|
-
<style>${S}</style>
|
|
3
|
-
<div class="ui-campo-texto__container">
|
|
4
|
-
<label class="ui-campo-texto__label" style="display: none;"></label>
|
|
5
|
-
<div class="ui-campo-texto__wrapper">
|
|
6
|
-
<span class="ui-campo-texto__icone ui-campo-texto__icone--esquerda">
|
|
7
|
-
<slot name="icone-esquerda"></slot>
|
|
8
|
-
</span>
|
|
9
|
-
<input class="ui-campo-texto__input" type="text" />
|
|
10
|
-
<span class="ui-campo-texto__icone ui-campo-texto__icone--direita">
|
|
11
|
-
<slot name="icone-direita"></slot>
|
|
12
|
-
</span>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="ui-campo-texto__helper" style="display: none;"></div>
|
|
16
|
-
`}function _(a){const{labelElement:s,inputElement:t,labelText:e,placeholderText:n,isFlutuante:o,estaFocado:r,obrigatorio:u}=a,l=t.value.trim()!=="";let h=!1;try{h=t.matches(":-webkit-autofill")}catch{h=!1}e?(u?s.innerHTML=`${e} <span class="ui-campo-texto__asterisco" aria-hidden="true">*</span>`:s.textContent=e,s.style.display="flex",o&&(r||l||h)?s.classList.add("ui-campo-texto__label--ativa"):s.classList.remove("ui-campo-texto__label--ativa")):s.style.display="none",o&&!r&&!l&&!h?t.placeholder="":t.placeholder=n}function v(a,s,t){s?(a.classList.add("ui-campo-texto__icone--clicavel"),a.setAttribute("role","button"),a.setAttribute("tabindex","0"),a.setAttribute("aria-label",t?"Ocultar senha":"Exibir senha")):(a.classList.remove("ui-campo-texto__icone--clicavel"),a.removeAttribute("role"),a.removeAttribute("tabindex"),a.removeAttribute("aria-label"))}function E(a,s,t,e,n,o){e?(a.classList.add("ui-campo-texto__wrapper--erro"),s.setAttribute("aria-invalid","true")):(a.classList.remove("ui-campo-texto__wrapper--erro"),s.removeAttribute("aria-invalid")),e&&n?(t.textContent=`⚠️ ${n}`,t.className="ui-campo-texto__helper ui-campo-texto__helper--erro",t.style.display="block"):o?(t.textContent=o,t.className="ui-campo-texto__helper",t.style.display="block"):t.style.display="none"}class b extends d.SafeHTMLElement{constructor(){super();i(this,"internals");i(this,"_formDisabled",!1);i(this,"_customErrorMessage","");this.internals=typeof this.attachInternals=="function"?this.attachInternals():{}}formDisabledCallback(t){this._formDisabled=t,this.syncState()}get form(){var t;return this.closest("form")??((t=this.internals)==null?void 0:t.form)??null}get required(){return this.hasAttribute("obrigatorio")||this.hasAttribute("required")}set required(t){t?this.setAttribute("obrigatorio",""):(this.removeAttribute("obrigatorio"),this.removeAttribute("required")),this.syncState()}get obrigatorio(){return this.required}set obrigatorio(t){this.required=t}get validity(){var t;return this.atualizarValidade(),(t=this.internals)==null?void 0:t.validity}get validationMessage(){var t;return this.atualizarValidade(),((t=this.internals)==null?void 0:t.validationMessage)??""}get willValidate(){var t;return((t=this.internals)==null?void 0:t.willValidate)??!1}checkValidity(){var t,e;return this.atualizarValidade(),((e=(t=this.internals)==null?void 0:t.checkValidity)==null?void 0:e.call(t))??!0}reportValidity(){var t,e;return this.atualizarValidade(),((e=(t=this.internals)==null?void 0:t.reportValidity)==null?void 0:e.call(t))??!0}setCustomValidity(t){this._customErrorMessage=t||"",this.atualizarValidade()}}i(b,"formAssociated",!0);class g extends b{constructor(){super();i(this,"labelElement");i(this,"wrapperElement");i(this,"inputElement");i(this,"helperElement");i(this,"rightIconContainer");i(this,"leftSlotElement");i(this,"_senhaVisivel",!1);i(this,"_checkTimer",null);i(this,"_focado",!1);i(this,"_inputId");i(this,"_defaultValue","");i(this,"handleSlotChange",()=>{this.syncState()});i(this,"handleHostClick",t=>{c.cliqueVeioDeRotuloExterno(this,t)&&!this.disabled&&this.inputElement.focus()});i(this,"handleRightIconClick",t=>{(this.getAttribute("tipo")==="password"||this.hasAttribute("alternar-senha"))&&(t.stopPropagation(),this.alternarVisibilidadeSenha())});i(this,"handleRightIconKeyDown",t=>{(this.getAttribute("tipo")==="password"||this.hasAttribute("alternar-senha"))&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),this.alternarVisibilidadeSenha())});i(this,"handleFocus",()=>{this._focado=!0,this.wrapperElement.classList.add("ui-campo-texto__wrapper--foco"),this.syncState()});i(this,"handleBlur",()=>{this._focado=!1,this.wrapperElement.classList.remove("ui-campo-texto__wrapper--foco"),this.syncState()});i(this,"handleInput",t=>{t.stopPropagation();const e=t.target.value;this.internals.setFormValue(e),this.syncState(),this.dispatchEvent(new CustomEvent("ui-input",{detail:{value:e},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))});i(this,"handleChange",t=>{t.stopPropagation();const e=t.target.value;this.internals.setFormValue(e),this.syncState(),this.dispatchEvent(new CustomEvent("ui-change",{detail:{value:e},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))});const t=this.attachShadow({mode:"open",delegatesFocus:!0});t.innerHTML=f(),this.labelElement=t.querySelector(".ui-campo-texto__label"),this.wrapperElement=t.querySelector(".ui-campo-texto__wrapper"),this.inputElement=t.querySelector(".ui-campo-texto__input"),this.helperElement=t.querySelector(".ui-campo-texto__helper"),this.rightIconContainer=t.querySelector(".ui-campo-texto__icone--direita"),this.leftSlotElement=t.querySelector('slot[name="icone-esquerda"]'),this._inputId=c.gerarIdUnico("ui-input"),this.inputElement.id=this._inputId,this.labelElement.htmlFor=this._inputId,this.helperElement.id=`${this._inputId}-helper`,this.inputElement.setAttribute("aria-describedby",`${this._inputId}-helper`)}static get observedAttributes(){return x}focus(t){this.inputElement.focus(t)}blur(){this.inputElement.blur()}connectedCallback(){this.inputElement.addEventListener("input",this.handleInput),this.inputElement.addEventListener("change",this.handleChange),this.inputElement.addEventListener("focus",this.handleFocus),this.inputElement.addEventListener("blur",this.handleBlur),this.rightIconContainer.addEventListener("click",this.handleRightIconClick),this.rightIconContainer.addEventListener("keydown",this.handleRightIconKeyDown),this.leftSlotElement.addEventListener("slotchange",this.handleSlotChange),this.addEventListener("click",this.handleHostClick),this._defaultValue=this.getAttribute("value")||"",this.hasAttribute("value")&&!this.inputElement.value&&(this.inputElement.value=this._defaultValue),this.syncState(),this._checkTimer=setTimeout(()=>this.syncState(),100)}disconnectedCallback(){this.inputElement.removeEventListener("input",this.handleInput),this.inputElement.removeEventListener("change",this.handleChange),this.inputElement.removeEventListener("focus",this.handleFocus),this.inputElement.removeEventListener("blur",this.handleBlur),this.rightIconContainer.removeEventListener("click",this.handleRightIconClick),this.rightIconContainer.removeEventListener("keydown",this.handleRightIconKeyDown),this.leftSlotElement.removeEventListener("slotchange",this.handleSlotChange),this.removeEventListener("click",this.handleHostClick),this._checkTimer&&clearTimeout(this._checkTimer)}attributeChangedCallback(t,e,n){t==="value"&&n!==this.inputElement.value&&!this._focado&&(this.inputElement.value=n||""),this.syncState()}get value(){return this.inputElement?this.inputElement.value:this.getAttribute("value")||""}set value(t){if(this.setAttribute("value",t),this.inputElement)try{this.inputElement.value=t}catch{}this.syncState()}formResetCallback(){var t;this.inputElement.value=this._defaultValue,(t=this.internals)==null||t.setFormValue(this._defaultValue),this.syncState()}formStateRestoreCallback(t,e){typeof t=="string"&&(this.value=t)}get name(){return this.getAttribute("name")||""}set name(t){this.setAttribute("name",t)}get type(){return this.getAttribute("tipo")||this.getAttribute("type")||"text"}get disabled(){return this.hasAttribute("disabled")||this._formDisabled}set disabled(t){t?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get minLength(){const t=this.getAttribute("minlength")??this.getAttribute("min-length");return t?parseInt(t,10):-1}set minLength(t){t>=0?this.setAttribute("minlength",String(t)):this.removeAttribute("minlength"),this.syncState()}get maxLength(){const t=this.getAttribute("maxlength")??this.getAttribute("max-length");return t?parseInt(t,10):-1}set maxLength(t){t>=0?this.setAttribute("maxlength",String(t)):this.removeAttribute("maxlength"),this.syncState()}get pattern(){return this.getAttribute("pattern")||""}set pattern(t){t?this.setAttribute("pattern",t):this.removeAttribute("pattern"),this.syncState()}atualizarValidade(){var p,m;const t=this.getAttribute("minlength")??this.getAttribute("min-length"),e=this.getAttribute("maxlength")??this.getAttribute("max-length"),n=this.getAttribute("min"),o=this.getAttribute("max"),r=this.inputElement?this.inputElement.value:"",u=this.getAttribute("value")||r,l=!!((m=(p=this.inputElement)==null?void 0:p.validity)!=null&&m.badInput),h=c.validarRestricoesCampoTexto({val:r,rawVal:u,badInput:l,disabled:this.disabled,required:this.required,tipo:this.type,minlength:t!==null?parseInt(t,10):null,maxlength:e!==null?parseInt(e,10):null,min:n!==null?parseFloat(n):null,max:o!==null?parseFloat(o):null,step:this.getAttribute("step"),pattern:this.getAttribute("pattern"),customError:this._customErrorMessage,mensagemValidacao:this.getAttribute("mensagem-validacao")});c.aplicarValidadeInternals(this.internals,h,this.inputElement)}alternarVisibilidadeSenha(){var n;if(!(this.getAttribute("tipo")==="password"||this._senhaVisivel))return;this._senhaVisivel=!this._senhaVisivel,this.inputElement.type=this._senhaVisivel?"text":"password";const e=(n=this.shadowRoot)==null?void 0:n.querySelector('slot[name="icone-direita"]');e&&e.assignedElements().forEach(r=>{var u,l;(((u=r.textContent)==null?void 0:u.trim())==="👁️"||((l=r.textContent)==null?void 0:l.trim())==="🙈")&&(r.textContent=this._senhaVisivel?"🙈":"👁️")}),this.dispatchEvent(new CustomEvent("ui-toggle-senha",{detail:{visivel:this._senhaVisivel},bubbles:!0,composed:!0}))}syncState(){this.leftSlotElement.assignedNodes().length>0||this.querySelector('[slot="icone-esquerda"]')!==null?this.setAttribute("tem-icone-esquerda",""):this.removeAttribute("tem-icone-esquerda");const e=this.getAttribute("altura")||this.getAttribute("height");e?this.style.setProperty("--ui-campo-altura",isNaN(Number(e))?e:`${e}px`):this.style.removeProperty("--ui-campo-altura"),_({labelElement:this.labelElement,inputElement:this.inputElement,labelText:this.getAttribute("label"),placeholderText:this.getAttribute("placeholder")||"",isFlutuante:this.hasAttribute("label-flutuante"),estaFocado:this._focado,obrigatorio:this.required}),this.sincronizarNomeAcessivel();const n=this.getAttribute("tipo")||this.getAttribute("type")||"text";if(!this._senhaVisivel)try{this.inputElement.type=n}catch{this.inputElement.type="text"}const o=this.getAttribute("minlength")??this.getAttribute("min-length");o!==null?this.inputElement.minLength=parseInt(o,10):this.inputElement.removeAttribute("minlength");const r=this.getAttribute("maxlength")??this.getAttribute("max-length");r!==null?this.inputElement.maxLength=parseInt(r,10):this.inputElement.removeAttribute("maxlength");const u=this.getAttribute("pattern");u!==null?this.inputElement.pattern=u:this.inputElement.removeAttribute("pattern"),this.internals.setFormValue(this.inputElement.value);const l=this.hasAttribute("disabled")||this._formDisabled,h=this.hasAttribute("readonly");this.inputElement.disabled=l,this.inputElement.readOnly=h,l?this.wrapperElement.classList.add("ui-campo-texto__wrapper--disabled"):this.wrapperElement.classList.remove("ui-campo-texto__wrapper--disabled");const p=n==="password"||this.hasAttribute("alternar-senha");v(this.rightIconContainer,p,this._senhaVisivel);const m=this.hasAttribute("erro")||this.hasAttribute("mensagem-erro");E(this.wrapperElement,this.inputElement,this.helperElement,m,this.getAttribute("mensagem-erro"),this.getAttribute("helper-text")),this.atualizarValidade()}sincronizarNomeAcessivel(){const t=this.getAttribute("label")?"":c.obterRotuloExterno(this,this.internals);t?this.inputElement.setAttribute("aria-label",t):this.inputElement.removeAttribute("aria-label")}}class y extends g{}d.definirCustomElement("ui-campo-texto",g);d.definirCustomElement("ui-input",y);exports.ATRIBUTOS_OBSERVADOS_CAMPO_TEXTO=x;exports.FormAssociatedElement=b;exports.UICampoTexto=g;exports.UIInput=y;exports.criarTemplateCampoTexto=f;exports.sincronizarFeedbackErro=E;exports.sincronizarIconeSenha=v;exports.sincronizarLabelEPlaceholder=_;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";var y=Object.defineProperty;var x=(l,a,t)=>a in l?y(l,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[a]=t;var s=(l,a,t)=>x(l,typeof a!="symbol"?a+"":a,t);const b=require("./ssr-safe-CiHD1adl.cjs"),v=':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-modal__backdrop{display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:calc(var(--ui-z-modal, 1000) - 1);opacity:0;pointer-events:none;transition:opacity .25s ease}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{display:block;opacity:1;pointer-events:auto}.ui-modal__dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(.95);max-width:560px;width:90%;max-height:85vh;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-borda, 12px);box-shadow:0 12px 36px #0009;z-index:var(--ui-z-modal, 1000);display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;overflow:hidden;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility .2s ease;box-sizing:border-box;color:var(--ui-cor-texto, #e1e1e6)}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}@starting-style{:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:0;transform:translate(-50%,-50%) scale(.94)}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{opacity:0}}.ui-modal__handle{display:none;width:36px;height:4px;border-radius:2px;background-color:#ffffff40;margin:6px auto 12px;flex-shrink:0}.ui-modal__header{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.08);gap:12px}.ui-modal__titulo{font-size:18px;font-weight:600;margin:0;color:var(--ui-cor-texto, #e1e1e6)}.ui-modal__close{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-size:16px;cursor:pointer;padding:4px 8px;border-radius:4px;line-height:1;display:inline-flex;align-items:center;justify-content:center;transition:color .15s ease,background-color .15s ease;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-modal__close svg,.ui-modal__close ::slotted(svg){shape-rendering:geometricPrecision}.ui-modal__close:hover{color:#fff;background-color:#ffffff1a}.ui-modal__body{padding:20px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:1;box-sizing:border-box}.ui-modal__footer{padding:14px 20px;display:flex;align-items:center;justify-content:flex-end;gap:12px;border-top:1px solid rgba(255,255,255,.08);background-color:#00000026}@media (max-width: 640px){.ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:16px 16px 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}.ui-modal__close{min-width:44px;min-height:44px;font-size:18px}.ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{transform:translateY(0)!important}.ui-modal__handle{display:block!important}}:host([bottom-sheet]) .ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:16px 16px 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}:host([bottom-sheet]) .ui-modal__close{min-width:44px;min-height:44px;font-size:18px}:host([bottom-sheet]) .ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([bottom-sheet][aberto]) .ui-modal__dialog,:host([bottom-sheet][open]) .ui-modal__dialog{transform:translateY(0)!important}:host([bottom-sheet]) .ui-modal__handle{display:block!important}';function p(l){const a=new Set;if(typeof document>"u")return a;let t=l;for(;t&&t!==document.body&&t!==document.documentElement;){const o=t.parentElement;if(!o)break;const e=Array.from(o.children);for(const i of e)if(i!==t&&!i.contains(l)&&i.tagName!=="SCRIPT"&&i.tagName!=="STYLE"&&!(i.hasAttribute("inert")||i.inert===!0)){i.setAttribute("inert","");try{i.inert=!0}catch{}a.add(i)}t=o}if(document.body){const o=Array.from(document.body.children);for(const e of o)if(e!==l&&!e.contains(l)&&e.tagName!=="SCRIPT"&&e.tagName!=="STYLE"&&!(e.hasAttribute("inert")||e.inert===!0)){e.setAttribute("inert","");try{e.inert=!0}catch{}a.add(e)}}return a}function u(l){l.forEach(a=>{try{a.removeAttribute("inert"),a.inert=!1}catch{}}),l.clear()}const n=class n extends b.SafeHTMLElement{constructor(){super();s(this,"backdropElement");s(this,"dialogElement");s(this,"tituloElement");s(this,"closeElement");s(this,"_elementoGatilho",null);s(this,"_focables",[]);s(this,"_tituloId");s(this,"_elementosInertes",new Set);s(this,"handleSlotChange",()=>{this.syncState()});s(this,"handleBackdropClick",t=>{t.stopPropagation(),this.fechar()});s(this,"handleCloseClick",t=>{t.stopPropagation(),this.fechar()});s(this,"handleKeyDown",t=>{var o,e;if(this.aberto&&this._isTopMostModal()){if(t.key==="Escape")this.fechar(),t.stopImmediatePropagation();else if(t.key==="Tab"){if(this._atualizarFocables(),this._focables.length===0){t.preventDefault();return}const i=this._focables[0],r=this._focables[this._focables.length-1],d=this.getRootNode().activeElement;t.shiftKey?(d===i||!this.contains(d)&&!((o=this.shadowRoot)!=null&&o.contains(d)))&&(t.preventDefault(),r.focus()):(d===r||!this.contains(d)&&!((e=this.shadowRoot)!=null&&e.contains(d)))&&(t.preventDefault(),i.focus())}}});this._tituloId=`ui-modal-title-${Math.random().toString(36).substring(2,9)}`;const t=this.attachShadow({mode:"open"});t.innerHTML=`
|
|
2
|
-
<style>${v}</style>
|
|
3
|
-
<div class="ui-modal__backdrop"></div>
|
|
4
|
-
<div class="ui-modal__dialog" role="dialog" aria-modal="true" aria-labelledby="${this._tituloId}" tabindex="-1">
|
|
5
|
-
<div class="ui-modal__handle"></div>
|
|
6
|
-
<div class="ui-modal__header">
|
|
7
|
-
<h3 class="ui-modal__titulo" id="${this._tituloId}"></h3>
|
|
8
|
-
<button class="ui-modal__close" type="button" aria-label="Fechar modal" title="Fechar">✕</button>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="ui-modal__body">
|
|
11
|
-
<slot></slot>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="ui-modal__footer">
|
|
14
|
-
<slot name="rodape"></slot>
|
|
15
|
-
<slot name="footer"></slot>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
`,this.backdropElement=t.querySelector(".ui-modal__backdrop"),this.dialogElement=t.querySelector(".ui-modal__dialog"),this.tituloElement=t.querySelector(".ui-modal__titulo"),this.closeElement=t.querySelector(".ui-modal__close")}static get observedAttributes(){return["aberto","open","titulo","title","aria-label","aria-labelledby","rotulo","bottom-sheet","bloquear-fechamento"]}connectedCallback(){this.backdropElement.addEventListener("click",this.handleBackdropClick),this.closeElement.addEventListener("click",this.handleCloseClick),window.addEventListener("keydown",this.handleKeyDown),this.shadowRoot.querySelectorAll("slot").forEach(o=>{o.addEventListener("slotchange",this.handleSlotChange)}),this.syncState()}disconnectedCallback(){this.backdropElement.removeEventListener("click",this.handleBackdropClick),this.closeElement.removeEventListener("click",this.handleCloseClick),window.removeEventListener("keydown",this.handleKeyDown),this.shadowRoot.querySelectorAll("slot").forEach(o=>{o.removeEventListener("slotchange",this.handleSlotChange)}),u(this._elementosInertes),this.hasAttribute("data-scroll-locked")&&(this.removeAttribute("data-scroll-locked"),n._openCount=Math.max(0,n._openCount-1),n._openCount===0&&(document.body.style.overflow=""))}attributeChangedCallback(t,o,e){(t==="aberto"||t==="open")&&e!==null&&(document.activeElement&&document.activeElement!==document.body&&(this._elementoGatilho=document.activeElement),setTimeout(()=>{this._atualizarFocables(),this._focables.length>0?this._focables[0].focus():this.dialogElement.focus()},0)),this.syncState()}get aberto(){return this.hasAttribute("aberto")||this.hasAttribute("open")}set aberto(t){t?this.setAttribute("aberto",""):(this.removeAttribute("aberto"),this.removeAttribute("open")),this.syncState()}abrir(){this.aberto||(document.activeElement&&document.activeElement!==document.body&&(this._elementoGatilho=document.activeElement),this.aberto=!0,this.dispatchEvent(new CustomEvent("ui-abrir",{bubbles:!0,composed:!0})),setTimeout(()=>{this._atualizarFocables(),this._focables.length>0?this._focables[0].focus():this.dialogElement.focus()},0))}fechar(){this.hasAttribute("bloquear-fechamento")||this.aberto&&(u(this._elementosInertes),this.aberto=!1,this.dispatchEvent(new CustomEvent("ui-fechar",{bubbles:!0,composed:!0})),this._elementoGatilho&&(this._elementoGatilho.focus(),this._elementoGatilho=null))}syncState(){var d,c;const t=this.aberto,o=this.getAttribute("titulo")||this.getAttribute("title")||"",e=(d=this.shadowRoot)==null?void 0:d.querySelector(".ui-modal__footer");this.dialogElement.setAttribute("aria-hidden",String(!t));const i=this.getAttribute("aria-label")||this.getAttribute("rotulo"),r=this.getAttribute("aria-labelledby");if(i?(this.dialogElement.setAttribute("aria-label",i),this.dialogElement.removeAttribute("aria-labelledby")):r?(this.dialogElement.setAttribute("aria-labelledby",r),this.dialogElement.removeAttribute("aria-label")):o?(this.tituloElement.textContent=o,this.tituloElement.style.display="block",this.dialogElement.setAttribute("aria-labelledby",this._tituloId),this.dialogElement.removeAttribute("aria-label")):(this.tituloElement.style.display="none",this.dialogElement.removeAttribute("aria-labelledby"),this.dialogElement.setAttribute("aria-label","Diálogo modal")),e){const _=Array.from(((c=this.shadowRoot)==null?void 0:c.querySelectorAll('slot[name="rodape"], slot[name="footer"]'))||[]).some(g=>g.assignedNodes({flatten:!0}).some(m=>m.nodeType===Node.ELEMENT_NODE||m.textContent&&m.textContent.trim()!==""))||this.querySelector('[slot="rodape"], [slot="footer"]')!==null;e.style.display=_?"flex":"none"}t?(this._elementosInertes.size===0&&(this._elementosInertes=p(this)),this.hasAttribute("data-scroll-locked")||(this.setAttribute("data-scroll-locked","true"),n._openCount++,n._openCount===1&&(document.body.style.overflow="hidden"))):(this._elementosInertes.size>0&&u(this._elementosInertes),this.hasAttribute("data-scroll-locked")&&(this.removeAttribute("data-scroll-locked"),n._openCount=Math.max(0,n._openCount-1),n._openCount===0&&(document.body.style.overflow="")))}_atualizarFocables(){const t='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), ui-campo-texto, ui-botao, ui-botao-primario, ui-checkbox, ui-switch, ui-lista-flutuante, ui-radio, ui-select';let o=Array.from(this.shadowRoot.querySelectorAll(t));o=o.filter(r=>window.getComputedStyle(r).display!=="none");const e=this.shadowRoot.querySelectorAll("slot");let i=[];e.forEach(r=>{r.assignedElements({flatten:!0}).forEach(c=>{c instanceof HTMLElement&&(c.matches(t)&&i.push(c),i.push(...Array.from(c.querySelectorAll(t))))})}),this._focables=[...o,...i].filter(r=>!r.hasAttribute("disabled")&&r.getAttribute("aria-hidden")!=="true")}_isTopMostModal(){const t=Array.from(document.querySelectorAll("ui-modal[aberto], ui-modal[open], ui-dialog[aberto], ui-dialog[open]"));return t[t.length-1]===this}};s(n,"_openCount",0);let h=n;class f extends h{}b.definirCustomElement("ui-modal",h);b.definirCustomElement("ui-dialog",f);exports.UIDialog=f;exports.UIModal=h;exports.aplicarInertForaDoModal=p;exports.removerInertForaDoModal=u;
|