@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.
Files changed (161) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/LICENSE +21 -21
  3. package/README.md +150 -14
  4. package/dist/botao.cjs +1 -1
  5. package/dist/botao.js +1 -1
  6. package/dist/camadas.cjs +65 -65
  7. package/dist/camadas.js +762 -729
  8. package/dist/campo-texto.cjs +1 -1
  9. package/dist/campo-texto.js +1 -1
  10. package/dist/canvas.cjs +105 -146
  11. package/dist/canvas.js +5132 -1199
  12. package/dist/card.cjs +1 -1
  13. package/dist/card.js +1 -1
  14. package/dist/components/ui-botao/ui-botao.d.ts +15 -0
  15. package/dist/components/ui-camadas/camadas-persistencia.d.ts +4 -0
  16. package/dist/components/ui-camadas/ui-camadas.d.ts +10 -0
  17. package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +5 -0
  18. package/dist/components/ui-canvas-cad/cad-estilos-externos.d.ts +16 -0
  19. package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +4 -0
  20. package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +262 -0
  21. package/dist/components/ui-canvas-cad/cad-ferramentas-barra.d.ts +15 -0
  22. package/dist/components/ui-canvas-cad/cad-snap.d.ts +32 -0
  23. package/dist/components/ui-canvas-cad/cad-toolbar-painel.d.ts +1 -0
  24. package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +143 -0
  25. package/dist/components/ui-lista-flutuante/lista-flutuante-posicionamento.d.ts +2 -0
  26. package/dist/components/ui-lista-flutuante/ui-lista-flutuante.d.ts +1 -0
  27. package/dist/components/ui-modal/modal-pilha.d.ts +3 -0
  28. package/dist/components/ui-modal/ui-modal.d.ts +19 -4
  29. package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +3 -0
  30. package/dist/components/ui-tabela/tabela-atributos-sync.d.ts +3 -0
  31. package/dist/components/ui-tabela/tabela-corpo.d.ts +2 -0
  32. package/dist/components/ui-tabela/tabela-localizador.d.ts +8 -1
  33. package/dist/components/ui-tabela/tabela-orquestrador-dados.d.ts +4 -0
  34. package/dist/components/ui-tabela/tabela-renderizador.d.ts +1 -0
  35. package/dist/components/ui-tabela/tabela-selecao.d.ts +21 -6
  36. package/dist/components/ui-tabela/tipos.d.ts +6 -0
  37. package/dist/components/ui-tabela/ui-tabela.d.ts +56 -2
  38. package/dist/components/ui-tabela-propriedades/avaliador-expressao.d.ts +0 -5
  39. package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +17 -1
  40. package/dist/components/ui-tabela-propriedades/propriedades-flutuante.d.ts +2 -0
  41. package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +10 -1
  42. package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +3 -1
  43. package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +5 -1
  44. package/dist/components/ui-tooltip/ui-tooltip.d.ts +15 -0
  45. package/dist/core/alvo-digitavel.d.ts +1 -0
  46. package/dist/core/form-submissao.d.ts +16 -0
  47. package/dist/core/index.d.ts +1 -0
  48. package/dist/core/parts.d.ts +6 -0
  49. package/dist/core/rotulo.d.ts +6 -0
  50. package/dist/core/svg-seguro.d.ts +10 -0
  51. package/dist/core/ui-bus.d.ts +13 -2
  52. package/dist/core.cjs +1 -1
  53. package/dist/core.js +14 -12
  54. package/dist/custom-elements.json +32905 -0
  55. package/dist/data.cjs +1 -1
  56. package/dist/data.js +51 -46
  57. package/dist/feedback.cjs +1 -1
  58. package/dist/feedback.js +3 -3
  59. package/dist/form-submissao-C-SPRKgT.js +61 -0
  60. package/dist/form-submissao-DxKO5MHI.cjs +1 -0
  61. package/dist/forms.cjs +1 -1
  62. package/dist/forms.js +2 -2
  63. package/dist/gerencigeo-canvas/canvas_interacao.d.ts +18 -0
  64. package/dist/gerencigeo-canvas/feature_adapters.d.ts +35 -0
  65. package/dist/gerencigeo-canvas/feature_algoritmos.d.ts +45 -0
  66. package/dist/gerencigeo-canvas/feature_amostra.d.ts +4 -0
  67. package/dist/gerencigeo-canvas/feature_caixa.d.ts +19 -0
  68. package/dist/gerencigeo-canvas/feature_cluster.d.ts +61 -0
  69. package/dist/gerencigeo-canvas/feature_cursores.d.ts +17 -0
  70. package/dist/gerencigeo-canvas/feature_desenho.d.ts +53 -0
  71. package/dist/gerencigeo-canvas/feature_desenho_controle.d.ts +91 -0
  72. package/dist/gerencigeo-canvas/feature_edicao_ops.d.ts +19 -0
  73. package/dist/gerencigeo-canvas/feature_editor_vertices.d.ts +62 -0
  74. package/dist/gerencigeo-canvas/feature_formas.d.ts +7 -0
  75. package/dist/gerencigeo-canvas/feature_hud.d.ts +23 -0
  76. package/dist/gerencigeo-canvas/feature_indice.d.ts +36 -0
  77. package/dist/gerencigeo-canvas/feature_metricas.d.ts +16 -0
  78. package/dist/gerencigeo-canvas/feature_popup.d.ts +31 -0
  79. package/dist/gerencigeo-canvas/feature_selecao.d.ts +38 -0
  80. package/dist/gerencigeo-canvas/feature_simplificacao.d.ts +14 -0
  81. package/dist/gerencigeo-canvas/feature_snap.d.ts +25 -0
  82. package/dist/gerencigeo-canvas/feature_types.d.ts +86 -0
  83. package/dist/gerencigeo-canvas/feature_versoes.d.ts +19 -0
  84. package/dist/gerencigeo-canvas/index.d.ts +21 -0
  85. package/dist/gerencigeo-canvas/layer_hit_test.d.ts +30 -0
  86. package/dist/gerencigeo-canvas/layer_manager.d.ts +11 -3
  87. package/dist/gerencigeo-canvas/layer_pane_ops.d.ts +9 -0
  88. package/dist/gerencigeo-canvas/mapa_controller.d.ts +1 -0
  89. package/dist/gerencigeo-canvas/mapa_pontos_shapes.d.ts +24 -5
  90. package/dist/gerencigeo-canvas/renderers/feicoes_renderer.d.ts +89 -0
  91. package/dist/gerencigeo-canvas/renderers/vector_points_renderer.d.ts +1 -0
  92. package/dist/gerencigeo-canvas/renderers/vector_polygons_renderer.d.ts +2 -2
  93. package/dist/gerencigeo-canvas/types.d.ts +12 -0
  94. package/dist/gerencigeo-canvas/utils.d.ts +3 -1
  95. package/dist/index.cjs +1 -1
  96. package/dist/index.d.ts +2 -2
  97. package/dist/index.js +117 -112
  98. package/dist/leaflet-DcO7uRC-.cjs +1 -0
  99. package/dist/{leaflet-DkaFZYc5.js → leaflet-PPDKB6Dd.js} +37 -37
  100. package/dist/mapa.cjs +4 -4
  101. package/dist/mapa.js +2 -2
  102. package/dist/modal.cjs +1 -1
  103. package/dist/modal.js +1 -1
  104. package/dist/parts-CaoQiCfI.js +7 -0
  105. package/dist/parts-vQa2873h.cjs +1 -0
  106. package/dist/register.cjs +1 -1
  107. package/dist/register.js +12 -12
  108. package/dist/seletor-mapa-base.cjs +16 -16
  109. package/dist/seletor-mapa-base.js +111 -61
  110. package/dist/svg-seguro-BsbNQqpd.js +50 -0
  111. package/dist/svg-seguro-C76iLlAZ.cjs +1 -0
  112. package/dist/tabela.cjs +1 -1
  113. package/dist/tabela.js +41 -36
  114. package/dist/tipos-elementos.d.ts +1232 -0
  115. package/dist/tipos-react.d.ts +113 -0
  116. package/dist/tipos-vue.d.ts +1201 -0
  117. package/dist/tools.cjs +1 -1
  118. package/dist/tools.js +1 -1
  119. package/dist/ui-badge-BxT-sDmV.cjs +28 -0
  120. package/dist/ui-badge-C0eKBI8E.js +183 -0
  121. package/dist/ui-botao-OGJV6Vfk.js +165 -0
  122. package/dist/ui-botao-psS1juof.cjs +12 -0
  123. package/dist/ui-campo-texto-Cnn2UAkS.cjs +16 -0
  124. package/dist/{ui-campo-texto-B_JF6POq.js → ui-campo-texto-Uu2dJE_0.js} +81 -63
  125. package/dist/{ui-card-Bhm6k91e.cjs → ui-card-B86lJXTP.cjs} +7 -7
  126. package/dist/{ui-card-BJ8SmvVf.js → ui-card-C_o5_0cB.js} +14 -14
  127. package/dist/ui-kit.css +1 -1
  128. package/dist/ui-modal-CvGFGh1h.cjs +18 -0
  129. package/dist/ui-modal-DBOtSTbR.js +238 -0
  130. package/dist/{ui-paleta-ferramentas-Bpp4XBVg.js → ui-paleta-ferramentas-CEZYcN4J.js} +18 -27
  131. package/dist/{ui-paleta-ferramentas-B6dJ0O6K.cjs → ui-paleta-ferramentas-Dbj1kBS9.cjs} +6 -6
  132. package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
  133. package/dist/{ui-segmented-C8wuycjJ.js → ui-segmented-wUraId2e.js} +68 -67
  134. package/dist/ui-skeleton-DI4_9WOX.js +428 -0
  135. package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
  136. package/dist/{ui-switch-CO9MoS8x.js → ui-switch-BcOqOkiV.js} +92 -62
  137. package/dist/ui-switch-D7iPKDj-.cjs +53 -0
  138. package/dist/ui-tabela-propriedades-BBr5sqki.cjs +145 -0
  139. package/dist/ui-tabela-propriedades-Boy7I5yW.js +2412 -0
  140. package/dist/{ui-toast-CwUmiqyG.js → ui-toast-Bp_NlM5G.js} +51 -51
  141. package/dist/ui-toast-DGTZKne5.cjs +20 -0
  142. package/dist/zero-js-triggers-C_KrvFOQ.js +244 -0
  143. package/dist/zero-js-triggers-C_gtaojZ.cjs +1 -0
  144. package/package.json +27 -7
  145. package/dist/leaflet-Cw6tqYFh.cjs +0 -1
  146. package/dist/ui-badge-92yelKls.js +0 -183
  147. package/dist/ui-badge-B95jSECC.cjs +0 -28
  148. package/dist/ui-botao-BShEouvi.js +0 -124
  149. package/dist/ui-botao-DF1yuUUD.cjs +0 -12
  150. package/dist/ui-campo-texto-BCh5HyCM.cjs +0 -16
  151. package/dist/ui-modal-Bi4isGYh.cjs +0 -18
  152. package/dist/ui-modal-DV-pw2x1.js +0 -194
  153. package/dist/ui-segmented-NC5cBXLh.cjs +0 -19
  154. package/dist/ui-skeleton-B3xQyn0Z.js +0 -396
  155. package/dist/ui-skeleton-D42oQufF.cjs +0 -33
  156. package/dist/ui-switch-C6o4yZUF.cjs +0 -53
  157. package/dist/ui-tabela-propriedades-7yJ9g7ti.cjs +0 -145
  158. package/dist/ui-tabela-propriedades-D-XKNVwK.js +0 -2078
  159. package/dist/ui-toast-CQBqvUm3.cjs +0 -20
  160. package/dist/zero-js-triggers-DdESy0tk.js +0 -205
  161. package/dist/zero-js-triggers-QGD7FOTv.cjs +0 -1
@@ -1,9 +1,10 @@
1
1
  var g = Object.defineProperty;
2
- var x = (a, s, t) => s in a ? g(a, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[s] = t;
3
- var i = (a, s, t) => x(a, typeof s != "symbol" ? s + "" : s, t);
2
+ var x = (i, s, t) => s in i ? g(i, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[s] = t;
3
+ var a = (i, s, t) => x(i, typeof s != "symbol" ? s + "" : s, t);
4
4
  import { S as f, d as m } from "./ssr-safe-5cWfJP-s.js";
5
5
  import { g as v, v as _, a as E, o as y, c as A } from "./form-validacao-BIOXxt-1.js";
6
- const w = ':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}}', S = [
6
+ import { a as w } from "./form-submissao-C-SPRKgT.js";
7
+ const 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 color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent);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 color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 18%,transparent)!important}.ui-campo-texto__wrapper--disabled{opacity:.5;cursor:not-allowed;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.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}}', k = [
7
8
  "label",
8
9
  "placeholder",
9
10
  "value",
@@ -34,46 +35,51 @@ const w = ':host{display:flex;flex-direction:column;gap:4px;width:100%;box-sizin
34
35
  "densidade",
35
36
  "aria-label"
36
37
  ];
37
- function I() {
38
+ function C() {
38
39
  return `
39
- <style>${w}</style>
40
+ <style>${S}</style>
40
41
  <div class="ui-campo-texto__container">
41
- <label class="ui-campo-texto__label" style="display: none;"></label>
42
- <div class="ui-campo-texto__wrapper">
43
- <span class="ui-campo-texto__icone ui-campo-texto__icone--esquerda">
42
+ <label class="ui-campo-texto__label" part="rotulo" style="display: none;"></label>
43
+ <div class="ui-campo-texto__wrapper" part="campo">
44
+ <span class="ui-campo-texto__icone ui-campo-texto__icone--esquerda" part="icone icone-esquerda">
44
45
  <slot name="icone-esquerda"></slot>
45
46
  </span>
46
- <input class="ui-campo-texto__input" type="text" />
47
- <span class="ui-campo-texto__icone ui-campo-texto__icone--direita">
47
+ <input class="ui-campo-texto__input" part="input" type="text" />
48
+ <span class="ui-campo-texto__icone ui-campo-texto__icone--direita" part="icone icone-direita">
48
49
  <slot name="icone-direita"></slot>
49
50
  </span>
50
51
  </div>
51
52
  </div>
52
- <div class="ui-campo-texto__helper" style="display: none;"></div>
53
+ <div class="ui-campo-texto__helper" part="ajuda" style="display: none;"></div>
53
54
  `;
54
55
  }
55
- function V(a) {
56
- const { labelElement: s, inputElement: t, labelText: e, placeholderText: n, isFlutuante: o, estaFocado: r, obrigatorio: u } = a, l = t.value.trim() !== "";
56
+ function I(i, s, t, e) {
57
+ if (i.textContent = s, !t) return;
58
+ const n = document.createElement("span");
59
+ n.className = e, n.setAttribute("aria-hidden", "true"), n.textContent = "*", i.append(" ", n);
60
+ }
61
+ function V(i) {
62
+ const { labelElement: s, inputElement: t, labelText: e, placeholderText: n, isFlutuante: r, estaFocado: o, obrigatorio: u } = i, l = t.value.trim() !== "";
57
63
  let h = !1;
58
64
  try {
59
65
  h = t.matches(":-webkit-autofill");
60
66
  } catch {
61
67
  h = !1;
62
68
  }
63
- 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;
69
+ e ? (I(s, e, !!u, "ui-campo-texto__asterisco"), s.style.display = "flex", r && (o || l || h) ? s.classList.add("ui-campo-texto__label--ativa") : s.classList.remove("ui-campo-texto__label--ativa")) : s.style.display = "none", r && !o && !l && !h ? t.placeholder = "" : t.placeholder = n;
64
70
  }
65
- function k(a, s, t) {
66
- 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"));
71
+ function L(i, s, t) {
72
+ s ? (i.classList.add("ui-campo-texto__icone--clicavel"), i.setAttribute("role", "button"), i.setAttribute("tabindex", "0"), i.setAttribute("aria-label", t ? "Ocultar senha" : "Exibir senha")) : (i.classList.remove("ui-campo-texto__icone--clicavel"), i.removeAttribute("role"), i.removeAttribute("tabindex"), i.removeAttribute("aria-label"));
67
73
  }
68
- function C(a, s, t, e, n, o) {
69
- 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";
74
+ function q(i, s, t, e, n, r) {
75
+ e ? (i.classList.add("ui-campo-texto__wrapper--erro"), s.setAttribute("aria-invalid", "true")) : (i.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") : r ? (t.textContent = r, t.className = "ui-campo-texto__helper", t.style.display = "block") : t.style.display = "none";
70
76
  }
71
77
  class d extends f {
72
78
  constructor() {
73
79
  super();
74
- i(this, "internals");
75
- i(this, "_formDisabled", !1);
76
- i(this, "_customErrorMessage", "");
80
+ a(this, "internals");
81
+ a(this, "_formDisabled", !1);
82
+ a(this, "_customErrorMessage", "");
77
83
  this.internals = typeof this.attachInternals == "function" ? this.attachInternals() : {};
78
84
  }
79
85
  // === Ciclo de Vida Form-Associated Custom Elements ===
@@ -121,40 +127,51 @@ class d extends f {
121
127
  this._customErrorMessage = t || "", this.atualizarValidade();
122
128
  }
123
129
  }
124
- i(d, "formAssociated", !0);
130
+ a(d, "formAssociated", !0);
125
131
  class b extends d {
126
132
  constructor() {
127
133
  super();
128
- i(this, "labelElement");
129
- i(this, "wrapperElement");
130
- i(this, "inputElement");
131
- i(this, "helperElement");
132
- i(this, "rightIconContainer");
133
- i(this, "leftSlotElement");
134
- i(this, "_senhaVisivel", !1);
135
- i(this, "_checkTimer", null);
136
- i(this, "_focado", !1);
137
- i(this, "_inputId");
138
- i(this, "_defaultValue", "");
139
- i(this, "handleSlotChange", () => {
134
+ a(this, "labelElement");
135
+ a(this, "wrapperElement");
136
+ a(this, "inputElement");
137
+ a(this, "helperElement");
138
+ a(this, "rightIconContainer");
139
+ a(this, "leftSlotElement");
140
+ a(this, "_senhaVisivel", !1);
141
+ a(this, "_checkTimer", null);
142
+ a(this, "_focado", !1);
143
+ a(this, "_inputId");
144
+ a(this, "_defaultValue", "");
145
+ a(this, "handleSlotChange", () => {
140
146
  this.syncState();
141
147
  });
142
- i(this, "handleHostClick", (t) => {
148
+ a(this, "handleHostClick", (t) => {
143
149
  A(this, t) && !this.disabled && this.inputElement.focus();
144
150
  });
145
- i(this, "handleRightIconClick", (t) => {
151
+ a(this, "handleRightIconClick", (t) => {
146
152
  (this.getAttribute("tipo") === "password" || this.hasAttribute("alternar-senha")) && (t.stopPropagation(), this.alternarVisibilidadeSenha());
147
153
  });
148
- i(this, "handleRightIconKeyDown", (t) => {
154
+ a(this, "handleRightIconKeyDown", (t) => {
149
155
  (this.getAttribute("tipo") === "password" || this.hasAttribute("alternar-senha")) && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), this.alternarVisibilidadeSenha());
150
156
  });
151
- i(this, "handleFocus", () => {
157
+ a(this, "handleFocus", () => {
152
158
  this._focado = !0, this.wrapperElement.classList.add("ui-campo-texto__wrapper--foco"), this.syncState();
153
159
  });
154
- i(this, "handleBlur", () => {
160
+ a(this, "handleBlur", () => {
155
161
  this._focado = !1, this.wrapperElement.classList.remove("ui-campo-texto__wrapper--foco"), this.syncState();
156
162
  });
157
- i(this, "handleInput", (t) => {
163
+ /**
164
+ * Enter submete o formulário como num <input> nativo. Aguarda um tick para que
165
+ * ouvintes do consumidor possam cancelar com `preventDefault()` no keydown.
166
+ */
167
+ a(this, "handleKeyDown", (t) => {
168
+ if (t.key !== "Enter" || t.isComposing || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey) return;
169
+ const e = this.form;
170
+ e && setTimeout(() => {
171
+ !t.defaultPrevented && this.isConnected && w(e);
172
+ });
173
+ });
174
+ a(this, "handleInput", (t) => {
158
175
  t.stopPropagation();
159
176
  const e = t.target.value;
160
177
  this.internals.setFormValue(e), this.syncState(), this.dispatchEvent(
@@ -170,7 +187,7 @@ class b extends d {
170
187
  })
171
188
  );
172
189
  });
173
- i(this, "handleChange", (t) => {
190
+ a(this, "handleChange", (t) => {
174
191
  t.stopPropagation();
175
192
  const e = t.target.value;
176
193
  this.internals.setFormValue(e), this.syncState(), this.dispatchEvent(
@@ -187,10 +204,10 @@ class b extends d {
187
204
  );
188
205
  });
189
206
  const t = this.attachShadow({ mode: "open", delegatesFocus: !0 });
190
- t.innerHTML = I(), 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 = v("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`);
207
+ t.innerHTML = C(), 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 = v("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`);
191
208
  }
192
209
  static get observedAttributes() {
193
- return S;
210
+ return k;
194
211
  }
195
212
  focus(t) {
196
213
  this.inputElement.focus(t);
@@ -199,10 +216,10 @@ class b extends d {
199
216
  this.inputElement.blur();
200
217
  }
201
218
  connectedCallback() {
202
- 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);
219
+ 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.inputElement.addEventListener("keydown", this.handleKeyDown), 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);
203
220
  }
204
221
  disconnectedCallback() {
205
- 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);
222
+ 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.inputElement.removeEventListener("keydown", this.handleKeyDown), 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);
206
223
  }
207
224
  attributeChangedCallback(t, e, n) {
208
225
  t === "value" && n !== this.inputElement.value && !this._focado && (this.inputElement.value = n || ""), this.syncState();
@@ -263,8 +280,8 @@ class b extends d {
263
280
  }
264
281
  atualizarValidade() {
265
282
  var c, p;
266
- 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 = !!((p = (c = this.inputElement) == null ? void 0 : c.validity) != null && p.badInput), h = _({
267
- val: r,
283
+ const t = this.getAttribute("minlength") ?? this.getAttribute("min-length"), e = this.getAttribute("maxlength") ?? this.getAttribute("max-length"), n = this.getAttribute("min"), r = this.getAttribute("max"), o = this.inputElement ? this.inputElement.value : "", u = this.getAttribute("value") || o, l = !!((p = (c = this.inputElement) == null ? void 0 : c.validity) != null && p.badInput), h = _({
284
+ val: o,
268
285
  rawVal: u,
269
286
  badInput: l,
270
287
  disabled: this.disabled,
@@ -273,7 +290,7 @@ class b extends d {
273
290
  minlength: t !== null ? parseInt(t, 10) : null,
274
291
  maxlength: e !== null ? parseInt(e, 10) : null,
275
292
  min: n !== null ? parseFloat(n) : null,
276
- max: o !== null ? parseFloat(o) : null,
293
+ max: r !== null ? parseFloat(r) : null,
277
294
  step: this.getAttribute("step"),
278
295
  pattern: this.getAttribute("pattern"),
279
296
  customError: this._customErrorMessage,
@@ -286,9 +303,9 @@ class b extends d {
286
303
  if (!(this.getAttribute("tipo") === "password" || this._senhaVisivel)) return;
287
304
  this._senhaVisivel = !this._senhaVisivel, this.inputElement.type = this._senhaVisivel ? "text" : "password";
288
305
  const e = (n = this.shadowRoot) == null ? void 0 : n.querySelector('slot[name="icone-direita"]');
289
- e && e.assignedElements().forEach((r) => {
306
+ e && e.assignedElements().forEach((o) => {
290
307
  var u, l;
291
- (((u = r.textContent) == null ? void 0 : u.trim()) === "👁️" || ((l = r.textContent) == null ? void 0 : l.trim()) === "🙈") && (r.textContent = this._senhaVisivel ? "🙈" : "👁️");
308
+ (((u = o.textContent) == null ? void 0 : u.trim()) === "👁️" || ((l = o.textContent) == null ? void 0 : l.trim()) === "🙈") && (o.textContent = this._senhaVisivel ? "🙈" : "👁️");
292
309
  }), this.dispatchEvent(
293
310
  new CustomEvent("ui-toggle-senha", {
294
311
  detail: { visivel: this._senhaVisivel },
@@ -316,18 +333,18 @@ class b extends d {
316
333
  } catch {
317
334
  this.inputElement.type = "text";
318
335
  }
319
- const o = this.getAttribute("minlength") ?? this.getAttribute("min-length");
320
- o !== null ? this.inputElement.minLength = parseInt(o, 10) : this.inputElement.removeAttribute("minlength");
321
- const r = this.getAttribute("maxlength") ?? this.getAttribute("max-length");
322
- r !== null ? this.inputElement.maxLength = parseInt(r, 10) : this.inputElement.removeAttribute("maxlength");
336
+ const r = this.getAttribute("minlength") ?? this.getAttribute("min-length");
337
+ r !== null ? this.inputElement.minLength = parseInt(r, 10) : this.inputElement.removeAttribute("minlength");
338
+ const o = this.getAttribute("maxlength") ?? this.getAttribute("max-length");
339
+ o !== null ? this.inputElement.maxLength = parseInt(o, 10) : this.inputElement.removeAttribute("maxlength");
323
340
  const u = this.getAttribute("pattern");
324
341
  u !== null ? this.inputElement.pattern = u : this.inputElement.removeAttribute("pattern"), this.internals.setFormValue(this.inputElement.value);
325
342
  const l = this.hasAttribute("disabled") || this._formDisabled, h = this.hasAttribute("readonly");
326
343
  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");
327
344
  const c = n === "password" || this.hasAttribute("alternar-senha");
328
- k(this.rightIconContainer, c, this._senhaVisivel);
345
+ L(this.rightIconContainer, c, this._senhaVisivel);
329
346
  const p = this.hasAttribute("erro") || this.hasAttribute("mensagem-erro");
330
- C(
347
+ q(
331
348
  this.wrapperElement,
332
349
  this.inputElement,
333
350
  this.helperElement,
@@ -345,17 +362,18 @@ class b extends d {
345
362
  t ? this.inputElement.setAttribute("aria-label", t) : this.inputElement.removeAttribute("aria-label");
346
363
  }
347
364
  }
348
- class L extends b {
365
+ class z extends b {
349
366
  }
350
367
  m("ui-campo-texto", b);
351
- m("ui-input", L);
368
+ m("ui-input", z);
352
369
  export {
353
- S as A,
370
+ k as A,
354
371
  d as F,
355
372
  b as U,
356
- L as a,
357
- k as b,
358
- I as c,
373
+ z as a,
374
+ L as b,
375
+ C as c,
359
376
  V as d,
360
- C as s
377
+ I as r,
378
+ q as s
361
379
  };
@@ -1,20 +1,20 @@
1
- "use strict";var w=Object.defineProperty;var E=(i,t,e)=>t in i?w(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var s=(i,t,e)=>E(i,typeof t!="symbol"?t+"":t,e);const k=require("./listener-bag-D5omxZ9h.cjs"),f=require("./ssr-safe-CiHD1adl.cjs"),A=':host{display:block;width:100%;box-sizing:border-box}:host(.h-full),:host([style*="height: 100%"]){height:100%}.ui-card{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);overflow:hidden;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-card--plano{background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:none}.ui-card--elevado{background-color:var(--ui-cor-fundo-elevado, #1e1e24);box-shadow:0 8px 24px #0006;border-color:#ffffff14}.ui-card--destaque{border-color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:0 0 0 1px #00e08a40}.ui-card--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none}.ui-card--clicavel:hover{transform:translateY(-3px);border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 10px 30px #00000080,0 0 15px #00e08a26}.ui-card--clicavel:active{transform:translateY(-1px)}.ui-card--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-card__media{width:100%;overflow:hidden;display:block;line-height:0}::slotted([slot="midia"]),::slotted([slot="media"]){width:100%;height:auto;display:block;object-fit:cover}.ui-card__header{padding:14px 16px 8px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card__body{padding:12px 16px;flex:1;box-sizing:border-box}.ui-card__footer{padding:10px 16px 14px;border-top:1px solid rgba(255,255,255,.06);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card--compacto .ui-card__header{padding:10px 12px 6px}.ui-card--compacto .ui-card__body{padding:8px 12px}.ui-card--compacto .ui-card__footer{padding:8px 12px 10px}';class x extends f.SafeHTMLElement{constructor(){super();s(this,"cardElement");s(this,"listeners",new k.ListenerBag);s(this,"handleSlotChange",()=>{this.syncState()});s(this,"handleClick",e=>{this.disabled||e&&e.target&&e.target instanceof HTMLElement&&e.target.closest('button, a, input, select, textarea, ui-botao, ui-switch, ui-checkbox, ui-radio, [role="button"]')||this.clicavel&&(this.dispatchEvent(new CustomEvent("ui-click",{detail:{id:this.id||"sem-id"},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-clique",{detail:{id:this.id||"sem-id"},bubbles:!0,composed:!0})))});s(this,"handleKeyDown",e=>{!this.clicavel||this.disabled||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleClick())});const e=this.attachShadow({mode:"open"});e.innerHTML=`
1
+ "use strict";var w=Object.defineProperty;var E=(i,t,e)=>t in i?w(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var r=(i,t,e)=>E(i,typeof t!="symbol"?t+"":t,e);const k=require("./listener-bag-D5omxZ9h.cjs"),x=require("./ssr-safe-CiHD1adl.cjs"),A=':host{display:block;width:100%;box-sizing:border-box}:host(.h-full),:host([style*="height: 100%"]){height:100%}.ui-card{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);overflow:hidden;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-card--plano{background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:none}.ui-card--elevado{background-color:var(--ui-cor-fundo-elevado, #1e1e24);box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .4));border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-card--destaque{border-color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-card--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none}.ui-card--clicavel:hover{transform:translateY(-3px);border-color:var(--ui-cor-primaria, #00E08A);box-shadow:var(--ui-sombra-lg, 0 10px 30px rgba(0, 0, 0, .5)),0 0 15px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-card--clicavel:active{transform:translateY(-1px)}.ui-card--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-card__media{width:100%;overflow:hidden;display:block;line-height:0}::slotted([slot="midia"]),::slotted([slot="media"]){width:100%;height:auto;display:block;object-fit:cover}.ui-card__header{padding:14px 16px 8px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card__body{padding:12px 16px;flex:1;box-sizing:border-box}.ui-card__footer{padding:10px 16px 14px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card--compacto .ui-card__header{padding:10px 12px 6px}.ui-card--compacto .ui-card__body{padding:8px 12px}.ui-card--compacto .ui-card__footer{padding:8px 12px 10px}';class f extends x.SafeHTMLElement{constructor(){super();r(this,"cardElement");r(this,"listeners",new k.ListenerBag);r(this,"handleSlotChange",()=>{this.syncState()});r(this,"handleClick",e=>{this.disabled||e&&e.target&&e.target instanceof HTMLElement&&e.target.closest('button, a, input, select, textarea, ui-botao, ui-switch, ui-checkbox, ui-radio, [role="button"]')||this.clicavel&&(this.dispatchEvent(new CustomEvent("ui-click",{detail:{id:this.id||"sem-id"},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-clique",{detail:{id:this.id||"sem-id"},bubbles:!0,composed:!0})))});r(this,"handleKeyDown",e=>{!this.clicavel||this.disabled||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleClick())});const e=this.attachShadow({mode:"open"});e.innerHTML=`
2
2
  <style>${A}</style>
3
- <div class="ui-card">
4
- <div class="ui-card__media">
3
+ <div class="ui-card" part="base">
4
+ <div class="ui-card__media" part="midia">
5
5
  <slot name="midia"></slot>
6
6
  <slot name="media"></slot>
7
7
  </div>
8
- <div class="ui-card__header">
8
+ <div class="ui-card__header" part="cabecalho">
9
9
  <slot name="cabecalho"></slot>
10
10
  <slot name="header"></slot>
11
11
  </div>
12
- <div class="ui-card__body">
12
+ <div class="ui-card__body" part="corpo">
13
13
  <slot></slot>
14
14
  </div>
15
- <div class="ui-card__footer">
15
+ <div class="ui-card__footer" part="rodape">
16
16
  <slot name="rodape"></slot>
17
17
  <slot name="footer"></slot>
18
18
  </div>
19
19
  </div>
20
- `,this.cardElement=e.querySelector(".ui-card")}static get observedAttributes(){return["elevacao","elevation","variante","variant","clicavel","clickable","compacto","compact","disabled"]}connectedCallback(){var a;this.listeners.cleanup(),this.listeners.add(this.cardElement,"click",this.handleClick),this.listeners.add(this.cardElement,"keydown",this.handleKeyDown);const e=(a=this.shadowRoot)==null?void 0:a.querySelectorAll("slot");e==null||e.forEach(r=>this.listeners.add(r,"slotchange",this.handleSlotChange)),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,a,r){this.syncState()}get clicavel(){return this.hasAttribute("clicavel")||this.hasAttribute("clickable")}set clicavel(e){e?this.setAttribute("clicavel",""):(this.removeAttribute("clicavel"),this.removeAttribute("clickable")),this.syncState()}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.syncState()}syncState(){var h,b,p;const e=this.getAttribute("elevacao")||this.getAttribute("elevation")||"plano",a=this.getAttribute("variante")||this.getAttribute("variant"),r=this.clicavel,g=this.hasAttribute("compacto")||this.hasAttribute("compact"),y=this.disabled;this.cardElement.className="ui-card",this.cardElement.classList.add(`ui-card--${e}`),a&&this.cardElement.classList.add(`ui-card--${a}`),r?(this.cardElement.classList.add("ui-card--clicavel"),this.cardElement.setAttribute("tabindex","0")):this.cardElement.removeAttribute("tabindex"),g&&this.cardElement.classList.add("ui-card--compacto"),y&&this.cardElement.classList.add("ui-card--disabled");const l=(h=this.shadowRoot)==null?void 0:h.querySelector(".ui-card__header"),n=(b=this.shadowRoot)==null?void 0:b.querySelector(".ui-card__footer"),u=(p=this.shadowRoot)==null?void 0:p.querySelector(".ui-card__media"),c=m=>{var v;const _=m.map(o=>`slot[name="${o}"]`).join(", ");return Array.from(((v=this.shadowRoot)==null?void 0:v.querySelectorAll(_))||[]).some(o=>o.assignedNodes({flatten:!0}).some(d=>d.nodeType===Node.ELEMENT_NODE||d.textContent&&d.textContent.trim()!==""))||m.some(o=>this.querySelector(`[slot="${o}"]`)!==null)};u&&(u.style.display=c(["midia","media"])?"block":"none"),l&&(l.style.display=c(["cabecalho","header"])?"flex":"none"),n&&(n.style.display=c(["rodape","footer"])?"flex":"none")}}f.definirCustomElement("ui-card",x);exports.UICard=x;
20
+ `,this.cardElement=e.querySelector(".ui-card")}static get observedAttributes(){return["elevacao","elevation","variante","variant","clicavel","clickable","compacto","compact","disabled"]}connectedCallback(){var a;this.listeners.cleanup(),this.listeners.add(this.cardElement,"click",this.handleClick),this.listeners.add(this.cardElement,"keydown",this.handleKeyDown);const e=(a=this.shadowRoot)==null?void 0:a.querySelectorAll("slot");e==null||e.forEach(s=>this.listeners.add(s,"slotchange",this.handleSlotChange)),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,a,s){this.syncState()}get clicavel(){return this.hasAttribute("clicavel")||this.hasAttribute("clickable")}set clicavel(e){e?this.setAttribute("clicavel",""):(this.removeAttribute("clicavel"),this.removeAttribute("clickable")),this.syncState()}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.syncState()}syncState(){var h,b,p;const e=this.getAttribute("elevacao")||this.getAttribute("elevation")||"plano",a=this.getAttribute("variante")||this.getAttribute("variant"),s=this.clicavel,g=this.hasAttribute("compacto")||this.hasAttribute("compact"),y=this.disabled;this.cardElement.className="ui-card",this.cardElement.classList.add(`ui-card--${e}`),a&&this.cardElement.classList.add(`ui-card--${a}`),s?(this.cardElement.classList.add("ui-card--clicavel"),this.cardElement.setAttribute("tabindex","0")):this.cardElement.removeAttribute("tabindex"),g&&this.cardElement.classList.add("ui-card--compacto"),y&&this.cardElement.classList.add("ui-card--disabled");const l=(h=this.shadowRoot)==null?void 0:h.querySelector(".ui-card__header"),n=(b=this.shadowRoot)==null?void 0:b.querySelector(".ui-card__footer"),u=(p=this.shadowRoot)==null?void 0:p.querySelector(".ui-card__media"),c=m=>{var v;const _=m.map(o=>`slot[name="${o}"]`).join(", ");return Array.from(((v=this.shadowRoot)==null?void 0:v.querySelectorAll(_))||[]).some(o=>o.assignedNodes({flatten:!0}).some(d=>d.nodeType===Node.ELEMENT_NODE||d.textContent&&d.textContent.trim()!==""))||m.some(o=>this.querySelector(`[slot="${o}"]`)!==null)};u&&(u.style.display=c(["midia","media"])?"block":"none"),l&&(l.style.display=c(["cabecalho","header"])?"flex":"none"),n&&(n.style.display=c(["rodape","footer"])?"flex":"none")}}x.definirCustomElement("ui-card",f);exports.UICard=f;
@@ -3,7 +3,7 @@ var _ = (i, t, e) => t in i ? y(i, t, { enumerable: !0, configurable: !0, writab
3
3
  var o = (i, t, e) => _(i, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { L as w } from "./listener-bag-DQgv7OON.js";
5
5
  import { d as E, S as k } from "./ssr-safe-5cWfJP-s.js";
6
- const A = ':host{display:block;width:100%;box-sizing:border-box}:host(.h-full),:host([style*="height: 100%"]){height:100%}.ui-card{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);overflow:hidden;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-card--plano{background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:none}.ui-card--elevado{background-color:var(--ui-cor-fundo-elevado, #1e1e24);box-shadow:0 8px 24px #0006;border-color:#ffffff14}.ui-card--destaque{border-color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:0 0 0 1px #00e08a40}.ui-card--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none}.ui-card--clicavel:hover{transform:translateY(-3px);border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 10px 30px #00000080,0 0 15px #00e08a26}.ui-card--clicavel:active{transform:translateY(-1px)}.ui-card--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-card__media{width:100%;overflow:hidden;display:block;line-height:0}::slotted([slot="midia"]),::slotted([slot="media"]){width:100%;height:auto;display:block;object-fit:cover}.ui-card__header{padding:14px 16px 8px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card__body{padding:12px 16px;flex:1;box-sizing:border-box}.ui-card__footer{padding:10px 16px 14px;border-top:1px solid rgba(255,255,255,.06);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card--compacto .ui-card__header{padding:10px 12px 6px}.ui-card--compacto .ui-card__body{padding:8px 12px}.ui-card--compacto .ui-card__footer{padding:8px 12px 10px}';
6
+ const A = ':host{display:block;width:100%;box-sizing:border-box}:host(.h-full),:host([style*="height: 100%"]){height:100%}.ui-card{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);overflow:hidden;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-card--plano{background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:none}.ui-card--elevado{background-color:var(--ui-cor-fundo-elevado, #1e1e24);box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .4));border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-card--destaque{border-color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-card--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none}.ui-card--clicavel:hover{transform:translateY(-3px);border-color:var(--ui-cor-primaria, #00E08A);box-shadow:var(--ui-sombra-lg, 0 10px 30px rgba(0, 0, 0, .5)),0 0 15px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-card--clicavel:active{transform:translateY(-1px)}.ui-card--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-card__media{width:100%;overflow:hidden;display:block;line-height:0}::slotted([slot="midia"]),::slotted([slot="media"]){width:100%;height:auto;display:block;object-fit:cover}.ui-card__header{padding:14px 16px 8px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card__body{padding:12px 16px;flex:1;box-sizing:border-box}.ui-card__footer{padding:10px 16px 14px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card--compacto .ui-card__header{padding:10px 12px 6px}.ui-card--compacto .ui-card__body{padding:8px 12px}.ui-card--compacto .ui-card__footer{padding:8px 12px 10px}';
7
7
  class S extends k {
8
8
  constructor() {
9
9
  super();
@@ -37,19 +37,19 @@ class S extends k {
37
37
  const e = this.attachShadow({ mode: "open" });
38
38
  e.innerHTML = `
39
39
  <style>${A}</style>
40
- <div class="ui-card">
41
- <div class="ui-card__media">
40
+ <div class="ui-card" part="base">
41
+ <div class="ui-card__media" part="midia">
42
42
  <slot name="midia"></slot>
43
43
  <slot name="media"></slot>
44
44
  </div>
45
- <div class="ui-card__header">
45
+ <div class="ui-card__header" part="cabecalho">
46
46
  <slot name="cabecalho"></slot>
47
47
  <slot name="header"></slot>
48
48
  </div>
49
- <div class="ui-card__body">
49
+ <div class="ui-card__body" part="corpo">
50
50
  <slot></slot>
51
51
  </div>
52
- <div class="ui-card__footer">
52
+ <div class="ui-card__footer" part="rodape">
53
53
  <slot name="rodape"></slot>
54
54
  <slot name="footer"></slot>
55
55
  </div>
@@ -73,12 +73,12 @@ class S extends k {
73
73
  var a;
74
74
  this.listeners.cleanup(), this.listeners.add(this.cardElement, "click", this.handleClick), this.listeners.add(this.cardElement, "keydown", this.handleKeyDown);
75
75
  const e = (a = this.shadowRoot) == null ? void 0 : a.querySelectorAll("slot");
76
- e == null || e.forEach((r) => this.listeners.add(r, "slotchange", this.handleSlotChange)), this.syncState();
76
+ e == null || e.forEach((s) => this.listeners.add(s, "slotchange", this.handleSlotChange)), this.syncState();
77
77
  }
78
78
  disconnectedCallback() {
79
79
  this.listeners.cleanup();
80
80
  }
81
- attributeChangedCallback(e, a, r) {
81
+ attributeChangedCallback(e, a, s) {
82
82
  this.syncState();
83
83
  }
84
84
  get clicavel() {
@@ -95,14 +95,14 @@ class S extends k {
95
95
  }
96
96
  syncState() {
97
97
  var h, b, p;
98
- const e = this.getAttribute("elevacao") || this.getAttribute("elevation") || "plano", a = this.getAttribute("variante") || this.getAttribute("variant"), r = this.clicavel, f = this.hasAttribute("compacto") || this.hasAttribute("compact"), x = this.disabled;
99
- this.cardElement.className = "ui-card", this.cardElement.classList.add(`ui-card--${e}`), a && this.cardElement.classList.add(`ui-card--${a}`), r ? (this.cardElement.classList.add("ui-card--clicavel"), this.cardElement.setAttribute("tabindex", "0")) : this.cardElement.removeAttribute("tabindex"), f && this.cardElement.classList.add("ui-card--compacto"), x && this.cardElement.classList.add("ui-card--disabled");
100
- const l = (h = this.shadowRoot) == null ? void 0 : h.querySelector(".ui-card__header"), n = (b = this.shadowRoot) == null ? void 0 : b.querySelector(".ui-card__footer"), u = (p = this.shadowRoot) == null ? void 0 : p.querySelector(".ui-card__media"), d = (m) => {
98
+ const e = this.getAttribute("elevacao") || this.getAttribute("elevation") || "plano", a = this.getAttribute("variante") || this.getAttribute("variant"), s = this.clicavel, x = this.hasAttribute("compacto") || this.hasAttribute("compact"), f = this.disabled;
99
+ this.cardElement.className = "ui-card", this.cardElement.classList.add(`ui-card--${e}`), a && this.cardElement.classList.add(`ui-card--${a}`), s ? (this.cardElement.classList.add("ui-card--clicavel"), this.cardElement.setAttribute("tabindex", "0")) : this.cardElement.removeAttribute("tabindex"), x && this.cardElement.classList.add("ui-card--compacto"), f && this.cardElement.classList.add("ui-card--disabled");
100
+ const l = (h = this.shadowRoot) == null ? void 0 : h.querySelector(".ui-card__header"), n = (b = this.shadowRoot) == null ? void 0 : b.querySelector(".ui-card__footer"), u = (p = this.shadowRoot) == null ? void 0 : p.querySelector(".ui-card__media"), c = (m) => {
101
101
  var v;
102
- const g = m.map((s) => `slot[name="${s}"]`).join(", ");
103
- return Array.from(((v = this.shadowRoot) == null ? void 0 : v.querySelectorAll(g)) || []).some((s) => s.assignedNodes({ flatten: !0 }).some((c) => c.nodeType === Node.ELEMENT_NODE || c.textContent && c.textContent.trim() !== "")) || m.some((s) => this.querySelector(`[slot="${s}"]`) !== null);
102
+ const g = m.map((r) => `slot[name="${r}"]`).join(", ");
103
+ return Array.from(((v = this.shadowRoot) == null ? void 0 : v.querySelectorAll(g)) || []).some((r) => r.assignedNodes({ flatten: !0 }).some((d) => d.nodeType === Node.ELEMENT_NODE || d.textContent && d.textContent.trim() !== "")) || m.some((r) => this.querySelector(`[slot="${r}"]`) !== null);
104
104
  };
105
- u && (u.style.display = d(["midia", "media"]) ? "block" : "none"), l && (l.style.display = d(["cabecalho", "header"]) ? "flex" : "none"), n && (n.style.display = d(["rodape", "footer"]) ? "flex" : "none");
105
+ u && (u.style.display = c(["midia", "media"]) ? "block" : "none"), l && (l.style.display = c(["cabecalho", "header"]) ? "flex" : "none"), n && (n.style.display = c(["rodape", "footer"]) ? "flex" : "none");
106
106
  }
107
107
  }
108
108
  E("ui-card", S);
package/dist/ui-kit.css CHANGED
@@ -1 +1 @@
1
- :root,:root[data-tema=escuro],:root.dark,[data-tema=escuro]{color-scheme:dark;--ui-cor-primaria: #00E08A;--ui-cor-texto-sobre-primaria: #000000;--ui-cor-destaque: #00E08A;--ui-cor-fundo: #0b0b0d;--ui-cor-superficie: #141417;--ui-cor-fundo-elevado: #1a1a1e;--ui-cor-fundo-card: #18181c;--ui-cor-fundo-menu: #18181c;--ui-cor-hover-menu: rgba(255, 255, 255, .08);--ui-cor-texto: #e1e1e6;--ui-cor-texto-secundario: #888899;--ui-cor-texto-erro: #ff5555;--ui-cor-texto-sucesso: #00E08A;--ui-cor-texto-alerta: #ffb86c;--ui-cor-botao-secundario-fundo: #1e1e24;--ui-cor-botao-secundario-hover: #2a2a34;--ui-cor-botao-destrutivo-fundo: #ff4444;--ui-cor-botao-destrutivo-hover: #e03333;--ui-cor-botao-destrutivo-texto: #ffffff;--ui-cor-borda: rgba(255, 255, 255, .12)}:root[data-tema=claro],:root.light,[data-tema=claro],[data-theme=light]{color-scheme:light;--ui-cor-primaria: #00B368;--ui-cor-texto-sobre-primaria: #ffffff;--ui-cor-destaque: #00B368;--ui-cor-fundo: #f8f9fa;--ui-cor-superficie: #ffffff;--ui-cor-fundo-elevado: #f1f3f5;--ui-cor-fundo-card: #ffffff;--ui-cor-fundo-menu: #ffffff;--ui-cor-hover-menu: rgba(0, 0, 0, .05);--ui-cor-texto: #1a1a1e;--ui-cor-texto-secundario: #6c757d;--ui-cor-texto-erro: #e03131;--ui-cor-texto-sucesso: #00B368;--ui-cor-texto-alerta: #f59f00;--ui-cor-botao-secundario-fundo: #e9ecef;--ui-cor-botao-secundario-hover: #dee2e6;--ui-cor-botao-destrutivo-fundo: #e03131;--ui-cor-botao-destrutivo-hover: #c92a2a;--ui-cor-botao-destrutivo-texto: #ffffff;--ui-cor-borda: rgba(0, 0, 0, .12)}:root{--ui-raio-borda: 6px;--ui-espaco-xs: 4px;--ui-espaco-sm: 8px;--ui-espaco-md: 16px;--ui-espaco-lg: 24px;--ui-touch-target-min: 44px;--ui-altura-minima: 15px;--ui-campo-altura: var(--ui-altura-minima, 15px)}:root{--ui-fonte-base: "Inter", system-ui, -apple-system, sans-serif;--ui-fonte-codigo: "Fira Code", "Consolas", monospace;--ui-tamanho-h1: clamp(24px, 4vw, 36px);--ui-tamanho-h2: clamp(20px, 3vw, 28px);--ui-tamanho-h3: clamp(18px, 2.4vw, 24px);--ui-tamanho-h4: clamp(16px, 2vw, 20px);--ui-tamanho-h5: clamp(14px, 1.6vw, 18px);--ui-tamanho-h6: clamp(13px, 1.2vw, 16px);--ui-tamanho-corpo: 14px;--ui-tamanho-corpo-sm: 13px;--ui-tamanho-caption: 11px;--ui-tamanho-codigo: 12px;--ui-peso-normal: 400;--ui-peso-medio: 500;--ui-peso-seminegrito: 600;--ui-peso-negrito: 700;--ui-altura-linha-titulo: 1.25;--ui-altura-linha-corpo: 1.5;--ui-altura-linha-compacta: 1.2}:root{--ui-z-workspace-hud: 500;--ui-z-docked-bar: 600;--ui-z-drawer: 700;--ui-z-modal: 1000;--ui-z-popover: 1050;--ui-z-toast: 1100;--ui-z-tooltip: 1200}
1
+ :root,:root[data-tema=escuro],:root.dark,[data-tema=escuro],[data-theme=dark]{color-scheme:dark;--ui-cor-primaria: #00E08A;--ui-cor-texto-sobre-primaria: #000000;--ui-cor-destaque: #00E08A;--ui-cor-fundo: #0b0b0d;--ui-cor-superficie: #141417;--ui-cor-fundo-elevado: #1a1a1e;--ui-cor-fundo-card: #18181c;--ui-cor-fundo-menu: #18181c;--ui-cor-fundo-recuado: rgba(0, 0, 0, .15);--ui-cor-hover-menu: rgba(255, 255, 255, .08);--ui-cor-texto: #e1e1e6;--ui-cor-texto-secundario: #9696a6;--ui-cor-texto-erro: #ff5555;--ui-cor-texto-sucesso: #00E08A;--ui-cor-texto-alerta: #ffb86c;--ui-cor-texto-info: #33b5ff;--ui-cor-texto-sobre-status: #000000;--ui-cor-botao-secundario-fundo: #1e1e24;--ui-cor-botao-secundario-hover: #2a2a34;--ui-cor-botao-destrutivo-fundo: #d32f2f;--ui-cor-botao-destrutivo-hover: #b71c1c;--ui-cor-botao-destrutivo-texto: #ffffff;--ui-cor-borda: rgba(255, 255, 255, .12);--ui-sombra-sm: 0 2px 6px rgba(0, 0, 0, .3);--ui-sombra-md: 0 4px 14px rgba(0, 0, 0, .4);--ui-sombra-lg: 0 16px 40px rgba(0, 0, 0, .6)}:root[data-tema=claro],:root.light,[data-tema=claro],[data-theme=light]{color-scheme:light;--ui-cor-primaria: #006b40;--ui-cor-texto-sobre-primaria: #ffffff;--ui-cor-destaque: #006b40;--ui-cor-fundo: #f8f9fa;--ui-cor-superficie: #ffffff;--ui-cor-fundo-elevado: #f1f3f5;--ui-cor-fundo-card: #ffffff;--ui-cor-fundo-menu: #ffffff;--ui-cor-fundo-recuado: rgba(0, 0, 0, .03);--ui-cor-hover-menu: rgba(0, 0, 0, .05);--ui-cor-texto: #1a1a1e;--ui-cor-texto-secundario: #5c636a;--ui-cor-texto-erro: #b02020;--ui-cor-texto-sucesso: #006b40;--ui-cor-texto-alerta: #875000;--ui-cor-texto-info: #095db0;--ui-cor-texto-sobre-status: #ffffff;--ui-cor-botao-secundario-fundo: #e9ecef;--ui-cor-botao-secundario-hover: #dee2e6;--ui-cor-botao-destrutivo-fundo: #c92a2a;--ui-cor-botao-destrutivo-hover: #a61e1e;--ui-cor-botao-destrutivo-texto: #ffffff;--ui-cor-borda: rgba(0, 0, 0, .12);--ui-sombra-sm: 0 1px 3px rgba(0, 0, 0, .06);--ui-sombra-md: 0 4px 12px rgba(0, 0, 0, .08);--ui-sombra-lg: 0 12px 32px rgba(0, 0, 0, .15)}@media (prefers-color-scheme: light){:root:not([data-tema=escuro]):not(.dark):not([data-theme=dark]){color-scheme:light;--ui-cor-primaria: #006b40;--ui-cor-texto-sobre-primaria: #ffffff;--ui-cor-destaque: #006b40;--ui-cor-fundo: #f8f9fa;--ui-cor-superficie: #ffffff;--ui-cor-fundo-elevado: #f1f3f5;--ui-cor-fundo-card: #ffffff;--ui-cor-fundo-menu: #ffffff;--ui-cor-fundo-recuado: rgba(0, 0, 0, .03);--ui-cor-hover-menu: rgba(0, 0, 0, .05);--ui-cor-texto: #1a1a1e;--ui-cor-texto-secundario: #5c636a;--ui-cor-texto-erro: #b02020;--ui-cor-texto-sucesso: #006b40;--ui-cor-texto-alerta: #875000;--ui-cor-texto-info: #095db0;--ui-cor-texto-sobre-status: #ffffff;--ui-cor-botao-secundario-fundo: #e9ecef;--ui-cor-botao-secundario-hover: #dee2e6;--ui-cor-botao-destrutivo-fundo: #c92a2a;--ui-cor-botao-destrutivo-hover: #a61e1e;--ui-cor-botao-destrutivo-texto: #ffffff;--ui-cor-borda: rgba(0, 0, 0, .12);--ui-sombra-sm: 0 1px 3px rgba(0, 0, 0, .06);--ui-sombra-md: 0 4px 12px rgba(0, 0, 0, .08);--ui-sombra-lg: 0 12px 32px rgba(0, 0, 0, .15)}}:root{--ui-raio-borda: 6px;--ui-raio-sm: calc(var(--ui-raio-borda) * 2 / 3);--ui-raio-lg: calc(var(--ui-raio-borda) * 5 / 3);--ui-raio-xl: calc(var(--ui-raio-borda) * 8 / 3);--ui-raio-pill: 999px;--ui-espaco-xs: 4px;--ui-espaco-sm: 8px;--ui-espaco-md: 16px;--ui-espaco-lg: 24px;--ui-touch-target-min: 44px;--ui-altura-minima: 15px;--ui-campo-altura: var(--ui-altura-minima, 15px)}:root{--ui-fonte-base: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--ui-fonte-codigo: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;--ui-tamanho-h1: clamp(24px, 4vw, 36px);--ui-tamanho-h2: clamp(20px, 3vw, 28px);--ui-tamanho-h3: clamp(18px, 2.4vw, 24px);--ui-tamanho-h4: clamp(16px, 2vw, 20px);--ui-tamanho-h5: clamp(14px, 1.6vw, 18px);--ui-tamanho-h6: clamp(13px, 1.2vw, 16px);--ui-tamanho-corpo: 14px;--ui-tamanho-corpo-sm: 13px;--ui-tamanho-caption: 11px;--ui-tamanho-codigo: 12px;--ui-peso-normal: 400;--ui-peso-medio: 500;--ui-peso-seminegrito: 600;--ui-peso-negrito: 700;--ui-altura-linha-titulo: 1.25;--ui-altura-linha-corpo: 1.5;--ui-altura-linha-compacta: 1.2}:root{--ui-z-workspace-hud: 500;--ui-z-docked-bar: 600;--ui-z-drawer: 700;--ui-z-modal: 1000;--ui-z-popover: 1050;--ui-z-toast: 1100;--ui-z-tooltip: 1200}
@@ -0,0 +1,18 @@
1
+ "use strict";var A=Object.defineProperty;var k=(e,a,t)=>a in e?A(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t;var s=(e,a,t)=>k(e,typeof a!="symbol"?a+"":a,t);const m=require("./ssr-safe-CiHD1adl.cjs"),S=':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:var(--ui-sombra-lg, 0 12px 36px rgba(0, 0, 0, .6));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 0s linear .2s;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);transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility 0s}@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:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent);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 color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);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:var(--ui-raio-sm, 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}:host([bloquear-fechamento]) .ui-modal__close{display:none}.ui-modal__close svg,.ui-modal__close ::slotted(svg){shape-rendering:geometricPrecision}.ui-modal__close:hover{color:#fff;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.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 color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);background-color:var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15))}@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:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 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:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 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 _(e){const a=new Set;if(typeof document>"u")return a;let t=e;for(;t&&t!==document.body&&t!==document.documentElement;){const i=t.parentElement;if(!i)break;const o=Array.from(i.children);for(const r of o)if(r!==t&&!r.contains(e)&&r.tagName!=="SCRIPT"&&r.tagName!=="STYLE"&&!(r.hasAttribute("inert")||r.inert===!0)){r.setAttribute("inert","");try{r.inert=!0}catch{}a.add(r)}t=i}if(document.body){const i=Array.from(document.body.children);for(const o of i)if(o!==e&&!o.contains(e)&&o.tagName!=="SCRIPT"&&o.tagName!=="STYLE"&&!(o.hasAttribute("inert")||o.inert===!0)){o.setAttribute("inert","");try{o.inert=!0}catch{}a.add(o)}}return a}function g(e){e.forEach(a=>{try{a.removeAttribute("inert"),a.inert=!1}catch{}}),e.clear()}const n=[];let p=new Set,v="";function x(){g(p);const e=n[n.length-1];p=e?_(e):new Set}function C(e){const a=n.indexOf(e);a>=0&&n.splice(a,1),n.length===0&&(v=document.body.style.overflow,document.body.style.overflow="hidden"),n.push(e),x()}function f(e){const a=n.indexOf(e);a<0||(n.splice(a,1),n.length===0&&(document.body.style.overflow=v),x())}function I(e){return n[n.length-1]===e}const h='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), ui-campo-texto, ui-input, ui-botao, ui-botao-primario, ui-checkbox, ui-switch, ui-lista-flutuante, ui-radio, ui-select, ui-segmented';function F(){var a;let e=document.activeElement;for(;(a=e==null?void 0:e.shadowRoot)!=null&&a.activeElement;)e=e.shadowRoot.activeElement;return e}class c extends m.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,"_estaAberto",!1);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 i,o;if(this._estaAberto&&I(this)){if(t.key==="Escape")this.fechar(),t.stopImmediatePropagation();else if(t.key==="Tab"){if(this._atualizarFocables(),this._focables.length===0){t.preventDefault();return}const r=this._focables[0],d=this._focables[this._focables.length-1],l=this.getRootNode().activeElement;t.shiftKey?(l===r||!this.contains(l)&&!((i=this.shadowRoot)!=null&&i.contains(l)))&&(t.preventDefault(),d.focus()):(l===d||!this.contains(l)&&!((o=this.shadowRoot)!=null&&o.contains(l)))&&(t.preventDefault(),r.focus())}}});this._tituloId=`ui-modal-title-${Math.random().toString(36).substring(2,9)}`;const t=this.attachShadow({mode:"open"});t.innerHTML=`
2
+ <style>${S}</style>
3
+ <div class="ui-modal__backdrop" part="fundo"></div>
4
+ <div class="ui-modal__dialog" part="painel" role="dialog" aria-modal="true" aria-labelledby="${this._tituloId}" tabindex="-1">
5
+ <div class="ui-modal__handle"></div>
6
+ <div class="ui-modal__header" part="cabecalho">
7
+ <h3 class="ui-modal__titulo" part="titulo" id="${this._tituloId}"></h3>
8
+ <button class="ui-modal__close" part="fechar" type="button" aria-label="Fechar modal" title="Fechar">✕</button>
9
+ </div>
10
+ <div class="ui-modal__body" part="corpo">
11
+ <slot></slot>
12
+ </div>
13
+ <div class="ui-modal__footer" part="rodape">
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(i=>{i.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(i=>{i.removeEventListener("slotchange",this.handleSlotChange)}),this._estaAberto&&(this._estaAberto=!1,f(this))}attributeChangedCallback(t,i,o){this.syncState()}get aberto(){return this.hasAttribute("aberto")||this.hasAttribute("open")}set aberto(t){t?this.setAttribute("aberto",""):(this.removeAttribute("aberto"),this.removeAttribute("open"))}abrir(){this.aberto=!0}fechar(){this.hasAttribute("bloquear-fechamento")||(this.aberto=!1)}aoAbrir(){this._estaAberto=!0;const t=F();this._elementoGatilho=t&&t!==document.body&&!this.contains(t)?t:null,C(this),this.dispatchEvent(new CustomEvent("ui-abrir",{bubbles:!0,composed:!0})),setTimeout(()=>{this._estaAberto&&this.focarConteudoInicial()},0)}aoFechar(){this._estaAberto=!1,f(this),this.dispatchEvent(new CustomEvent("ui-fechar",{bubbles:!0,composed:!0}));const t=this._elementoGatilho;this._elementoGatilho=null;const i=document.activeElement,o=!i||i===document.body||i===this||this.contains(i);t!=null&&t.isConnected&&o&&t.focus()}focarConteudoInicial(){const t=this.obterFocaveisDoConteudo(),i=t.filter(o=>o.hasAttribute("autofocus"));for(const o of[...i,...t]){o.focus();const r=document.activeElement;if(r===o||o.contains(r))return}this.dialogElement.focus()}syncState(){var l,b;const t=this.aberto,i=this.getAttribute("titulo")||this.getAttribute("title")||"",o=(l=this.shadowRoot)==null?void 0:l.querySelector(".ui-modal__footer");this.dialogElement.setAttribute("aria-hidden",String(!t));const r=this.getAttribute("aria-label")||this.getAttribute("rotulo"),d=this.getAttribute("aria-labelledby");if(r?(this.dialogElement.setAttribute("aria-label",r),this.dialogElement.removeAttribute("aria-labelledby")):d?(this.dialogElement.setAttribute("aria-labelledby",d),this.dialogElement.removeAttribute("aria-label")):i?(this.tituloElement.textContent=i,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")),o){const E=Array.from(((b=this.shadowRoot)==null?void 0:b.querySelectorAll('slot[name="rodape"], slot[name="footer"]'))||[]).some(w=>w.assignedNodes({flatten:!0}).some(u=>u.nodeType===Node.ELEMENT_NODE||u.textContent&&u.textContent.trim()!==""))||this.querySelector('[slot="rodape"], [slot="footer"]')!==null;o.style.display=E?"flex":"none"}this.isConnected&&t!==this._estaAberto&&(t?this.aoAbrir():this.aoFechar())}static ehFocavel(t){return!t.hasAttribute("disabled")&&t.getAttribute("aria-hidden")!=="true"}obterFocaveisDoConteudo(){const t=[];return this.shadowRoot.querySelectorAll("slot").forEach(i=>{i.assignedElements({flatten:!0}).forEach(o=>{o instanceof HTMLElement&&(o.matches(h)&&t.push(o),t.push(...Array.from(o.querySelectorAll(h))))})}),t.filter(c.ehFocavel)}_atualizarFocables(){const t=Array.from(this.shadowRoot.querySelectorAll(h)).filter(i=>window.getComputedStyle(i).display!=="none"&&c.ehFocavel(i));this._focables=[...t,...this.obterFocaveisDoConteudo()]}}class y extends c{}m.definirCustomElement("ui-modal",c);m.definirCustomElement("ui-dialog",y);exports.UIDialog=y;exports.UIModal=c;exports.aplicarInertForaDoModal=_;exports.removerInertForaDoModal=g;