@thibezer/ui-components-kit 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/CHANGELOG.md +22 -103
  2. package/README.md +8 -32
  3. package/dist/botao.cjs +1 -1
  4. package/dist/botao.js +1 -1
  5. package/dist/camadas.cjs +110 -114
  6. package/dist/camadas.js +1177 -1343
  7. package/dist/campo-texto.cjs +1 -1
  8. package/dist/campo-texto.js +1 -1
  9. package/dist/canvas.cjs +63 -64
  10. package/dist/canvas.js +3544 -4025
  11. package/dist/card.cjs +1 -1
  12. package/dist/card.js +1 -1
  13. package/dist/components/ui-avatar/ui-avatar.d.ts +0 -11
  14. package/dist/components/ui-badge/ui-badge.d.ts +0 -2
  15. package/dist/components/ui-barra-ferramentas/ferramentas-comum.d.ts +22 -1
  16. package/dist/components/ui-barra-ferramentas/tipos.d.ts +31 -0
  17. package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +17 -1
  18. package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +17 -0
  19. package/dist/components/ui-camadas/camadas-arraste-controles.d.ts +0 -2
  20. package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +11 -4
  21. package/dist/components/ui-camadas/camadas-drag-drop.d.ts +1 -13
  22. package/dist/components/ui-camadas/camadas-host.d.ts +0 -1
  23. package/dist/components/ui-camadas/camadas-mapas-base.d.ts +1 -3
  24. package/dist/components/ui-camadas/camadas-selecao.d.ts +0 -12
  25. package/dist/components/ui-camadas/ui-camadas.d.ts +5 -8
  26. package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +1 -2
  27. package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +1 -1
  28. package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +8 -3
  29. package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +106 -39
  30. package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +1 -3
  31. package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +1 -15
  32. package/dist/components/ui-checkbox/ui-checkbox.d.ts +1 -4
  33. package/dist/components/ui-cores/tipos.d.ts +0 -2
  34. package/dist/components/ui-cores/ui-controle-cores.d.ts +3 -8
  35. package/dist/components/ui-cores/ui-seletor-cor.d.ts +1 -3
  36. package/dist/components/ui-mapa/ui-mapa-linha.d.ts +5 -12
  37. package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +6 -15
  38. package/dist/components/ui-mapa/ui-mapa.d.ts +1 -14
  39. package/dist/components/ui-modal/modal-acessibilidade.d.ts +5 -5
  40. package/dist/components/ui-modal/ui-modal.d.ts +11 -1
  41. package/dist/components/ui-radio/radio-grupo-registry.d.ts +0 -10
  42. package/dist/components/ui-radio/ui-radio.d.ts +2 -9
  43. package/dist/components/ui-skeleton/ui-skeleton.d.ts +0 -9
  44. package/dist/components/ui-switch/ui-switch.d.ts +1 -3
  45. package/dist/components/ui-tabela/ui-tabela.d.ts +19 -1
  46. package/dist/components/ui-tooltip/ui-tooltip.d.ts +1 -24
  47. package/dist/core/index.d.ts +0 -1
  48. package/dist/core.cjs +1 -1
  49. package/dist/core.js +18 -28
  50. package/dist/cores.cjs +1 -1
  51. package/dist/cores.js +1 -1
  52. package/dist/custom-elements.json +13585 -18764
  53. package/dist/data.cjs +1 -1
  54. package/dist/data.js +2 -2
  55. package/dist/feedback.cjs +1 -1
  56. package/dist/feedback.js +2 -2
  57. package/dist/form-validacao-BIOXxt-1.js +140 -0
  58. package/dist/form-validacao-ytRYSF3E.cjs +1 -0
  59. package/dist/forms.cjs +1 -1
  60. package/dist/forms.js +2 -2
  61. package/dist/gerencigeo-canvas/canvas_interacao.d.ts +1 -0
  62. package/dist/gerencigeo-canvas/feature_metricas.d.ts +9 -0
  63. package/dist/gerencigeo-canvas/feature_popup.d.ts +0 -2
  64. package/dist/gerencigeo-canvas/mapa_core.d.ts +0 -6
  65. package/dist/index.cjs +1 -1
  66. package/dist/index.d.ts +0 -3
  67. package/dist/index.js +176 -179
  68. package/dist/mapa.cjs +16 -11
  69. package/dist/mapa.js +170 -242
  70. package/dist/modal.cjs +1 -1
  71. package/dist/modal.js +1 -1
  72. package/dist/register.cjs +1 -1
  73. package/dist/register.js +11 -11
  74. package/dist/svg-seguro-ChVJ2L2z.js +74 -0
  75. package/dist/svg-seguro-J2RM1Ssf.cjs +1 -0
  76. package/dist/tabela.cjs +1 -1
  77. package/dist/tabela.js +1 -1
  78. package/dist/tipos-elementos.d.ts +20 -48
  79. package/dist/tipos-react.d.ts +0 -2
  80. package/dist/tipos-vue.d.ts +15 -44
  81. package/dist/tools.cjs +1 -1
  82. package/dist/tools.js +1 -1
  83. package/dist/ui-badge-BxT-sDmV.cjs +28 -0
  84. package/dist/ui-badge-C0eKBI8E.js +183 -0
  85. package/dist/ui-botao-BOOnP8ds.cjs +12 -0
  86. package/dist/ui-botao-DfqSivHl.js +165 -0
  87. package/dist/ui-botao-OGJV6Vfk.js +165 -0
  88. package/dist/ui-botao-psS1juof.cjs +12 -0
  89. package/dist/ui-campo-texto-Cnn2UAkS.cjs +16 -0
  90. package/dist/{ui-campo-texto-B_OHVGiN.js → ui-campo-texto-Uu2dJE_0.js} +51 -51
  91. package/dist/ui-card-B86lJXTP.cjs +20 -0
  92. package/dist/{ui-card-BNYCQ7g-.js → ui-card-C_o5_0cB.js} +42 -50
  93. package/dist/ui-controle-cores-BS0WYPdi.js +572 -0
  94. package/dist/ui-controle-cores-Er6ZcQ7U.cjs +111 -0
  95. package/dist/ui-kit.css +1 -1
  96. package/dist/ui-modal-CvGFGh1h.cjs +18 -0
  97. package/dist/{ui-modal-BkYvNP0G.js → ui-modal-DBOtSTbR.js} +140 -116
  98. package/dist/ui-paleta-ferramentas-CEZYcN4J.js +624 -0
  99. package/dist/ui-paleta-ferramentas-CU4icLl0.js +1171 -0
  100. package/dist/{ui-paleta-ferramentas-bDLPbiGA.cjs → ui-paleta-ferramentas-Ccmo-rB5.cjs} +7 -7
  101. package/dist/ui-paleta-ferramentas-DLwZHIDv.cjs +21 -0
  102. package/dist/{ui-paleta-ferramentas-Ksh6gMW3.js → ui-paleta-ferramentas-DNN5i6nL.js} +329 -359
  103. package/dist/ui-paleta-ferramentas-Dbj1kBS9.cjs +18 -0
  104. package/dist/ui-paleta-ferramentas-DbwdWVtT.js +1173 -0
  105. package/dist/ui-paleta-ferramentas-bvqxj1Yd.cjs +21 -0
  106. package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
  107. package/dist/ui-segmented-DyF5YLsV.js +418 -0
  108. package/dist/ui-segmented-rn9RxRGM.cjs +19 -0
  109. package/dist/{ui-linha-nCDh2wPm.js → ui-segmented-wUraId2e.js} +105 -200
  110. package/dist/ui-skeleton-DI4_9WOX.js +428 -0
  111. package/dist/{ui-skeleton-DiOxTBZK.cjs → ui-skeleton-SPYqku8P.cjs} +10 -10
  112. package/dist/{ui-skeleton-B2Rgrv8o.js → ui-skeleton-W9uwIceA.js} +191 -254
  113. package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
  114. package/dist/{ui-switch-DO1R0Ce7.js → ui-switch-BcOqOkiV.js} +128 -187
  115. package/dist/ui-switch-D7iPKDj-.cjs +53 -0
  116. package/dist/ui-tabela-propriedades-BBr5sqki.cjs +145 -0
  117. package/dist/{ui-tabela-propriedades-DzZlyNZ_.cjs → ui-tabela-propriedades-BecPqC-e.cjs} +10 -10
  118. package/dist/{ui-tabela-propriedades-D9Echt2X.js → ui-tabela-propriedades-BokvDD3b.js} +826 -845
  119. package/dist/ui-tabela-propriedades-Boy7I5yW.js +2412 -0
  120. package/dist/ui-tabela-propriedades-C-PeuW1i.cjs +141 -0
  121. package/dist/ui-tabela-propriedades-Df9ajC6M.js +2648 -0
  122. package/dist/ui-toast-Bp_NlM5G.js +156 -0
  123. package/dist/ui-toast-DGTZKne5.cjs +20 -0
  124. package/dist/zero-js-triggers-C_KrvFOQ.js +244 -0
  125. package/dist/zero-js-triggers-C_gtaojZ.cjs +1 -0
  126. package/package.json +3 -3
  127. package/dist/acessibilidade-CSzX-DkG.cjs +0 -1
  128. package/dist/acessibilidade-CUlSXc2X.js +0 -38
  129. package/dist/altura-controle-ukMRPckR.cjs +0 -1
  130. package/dist/altura-controle-vxQiXG4q.js +0 -62
  131. package/dist/components/ui-barra-ferramentas/paleta-atalhos.d.ts +0 -16
  132. package/dist/components/ui-barra-ferramentas/paleta-pressao-longa.d.ts +0 -24
  133. package/dist/components/ui-barra-ferramentas/ribbon-render.d.ts +0 -14
  134. package/dist/components/ui-barra-ferramentas/ribbon-teclado.d.ts +0 -17
  135. package/dist/components/ui-camadas/camadas-colecao.d.ts +0 -27
  136. package/dist/components/ui-camadas/camadas-drop-ops.d.ts +0 -31
  137. package/dist/components/ui-camadas/camadas-hierarquia.d.ts +0 -10
  138. package/dist/components/ui-camadas/camadas-lembranca.d.ts +0 -34
  139. package/dist/components/ui-camadas/camadas-render.d.ts +0 -15
  140. package/dist/components/ui-camadas/camadas-renomear.d.ts +0 -12
  141. package/dist/components/ui-camadas/camadas-selecao-api.d.ts +0 -17
  142. package/dist/components/ui-camadas/camadas-thumb.d.ts +0 -1
  143. package/dist/components/ui-canvas-cad/cad-acessibilidade.d.ts +0 -15
  144. package/dist/components/ui-canvas-cad/cad-evento-coordenadas.d.ts +0 -22
  145. package/dist/components/ui-canvas-cad/cad-feicoes-camera.d.ts +0 -26
  146. package/dist/components/ui-canvas-cad/cad-feicoes-consulta.d.ts +0 -21
  147. package/dist/components/ui-canvas-cad/cad-feicoes-dados.d.ts +0 -39
  148. package/dist/components/ui-canvas-cad/cad-feicoes-desenho.d.ts +0 -68
  149. package/dist/components/ui-canvas-cad/cad-feicoes-edicao.d.ts +0 -37
  150. package/dist/components/ui-canvas-cad/cad-feicoes-operacoes.d.ts +0 -48
  151. package/dist/components/ui-canvas-cad/cad-feicoes-ponteiro.d.ts +0 -28
  152. package/dist/components/ui-canvas-cad/cad-feicoes-selecao-regiao.d.ts +0 -22
  153. package/dist/components/ui-canvas-cad/cad-feicoes-tipos.d.ts +0 -53
  154. package/dist/components/ui-canvas-cad/cad-feicoes-versoes.d.ts +0 -33
  155. package/dist/components/ui-canvas-cad/cad-leaflet-adaptador.d.ts +0 -5
  156. package/dist/components/ui-canvas-cad/cad-selecao-pontos.d.ts +0 -5
  157. package/dist/components/ui-canvas-cad/tipos.d.ts +0 -37
  158. package/dist/components/ui-linha/index.d.ts +0 -1
  159. package/dist/components/ui-linha/ui-linha.d.ts +0 -48
  160. package/dist/components/ui-mapa/mapa-atributos.d.ts +0 -14
  161. package/dist/components/ui-mapa/mapa-basemaps.d.ts +0 -7
  162. package/dist/components/ui-mapa/mapa-icones.d.ts +0 -4
  163. package/dist/components/ui-mapa/mapa-leaflet.d.ts +0 -5
  164. package/dist/components/ui-mapa/mapa-vinculo-pai.d.ts +0 -22
  165. package/dist/components/ui-mapa/tipos.d.ts +0 -13
  166. package/dist/components/ui-modal/modal-foco.d.ts +0 -28
  167. package/dist/components/ui-tabela/tabela-estados.d.ts +0 -16
  168. package/dist/components/ui-tabela/tabela-rolagem.d.ts +0 -44
  169. package/dist/components/ui-tabela/tabela-teclado.d.ts +0 -16
  170. package/dist/components/ui-tooltip/tooltip-popover.d.ts +0 -7
  171. package/dist/components/ui-tooltip/tooltip-posicionamento.d.ts +0 -29
  172. package/dist/core/altura-controle.d.ts +0 -34
  173. package/dist/core/opcoes.d.ts +0 -9
  174. package/dist/core/rotulo-controle.d.ts +0 -13
  175. package/dist/form-validacao-BlQFxUVj.js +0 -104
  176. package/dist/form-validacao-DIeyQVH5.cjs +0 -1
  177. package/dist/gerencigeo-canvas/popup_gate.d.ts +0 -30
  178. package/dist/gerencigeo-canvas/zoom_opcoes.d.ts +0 -10
  179. package/dist/opcoes-CJYLi6kd.js +0 -12
  180. package/dist/opcoes-CkyDxBuQ.cjs +0 -1
  181. package/dist/ui-badge-BWhoGgo9.js +0 -197
  182. package/dist/ui-badge-SIR81R9l.cjs +0 -28
  183. package/dist/ui-botao-D24oXySA.cjs +0 -12
  184. package/dist/ui-botao-Dsj08jjw.js +0 -165
  185. package/dist/ui-campo-texto-DauJCde3.cjs +0 -16
  186. package/dist/ui-card-BrjBL-yo.cjs +0 -20
  187. package/dist/ui-controle-cores-DgEza3wF.js +0 -612
  188. package/dist/ui-controle-cores-uY__TgwW.cjs +0 -117
  189. package/dist/ui-linha-C6HBnsaw.cjs +0 -19
  190. package/dist/ui-modal-CUNbpbZ1.cjs +0 -18
  191. package/dist/ui-switch-D9a8XlVX.cjs +0 -53
@@ -1,10 +1,10 @@
1
1
  var V = Object.defineProperty;
2
- var U = (a, o, t) => o in a ? V(a, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[o] = t;
3
- var u = (a, o, t) => U(a, typeof o != "symbol" ? o + "" : o, t);
4
- import { L as P } from "./listener-bag-DQgv7OON.js";
2
+ var G = (o, s, t) => s in o ? V(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
3
+ var c = (o, s, t) => G(o, typeof s != "symbol" ? s + "" : s, t);
4
+ import { L as S } from "./listener-bag-DQgv7OON.js";
5
5
  import { d as z, S as M } from "./ssr-safe-5cWfJP-s.js";
6
- import { h as G } from "./svg-seguro-BsbNQqpd.js";
7
- const K = ':host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1;color:inherit;flex-shrink:0;width:var(--ui-tamanho-icone, 20px);height:var(--ui-tamanho-icone, 20px);box-sizing:border-box}.ui-icone{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;color:inherit;font-size:var(--ui-tamanho-icone, 20px)}::slotted(svg),.ui-icone svg{width:100%!important;height:100%!important;display:block;shape-rendering:geometricPrecision}:host([cor="primaria"]),:host([color="primaria"]){color:var(--ui-cor-primaria, #00E08A)}:host([cor="secundaria"]),:host([color="secundaria"]){color:var(--ui-cor-texto-secundario, #888899)}:host([cor="erro"]),:host([color="erro"]){color:var(--ui-cor-texto-erro, #ff5555)}:host([cor="sucesso"]),:host([color="sucesso"]){color:var(--ui-cor-texto-sucesso, #00E08A)}:host([cor="alerta"]),:host([color="alerta"]){color:var(--ui-cor-texto-alerta, #ffb86c)}', $ = {
6
+ import { h as U } from "./svg-seguro-BsbNQqpd.js";
7
+ const K = ':host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1;color:inherit;flex-shrink:0;width:var(--ui-tamanho-icone, 20px);height:var(--ui-tamanho-icone, 20px);box-sizing:border-box}.ui-icone{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;color:inherit;font-size:var(--ui-tamanho-icone, 20px)}::slotted(svg),.ui-icone svg{width:100%!important;height:100%!important;display:block;shape-rendering:geometricPrecision}:host([cor="primaria"]),:host([color="primaria"]){color:var(--ui-cor-primaria, #00E08A)}:host([cor="secundaria"]),:host([color="secundaria"]){color:var(--ui-cor-texto-secundario, #888899)}:host([cor="erro"]),:host([color="erro"]){color:var(--ui-cor-texto-erro, #ff5555)}:host([cor="sucesso"]),:host([color="sucesso"]){color:var(--ui-cor-texto-sucesso, #00E08A)}:host([cor="alerta"]),:host([color="alerta"]){color:var(--ui-cor-texto-alerta, #ffb86c)}', D = {
8
8
  search: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
9
9
  check: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>',
10
10
  eye: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',
@@ -16,13 +16,13 @@ const K = ':host{display:inline-flex;align-items:center;justify-content:center;v
16
16
  alert: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>',
17
17
  close: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>'
18
18
  };
19
- class X extends M {
19
+ class Y extends M {
20
20
  constructor() {
21
21
  super();
22
- u(this, "iconContainer");
23
- u(this, "svgContainer");
24
- u(this, "slotElement");
25
- u(this, "handleSlotChange", () => {
22
+ c(this, "iconContainer");
23
+ c(this, "svgContainer");
24
+ c(this, "slotElement");
25
+ c(this, "handleSlotChange", () => {
26
26
  this.syncState();
27
27
  });
28
28
  const t = this.attachShadow({ mode: "open" });
@@ -66,251 +66,229 @@ class X extends M {
66
66
  this.style.setProperty("--ui-tamanho-icone", t);
67
67
  const e = this.getAttribute("cor") || this.getAttribute("color");
68
68
  e ? (this.style.setProperty("--ui-cor-icone", e), this.iconContainer.style.color = e) : (this.style.removeProperty("--ui-cor-icone"), this.iconContainer.style.color = ""), this.hasAttribute("aria-label") || this.hasAttribute("label") ? this.iconContainer.removeAttribute("aria-hidden") : this.iconContainer.setAttribute("aria-hidden", "true");
69
- const r = this.getAttribute("nome") || this.getAttribute("name"), s = this.slotElement.assignedNodes().length > 0;
70
- r && $[r] && !s ? (this.svgContainer.innerHTML = $[r], this.svgContainer.style.display = "inline-flex") : (this.svgContainer.innerHTML = "", this.svgContainer.style.display = "none");
69
+ const r = this.getAttribute("nome") || this.getAttribute("name"), l = this.slotElement.assignedNodes().length > 0;
70
+ r && D[r] && !l ? (this.svgContainer.innerHTML = D[r], this.svgContainer.style.display = "inline-flex") : (this.svgContainer.innerHTML = "", this.svgContainer.style.display = "none");
71
71
  }
72
72
  }
73
- z("ui-icone", X);
74
- const Y = ':host{display:block;position:relative;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #e1e1e6)}.ui-ribbon{display:flex;flex-direction:column;background:var(--ui-cor-superficie, #141417);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));-webkit-user-select:none;user-select:none}.ui-ribbon__cabecalho{display:flex;align-items:stretch;height:30px;box-sizing:border-box;box-shadow:inset 0 -1px 0 var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ribbon__abas{display:flex;flex:1;min-width:0;align-items:flex-end;gap:2px;padding:0 8px;box-sizing:border-box;overflow-x:auto;scrollbar-width:none;background:linear-gradient(to right,var(--ui-cor-superficie, #141417) 20px,transparent) left top / 28px calc(100% - 1px) no-repeat local,linear-gradient(to left,var(--ui-cor-superficie, #141417) 20px,transparent) right top / 28px calc(100% - 1px) no-repeat local,linear-gradient(to right,rgba(0,0,0,.35),transparent) left top / 14px calc(100% - 1px) no-repeat scroll,linear-gradient(to left,rgba(0,0,0,.35),transparent) right top / 14px calc(100% - 1px) no-repeat scroll}.ui-ribbon__abas::-webkit-scrollbar{display:none}.ui-ribbon__aba{position:relative;flex-shrink:0;height:28px;margin-bottom:1px;padding:0 14px;border:0;border-radius:6px 6px 0 0;background:transparent;color:var(--ui-cor-texto-secundario, #888899);font:inherit;font-size:.75rem;font-weight:600;white-space:nowrap;cursor:pointer;transition:background-color .12s ease,color .12s ease}.ui-ribbon__aba:hover{color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ribbon__aba:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-ribbon__aba--ativa,.ui-ribbon__aba--ativa:hover{height:30px;margin-bottom:0;color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-fundo-elevado, #1a1a1e);box-shadow:inset 1px 0 0 var(--ui-cor-borda, rgba(255, 255, 255, .12)),inset -1px 0 0 var(--ui-cor-borda, rgba(255, 255, 255, .12)),inset 0 1px 0 var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ribbon__aba--ativa:after{content:"";position:absolute;inset-inline:8px;bottom:1px;height:2px;border-radius:2px 2px 0 0;background:var(--ui-cor-primaria, #00E08A)}.ui-ribbon__aba--contextual{color:var(--ui-cor-primaria, #00E08A)}.ui-ribbon__aba--contextual:before{content:"";position:absolute;inset-inline:0;top:0;height:2px;border-radius:6px 6px 0 0;background:var(--ui-cor-primaria, #00E08A)}.ui-ribbon__fixar{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;width:28px;height:24px;margin-inline:2px 6px;padding:0;border:0;border-radius:var(--ui-raio-sm, 4px);background:transparent;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer}.ui-ribbon__fixar:hover{color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ribbon__fixar:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-ribbon__fixar:before{content:"";width:6px;height:6px;border:solid currentColor;border-width:2px 0 0 2px;transform:translateY(2px) rotate(45deg)}:host([recolhido]) .ui-ribbon__fixar:before{transform:translateY(-2px) rotate(225deg)}.ui-ribbon__painel{background:var(--ui-cor-fundo-elevado, #1a1a1e);overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--ui-cor-borda, rgba(255, 255, 255, .2)) transparent}.ui-ribbon__grupos{display:flex;align-items:stretch;width:max-content;min-width:100%;min-height:92px;padding:4px 8px;box-sizing:border-box}.ui-ribbon__grupo{display:flex;flex-direction:column;flex-shrink:0;padding:0 8px;border-inline-end:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ribbon__grupo:last-child{border-inline-end:0}.ui-ribbon__grupo-itens{display:flex;flex:1;align-items:stretch;gap:2px}.ui-ribbon__grupo-rotulo{padding:3px 0 1px;color:var(--ui-cor-texto-secundario, #888899);font-size:.6875rem;line-height:1.2;text-align:center;white-space:nowrap}.ui-ribbon__coluna{display:flex;flex-direction:column;justify-content:center;gap:0}.ui-ribbon__separador{width:1px;margin:4px 3px;background:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ferr-btn--grande{flex-direction:column;min-width:52px;padding:4px 6px;gap:3px}.ui-ferr-btn--grande .ui-ferr-btn__rotulo{max-width:72px;white-space:normal;text-align:center;line-height:1.15;overflow-wrap:anywhere}.ui-ferr-btn--pequeno{height:24px;padding:0 6px;justify-content:flex-start}.ui-ferr-btn--pequeno.ui-ferr-btn--so-icone{width:24px;padding:0;justify-content:center}.ui-ribbon__grupos .ui-ferr-btn:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px;box-shadow:none}:host([recolhido]) .ui-ribbon__painel{display:none;position:absolute;top:100%;inset-inline:0;z-index:var(--ui-z-docked-bar, 600);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .35))}:host([recolhido]) .ui-ribbon--aberto .ui-ribbon__painel{display:block}:host([recolhido]) .ui-ribbon__aba--ativa:after{display:none}:host([compacto]) .ui-ribbon__grupos{min-height:0;padding-block:2px}:host([compacto]) .ui-ribbon__grupo-rotulo{display:none}:host([compacto]) .ui-ferr-btn--grande{min-width:44px}@media (max-width: 720px){.ui-ferr-btn--pequeno:has(.ui-ferr-btn__icone) .ui-ferr-btn__rotulo{display:none}.ui-ferr-btn--pequeno:has(.ui-ferr-btn__icone){min-width:28px;justify-content:center;padding:0 4px}}@media (pointer: coarse){.ui-ribbon__cabecalho{height:38px}.ui-ribbon__aba{height:36px}.ui-ribbon__aba--ativa,.ui-ribbon__aba--ativa:hover{height:38px}.ui-ferr-btn--pequeno{height:32px}.ui-ferr-btn--pequeno.ui-ferr-btn--so-icone{width:32px}.ui-ribbon__fixar{width:36px;height:32px}}@media (prefers-reduced-motion: reduce){.ui-ribbon__aba{transition:none}}@media (forced-colors: active){.ui-ribbon__aba--ativa:after,.ui-ribbon__aba--contextual:before{background:Highlight;forced-color-adjust:none}.ui-ribbon__aba--ativa,.ui-ribbon__aba--ativa:hover{box-shadow:none;border:1px solid CanvasText;border-bottom-color:Canvas}.ui-ribbon__aba:focus-visible,.ui-ribbon__fixar:focus-visible,.ui-ribbon__grupos .ui-ferr-btn:focus-visible{outline-color:Highlight}}', R = '.ui-ferr-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;padding:0;border:1px solid transparent;border-radius:var(--ui-raio-borda, 6px);background:transparent;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:.75rem;line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .12s ease,border-color .12s ease,color .12s ease}.ui-ferr-btn:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ferr-btn:active:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent)}.ui-ferr-btn:focus-visible{outline:2px solid transparent;outline-offset:2px;box-shadow:0 0 0 2px var(--ui-cor-fundo, #0b0b0d),0 0 0 4px var(--ui-cor-primaria, #00E08A)}.ui-ferr-btn:disabled{opacity:.4;cursor:not-allowed}.ui-ferr-btn--ativo{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent);border-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 55%,transparent)}.ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 28%,transparent)}.ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 36%,transparent)}.ui-ferr-btn.ui-ferr-btn--ativo:disabled{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));border-color:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ferr-btn__icone{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.ui-ferr-btn__rotulo{white-space:nowrap}.ui-ferr-btn__caret{width:0;height:0;flex-shrink:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid currentColor;opacity:.7}.ui-ferr-menu{position:fixed;z-index:var(--ui-z-popover, 1050);display:flex;flex-direction:column;gap:1px;min-width:180px;max-height:calc(100vh - 8px);overflow-y:auto;padding:4px;box-sizing:border-box;background:var(--ui-cor-fundo-menu, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .35));font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #e1e1e6)}.ui-ferr-menu__item{position:relative;display:flex;align-items:center;gap:8px;width:100%;height:28px;padding:0 8px;box-sizing:border-box;border:0;border-radius:var(--ui-raio-sm, 4px);background:transparent;color:inherit;font:inherit;font-size:.75rem;text-align:start;cursor:pointer}.ui-ferr-menu__item:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ferr-menu__item:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px;background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ferr-menu__item:disabled{opacity:.4;cursor:not-allowed}.ui-ferr-menu__item--ativo,.ui-ferr-menu__item[aria-checked=true]{color:var(--ui-cor-primaria, #00E08A);font-weight:600}.ui-ferr-menu__item--ativo:after,.ui-ferr-menu__item[aria-checked=true]:after{content:"";flex-shrink:0;width:4px;height:8px;margin-inline-start:4px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg) translateY(-1px)}.ui-ferr-menu__icone{display:inline-flex;width:16px;justify-content:center}.ui-ferr-menu__rotulo{flex:1}.ui-ferr-menu__atalho{margin-inline-start:16px;color:var(--ui-cor-texto-secundario, #888899);font-size:.6875rem;font-variant-numeric:tabular-nums}.ui-ferr-menu__sep{height:1px;margin:3px 2px;background:var(--ui-cor-borda, rgba(255, 255, 255, .12))}@media (pointer: coarse){.ui-ferr-menu__item{height:36px}}@media (prefers-reduced-motion: reduce){.ui-ferr-btn{transition:none}}@media (forced-colors: active){.ui-ferr-btn:focus-visible,.ui-ferr-menu__item:focus-visible{outline:2px solid Highlight}.ui-ferr-btn--ativo{background:Highlight;color:HighlightText;border-color:ButtonText;forced-color-adjust:none}.ui-ferr-btn:disabled,.ui-ferr-menu__item:disabled{opacity:1;color:GrayText}.ui-ferr-menu{border-color:CanvasText}.ui-ferr-menu__item:hover:not(:disabled){background:Highlight;color:HighlightText}}';
75
- function B(a, o) {
76
- if (!a) return null;
73
+ z("ui-icone", Y);
74
+ const W = ':host{display:block;position:relative;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #e1e1e6)}.ui-ribbon{display:flex;flex-direction:column;background:var(--ui-cor-superficie, #141417);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));-webkit-user-select:none;user-select:none}.ui-ribbon__cabecalho{display:flex;align-items:stretch;height:30px;box-sizing:border-box;box-shadow:inset 0 -1px 0 var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ribbon__abas{display:flex;flex:1;min-width:0;align-items:flex-end;gap:2px;padding:0 8px;box-sizing:border-box;overflow-x:auto;scrollbar-width:none;background:linear-gradient(to right,var(--ui-cor-superficie, #141417) 20px,transparent) left top / 28px calc(100% - 1px) no-repeat local,linear-gradient(to left,var(--ui-cor-superficie, #141417) 20px,transparent) right top / 28px calc(100% - 1px) no-repeat local,linear-gradient(to right,rgba(0,0,0,.35),transparent) left top / 14px calc(100% - 1px) no-repeat scroll,linear-gradient(to left,rgba(0,0,0,.35),transparent) right top / 14px calc(100% - 1px) no-repeat scroll}.ui-ribbon__abas::-webkit-scrollbar{display:none}.ui-ribbon__aba{position:relative;flex-shrink:0;height:28px;margin-bottom:1px;padding:0 14px;border:0;border-radius:6px 6px 0 0;background:transparent;color:var(--ui-cor-texto-secundario, #888899);font:inherit;font-size:.75rem;font-weight:600;white-space:nowrap;cursor:pointer;transition:background-color .12s ease,color .12s ease}.ui-ribbon__aba:hover{color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ribbon__aba:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-ribbon__aba--ativa,.ui-ribbon__aba--ativa:hover{height:30px;margin-bottom:0;color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-fundo-elevado, #1a1a1e);box-shadow:inset 1px 0 0 var(--ui-cor-borda, rgba(255, 255, 255, .12)),inset -1px 0 0 var(--ui-cor-borda, rgba(255, 255, 255, .12)),inset 0 1px 0 var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ribbon__aba--ativa:after{content:"";position:absolute;inset-inline:8px;bottom:1px;height:2px;border-radius:2px 2px 0 0;background:var(--ui-cor-primaria, #00E08A)}.ui-ribbon__aba--contextual{color:var(--ui-cor-primaria, #00E08A)}.ui-ribbon__aba--contextual:before{content:"";position:absolute;inset-inline:0;top:0;height:2px;border-radius:6px 6px 0 0;background:var(--ui-cor-primaria, #00E08A)}.ui-ribbon__fixar{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;width:28px;height:24px;margin-inline:2px 6px;padding:0;border:0;border-radius:var(--ui-raio-sm, 4px);background:transparent;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer}.ui-ribbon__fixar:hover{color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ribbon__fixar:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-ribbon__fixar:before{content:"";width:6px;height:6px;border:solid currentColor;border-width:2px 0 0 2px;transform:translateY(2px) rotate(45deg)}:host([recolhido]) .ui-ribbon__fixar:before{transform:translateY(-2px) rotate(225deg)}.ui-ribbon__painel{background:var(--ui-cor-fundo-elevado, #1a1a1e);overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--ui-cor-borda, rgba(255, 255, 255, .2)) transparent}.ui-ribbon__grupos{display:flex;align-items:stretch;width:max-content;min-width:100%;min-height:92px;padding:4px 8px;box-sizing:border-box}.ui-ribbon__grupo{display:flex;flex-direction:column;flex-shrink:0;padding:0 8px;border-inline-end:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ribbon__grupo:last-child{border-inline-end:0}.ui-ribbon__grupo-itens{display:flex;flex:1;align-items:stretch;gap:2px}.ui-ribbon__grupo-rotulo{padding:3px 0 1px;color:var(--ui-cor-texto-secundario, #888899);font-size:.6875rem;line-height:1.2;text-align:center;white-space:nowrap}.ui-ribbon__coluna{display:flex;flex-direction:column;justify-content:center;gap:0}.ui-ribbon__separador{width:1px;margin:4px 3px;background:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ferr-btn--grande{flex-direction:column;min-width:52px;padding:4px 6px;gap:3px}.ui-ferr-btn--grande .ui-ferr-btn__rotulo{max-width:72px;white-space:normal;text-align:center;line-height:1.15;overflow-wrap:anywhere}.ui-ferr-btn--pequeno{height:24px;padding:0 6px;justify-content:flex-start}.ui-ferr-btn--pequeno.ui-ferr-btn--so-icone{width:24px;padding:0;justify-content:center}.ui-ribbon__grupos .ui-ferr-btn:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px;box-shadow:none}:host([recolhido]) .ui-ribbon__painel{display:none;position:absolute;top:100%;inset-inline:0;z-index:var(--ui-z-docked-bar, 600);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .35))}:host([recolhido]) .ui-ribbon--aberto .ui-ribbon__painel{display:block}:host([recolhido]) .ui-ribbon__aba--ativa:after{display:none}:host([compacto]) .ui-ribbon__grupos{min-height:0;padding-block:2px}:host([compacto]) .ui-ribbon__grupo-rotulo{display:none}:host([compacto]) .ui-ferr-btn--grande{min-width:44px}@media (max-width: 720px){.ui-ferr-btn--pequeno:has(.ui-ferr-btn__icone) .ui-ferr-btn__rotulo{display:none}.ui-ferr-btn--pequeno:has(.ui-ferr-btn__icone){min-width:28px;justify-content:center;padding:0 4px}}@media (pointer: coarse){.ui-ribbon__cabecalho{height:38px}.ui-ribbon__aba{height:36px}.ui-ribbon__aba--ativa,.ui-ribbon__aba--ativa:hover{height:38px}.ui-ferr-btn--pequeno{height:32px}.ui-ferr-btn--pequeno.ui-ferr-btn--so-icone{width:32px}.ui-ribbon__fixar{width:36px;height:32px}}@media (prefers-reduced-motion: reduce){.ui-ribbon__aba{transition:none}}@media (forced-colors: active){.ui-ribbon__aba--ativa:after,.ui-ribbon__aba--contextual:before{background:Highlight;forced-color-adjust:none}.ui-ribbon__aba--ativa,.ui-ribbon__aba--ativa:hover{box-shadow:none;border:1px solid CanvasText;border-bottom-color:Canvas}.ui-ribbon__aba:focus-visible,.ui-ribbon__fixar:focus-visible,.ui-ribbon__grupos .ui-ferr-btn:focus-visible{outline-color:Highlight}}', q = '.ui-ferr-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;padding:0;border:1px solid transparent;border-radius:var(--ui-raio-borda, 6px);background:transparent;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:.75rem;line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .12s ease,border-color .12s ease,color .12s ease}.ui-ferr-btn:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ferr-btn:active:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent)}.ui-ferr-btn:focus-visible{outline:2px solid transparent;outline-offset:2px;box-shadow:0 0 0 2px var(--ui-cor-fundo, #0b0b0d),0 0 0 4px var(--ui-cor-primaria, #00E08A)}.ui-ferr-btn:disabled{opacity:.4;cursor:not-allowed}.ui-ferr-btn--ativo{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent);border-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 55%,transparent)}.ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 28%,transparent)}.ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 36%,transparent)}.ui-ferr-btn.ui-ferr-btn--ativo:disabled{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));border-color:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-ferr-btn__icone{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.ui-ferr-btn__rotulo{white-space:nowrap}.ui-ferr-btn__caret{width:0;height:0;flex-shrink:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid currentColor;opacity:.7}.ui-ferr-menu{position:fixed;z-index:var(--ui-z-popover, 1050);display:flex;flex-direction:column;gap:1px;min-width:180px;max-height:calc(100vh - 8px);overflow-y:auto;padding:4px;box-sizing:border-box;background:var(--ui-cor-fundo-menu, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .35));font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #e1e1e6)}.ui-ferr-menu__item{position:relative;display:flex;align-items:center;gap:8px;width:100%;height:28px;padding:0 8px;box-sizing:border-box;border:0;border-radius:var(--ui-raio-sm, 4px);background:transparent;color:inherit;font:inherit;font-size:.75rem;text-align:start;cursor:pointer}.ui-ferr-menu__item:hover:not(:disabled){background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ferr-menu__item:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px;background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08))}.ui-ferr-menu__item:disabled{opacity:.4;cursor:not-allowed}.ui-ferr-menu__item--ativo,.ui-ferr-menu__item[aria-checked=true]{color:var(--ui-cor-primaria, #00E08A);font-weight:600}.ui-ferr-menu__item--ativo:after,.ui-ferr-menu__item[aria-checked=true]:after{content:"";flex-shrink:0;width:4px;height:8px;margin-inline-start:4px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg) translateY(-1px)}.ui-ferr-menu__icone{display:inline-flex;width:16px;justify-content:center}.ui-ferr-menu__rotulo{flex:1}.ui-ferr-menu__atalho{margin-inline-start:16px;color:var(--ui-cor-texto-secundario, #888899);font-size:.6875rem;font-variant-numeric:tabular-nums}.ui-ferr-menu__sep{height:1px;margin:3px 2px;background:var(--ui-cor-borda, rgba(255, 255, 255, .12))}@media (pointer: coarse){.ui-ferr-menu__item{height:36px}}@media (prefers-reduced-motion: reduce){.ui-ferr-btn{transition:none}}@media (forced-colors: active){.ui-ferr-btn:focus-visible,.ui-ferr-menu__item:focus-visible{outline:2px solid Highlight}.ui-ferr-btn--ativo{background:Highlight;color:HighlightText;border-color:ButtonText;forced-color-adjust:none}.ui-ferr-btn:disabled,.ui-ferr-menu__item:disabled{opacity:1;color:GrayText}.ui-ferr-menu{border-color:CanvasText}.ui-ferr-menu__item:hover:not(:disabled){background:Highlight;color:HighlightText}}';
75
+ function j(o, s) {
76
+ if (!o) return null;
77
77
  const t = document.createElement("ui-icone");
78
- if (t.setAttribute("tamanho", String(o)), a.trimStart().startsWith("<")) {
79
- const e = G(a);
78
+ if (t.setAttribute("tamanho", String(s)), o.trimStart().startsWith("<")) {
79
+ const e = U(o);
80
80
  if (!e) return null;
81
81
  t.appendChild(e);
82
82
  } else
83
- t.setAttribute("nome", a);
83
+ t.setAttribute("nome", o);
84
84
  return t;
85
85
  }
86
86
  const N = /* @__PURE__ */ new Set();
87
- function I(a) {
88
- return a.rotuloAcessivel ? a.rotuloAcessivel : a.rotulo ? a.rotulo : a.icone && !a.icone.trimStart().startsWith("<") ? a.icone : (N.has(a.id) || (N.add(a.id), console.warn(`[ui-barra-ferramentas] O item "${a.id}" não tem "rotulo" nem "rotuloAcessivel": o id será usado como nome acessível.`)), a.id);
87
+ function I(o) {
88
+ return o.rotuloAcessivel ? o.rotuloAcessivel : o.rotulo ? o.rotulo : o.icone && !o.icone.trimStart().startsWith("<") ? o.icone : (N.has(o.id) || (N.add(o.id), console.warn(`[ui-barra-ferramentas] O item "${o.id}" não tem "rotulo" nem "rotuloAcessivel": o id será usado como nome acessível.`)), o.id);
89
89
  }
90
- function W(a) {
91
- const o = I(a);
92
- return a.atalho ? `${o} (${a.atalho})` : o;
90
+ function X(o) {
91
+ const s = I(o);
92
+ return o.atalho ? `${s} (${o.atalho})` : s;
93
93
  }
94
- function C(a, o) {
94
+ function C(o, s) {
95
95
  const t = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set();
96
- a.forEach((i) => t.has(i) ? e.add(i) : t.add(i)), e.size && console.warn(`[ui-barra-ferramentas] ${o}: ids duplicados (${[...e].join(", ")}). Use ids únicos, senão atualizarItem() e os eventos podem atingir o item errado.`);
96
+ o.forEach((i) => t.has(i) ? e.add(i) : t.add(i)), e.size && console.warn(`[ui-barra-ferramentas] ${s}: ids duplicados (${[...e].join(", ")}). Use ids únicos, senão atualizarItem() e os eventos podem atingir o item errado.`);
97
97
  }
98
- function L(a, o = []) {
99
- for (const t of a)
100
- t.tipo !== "separador" && (o.push(t.id), t.filhos && L(t.filhos, o));
101
- return o;
98
+ function L(o, s = []) {
99
+ for (const t of o)
100
+ t.tipo !== "separador" && (s.push(t.id), t.filhos && L(t.filhos, s));
101
+ return s;
102
102
  }
103
- function A(a, o) {
104
- a.disabled = !!o.disabled;
105
- const t = o.tipo, e = t === "toggle" || t === "ferramenta";
106
- e ? a.setAttribute("aria-pressed", String(!!o.ativo)) : a.removeAttribute("aria-pressed"), a.classList.toggle("ui-ferr-btn--ativo", e && !!o.ativo);
103
+ function A(o, s) {
104
+ o.disabled = !!s.disabled;
105
+ const t = s.tipo, e = t === "toggle" || t === "ferramenta";
106
+ e ? o.setAttribute("aria-pressed", String(!!s.ativo)) : o.removeAttribute("aria-pressed"), o.classList.toggle("ui-ferr-btn--ativo", e && !!s.ativo);
107
107
  }
108
- function j(a, o, t) {
109
- var n;
108
+ function H(o, s, t) {
109
+ var a;
110
110
  const e = document.createElement("button");
111
- e.type = "button", e.className = `ui-ferr-btn ui-ferr-btn--${o}`, e.dataset.id = a.id, e.tabIndex = -1, e.setAttribute("aria-label", I(a)), a.atalho && e.setAttribute("aria-keyshortcuts", a.atalho), e.title = W(a);
112
- const i = B(a.icone, t);
111
+ e.type = "button", e.className = `ui-ferr-btn ui-ferr-btn--${s}`, e.dataset.id = o.id, e.tabIndex = -1, e.setAttribute("aria-label", I(o)), o.atalho && e.setAttribute("aria-keyshortcuts", o.atalho), e.title = X(o);
112
+ const i = j(o.icone, t);
113
113
  if (i) {
114
- const l = document.createElement("span");
115
- l.className = "ui-ferr-btn__icone", l.appendChild(i), e.appendChild(l);
114
+ const n = document.createElement("span");
115
+ n.className = "ui-ferr-btn__icone", n.appendChild(i), e.appendChild(n);
116
116
  }
117
- const r = !!((n = a.filhos) != null && n.length), s = o !== "paleta" && !a.somenteIcone && !!a.rotulo;
118
- if (o !== "paleta" && a.somenteIcone && e.classList.add("ui-ferr-btn--so-icone"), s) {
119
- const l = document.createElement("span");
120
- l.className = "ui-ferr-btn__rotulo", l.textContent = a.rotulo, e.appendChild(l);
117
+ const r = !!((a = o.filhos) != null && a.length), l = s !== "paleta" && !o.somenteIcone && !!o.rotulo;
118
+ if (s !== "paleta" && o.somenteIcone && e.classList.add("ui-ferr-btn--so-icone"), l) {
119
+ const n = document.createElement("span");
120
+ n.className = "ui-ferr-btn__rotulo", n.textContent = o.rotulo, e.appendChild(n);
121
121
  }
122
122
  if (r) {
123
- if (o === "paleta")
123
+ if (s === "paleta")
124
124
  e.classList.add("ui-ferr-btn--grupo");
125
125
  else {
126
- const l = document.createElement("span");
127
- l.className = "ui-ferr-btn__caret", e.appendChild(l);
126
+ const n = document.createElement("span");
127
+ n.className = "ui-ferr-btn__caret", e.appendChild(n);
128
128
  }
129
129
  e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", "false");
130
130
  }
131
- return A(e, a), e;
131
+ return A(e, o), e;
132
132
  }
133
- function m(a, o) {
134
- for (const t of a) {
135
- if (t.id === o) return t;
133
+ function g(o, s) {
134
+ for (const t of o) {
135
+ if (t.id === s) return t;
136
136
  if (t.filhos) {
137
- const e = m(t.filhos, o);
137
+ const e = g(t.filhos, s);
138
138
  if (e) return e;
139
139
  }
140
140
  }
141
141
  }
142
- function T(a) {
143
- const o = a.filter((t) => !t.disabled);
144
- a.forEach((t) => t.tabIndex = -1), o.length && (o[0].tabIndex = 0);
142
+ function T(o) {
143
+ const s = o.filter((t) => !t.disabled);
144
+ o.forEach((t) => t.tabIndex = -1), s.length && (s[0].tabIndex = 0);
145
145
  }
146
- function H(a) {
147
- const o = a.find((t) => t.tabIndex === 0 && !t.disabled);
148
- o ? a.forEach((t) => {
149
- t !== o && (t.tabIndex = -1);
150
- }) : T(a);
146
+ function B(o) {
147
+ const s = o.find((t) => t.tabIndex === 0 && !t.disabled);
148
+ s ? o.forEach((t) => {
149
+ t !== s && (t.tabIndex = -1);
150
+ }) : T(o);
151
151
  }
152
- function q(a, o) {
153
- const t = a.find((e) => e === o || e.contains(o));
154
- !t || t.disabled || a.forEach((e) => e.tabIndex = e === t ? 0 : -1);
152
+ function R(o, s) {
153
+ const t = o.find((e) => e === s || e.contains(s));
154
+ !t || t.disabled || o.forEach((e) => e.tabIndex = e === t ? 0 : -1);
155
155
  }
156
- function S(a, o, t, e) {
157
- const i = o.filter((l) => !l.disabled), r = i.length, s = i.findIndex((l) => l === a.target);
158
- if (r === 0 || s < 0) return !1;
159
- let n = s;
160
- if (t.includes(a.key)) n = (s - 1 + r) % r;
161
- else if (e.includes(a.key)) n = (s + 1) % r;
162
- else if (a.key === "Home") n = 0;
163
- else if (a.key === "End") n = r - 1;
156
+ function P(o, s, t, e) {
157
+ const i = s.filter((n) => !n.disabled), r = i.length, l = i.findIndex((n) => n === o.target);
158
+ if (r === 0 || l < 0) return !1;
159
+ let a = l;
160
+ if (t.includes(o.key)) a = (l - 1 + r) % r;
161
+ else if (e.includes(o.key)) a = (l + 1) % r;
162
+ else if (o.key === "Home") a = 0;
163
+ else if (o.key === "End") a = r - 1;
164
164
  else return !1;
165
- return a.preventDefault(), o.forEach((l) => l.tabIndex = -1), i[n].tabIndex = 0, i[n].focus(), !0;
165
+ return o.preventDefault(), s.forEach((n) => n.tabIndex = -1), i[a].tabIndex = 0, i[a].focus(), !0;
166
166
  }
167
167
  let J = 0;
168
- function O(a, o, t, e, i = {}) {
169
- var D;
170
- const r = i.lado ?? "baixo", s = new P(), n = document.createElement("div");
171
- n.className = "ui-ferr-menu", n.setAttribute("role", "menu"), n.id = `ui-ferr-menu-${++J}`, n.setAttribute("aria-label", o.getAttribute("aria-label") || "Menu"), o.setAttribute("aria-controls", n.id);
172
- const l = [];
173
- let d = !1;
174
- const h = () => {
175
- var c;
176
- d || (d = !0, o.removeAttribute("aria-controls"), s.cleanup(), n.remove(), (c = i.onFechar) == null || c.call(i));
168
+ function O(o, s, t, e, i = {}) {
169
+ var F;
170
+ const r = i.lado ?? "baixo", l = new S(), a = document.createElement("div");
171
+ a.className = "ui-ferr-menu", a.setAttribute("role", "menu"), a.id = `ui-ferr-menu-${++J}`, a.setAttribute("aria-label", s.getAttribute("aria-label") || "Menu"), s.setAttribute("aria-controls", a.id);
172
+ const n = [];
173
+ let h = !1;
174
+ const u = () => {
175
+ var d;
176
+ h || (h = !0, s.removeAttribute("aria-controls"), l.cleanup(), a.remove(), (d = i.onFechar) == null || d.call(i));
177
177
  };
178
- t.forEach((c) => {
179
- if (c.tipo === "separador") {
180
- const g = document.createElement("div");
181
- g.className = "ui-ferr-menu__sep", g.setAttribute("role", "separator"), n.appendChild(g);
178
+ t.forEach((d) => {
179
+ if (d.tipo === "separador") {
180
+ const v = document.createElement("div");
181
+ v.className = "ui-ferr-menu__sep", v.setAttribute("role", "separator"), a.appendChild(v);
182
182
  return;
183
183
  }
184
184
  const b = document.createElement("button");
185
185
  b.type = "button", b.className = "ui-ferr-menu__item";
186
- const y = c.tipo ?? i.tipoPadrao ?? "botao";
187
- y === "toggle" ? (b.setAttribute("role", "menuitemcheckbox"), b.setAttribute("aria-checked", String(!!c.ativo))) : y === "ferramenta" ? (b.setAttribute("role", "menuitemradio"), b.setAttribute("aria-checked", String(!!c.ativo))) : b.setAttribute("role", "menuitem"), b.dataset.id = c.id, b.disabled = !!c.disabled, c.atalho && b.setAttribute("aria-keyshortcuts", c.atalho), c.ativo && b.classList.add("ui-ferr-menu__item--ativo");
188
- const x = document.createElement("span");
189
- x.className = "ui-ferr-menu__icone";
190
- const F = B(c.icone, 14);
191
- F && x.appendChild(F), b.appendChild(x);
186
+ const y = d.tipo ?? i.tipoPadrao ?? "botao";
187
+ y === "toggle" ? (b.setAttribute("role", "menuitemcheckbox"), b.setAttribute("aria-checked", String(!!d.ativo))) : y === "ferramenta" ? (b.setAttribute("role", "menuitemradio"), b.setAttribute("aria-checked", String(!!d.ativo))) : b.setAttribute("role", "menuitem"), b.dataset.id = d.id, b.disabled = !!d.disabled, d.atalho && b.setAttribute("aria-keyshortcuts", d.atalho), d.ativo && b.classList.add("ui-ferr-menu__item--ativo");
188
+ const _ = document.createElement("span");
189
+ _.className = "ui-ferr-menu__icone";
190
+ const $ = j(d.icone, 14);
191
+ $ && _.appendChild($), b.appendChild(_);
192
192
  const k = document.createElement("span");
193
- if (k.className = "ui-ferr-menu__rotulo", k.textContent = I(c), b.appendChild(k), c.atalho) {
194
- const g = document.createElement("span");
195
- g.className = "ui-ferr-menu__atalho", g.textContent = c.atalho, b.appendChild(g);
193
+ if (k.className = "ui-ferr-menu__rotulo", k.textContent = I(d), b.appendChild(k), d.atalho) {
194
+ const v = document.createElement("span");
195
+ v.className = "ui-ferr-menu__atalho", v.textContent = d.atalho, b.appendChild(v);
196
196
  }
197
- b.addEventListener("click", (g) => {
198
- g.stopPropagation(), h(), o.focus(), e(c);
199
- }), l.push(b), n.appendChild(b);
200
- }), a.appendChild(n);
201
- const p = o.getBoundingClientRect(), _ = getComputedStyle(o).direction === "rtl", f = n.getBoundingClientRect();
202
- let v = r === "direita" ? p.top : p.bottom + 2, w = r === "direita" ? _ ? p.left - f.width - 4 : p.right + 4 : _ ? p.right - f.width : p.left;
203
- f.width && w + f.width > window.innerWidth - 4 && (w = Math.max(4, window.innerWidth - f.width - 4)), w < 4 && (w = 4), f.height && v + f.height > window.innerHeight - 4 && (v = Math.max(4, window.innerHeight - f.height - 4)), n.style.top = `${v}px`, n.style.left = `${w}px`;
204
- const E = () => l.filter((c) => !c.disabled);
205
- return s.add(n, "keydown", (c) => {
206
- const b = E(), y = b.findIndex((x) => x === c.target);
207
- if (c.key === "Escape")
208
- c.preventDefault(), c.stopPropagation(), h(), o.focus();
209
- else if (c.key === "Tab")
210
- h();
211
- else if (b.length && (c.key === "ArrowDown" || c.key === "ArrowUp")) {
212
- c.preventDefault();
213
- const x = c.key === "ArrowDown" ? 1 : -1;
214
- b[(y + x + b.length) % b.length].focus();
215
- } else b.length && c.key === "Home" ? (c.preventDefault(), b[0].focus()) : b.length && c.key === "End" && (c.preventDefault(), b[b.length - 1].focus());
216
- }), s.add(document, "pointerdown", (c) => {
217
- const b = c.composedPath();
218
- !b.includes(n) && !b.includes(o) && h();
219
- }, !0), s.add(window, "resize", h), s.add(window, "scroll", (c) => {
220
- c.target instanceof Node && n.contains(c.target) || h();
221
- }, !0), s.add(window, "blur", h), i.focar && ((D = E()[0]) == null || D.focus()), { elemento: n, ancora: o, fechar: h, focarPrimeiro: () => {
222
- var c;
223
- return (c = E()[0]) == null ? void 0 : c.focus();
197
+ b.addEventListener("click", (v) => {
198
+ v.stopPropagation(), u(), s.focus(), e(d);
199
+ }), n.push(b), a.appendChild(b);
200
+ }), o.appendChild(a);
201
+ const p = s.getBoundingClientRect(), m = getComputedStyle(s).direction === "rtl", f = a.getBoundingClientRect();
202
+ let x = r === "direita" ? p.top : p.bottom + 2, w = r === "direita" ? m ? p.left - f.width - 4 : p.right + 4 : m ? p.right - f.width : p.left;
203
+ f.width && w + f.width > window.innerWidth - 4 && (w = Math.max(4, window.innerWidth - f.width - 4)), w < 4 && (w = 4), f.height && x + f.height > window.innerHeight - 4 && (x = Math.max(4, window.innerHeight - f.height - 4)), a.style.top = `${x}px`, a.style.left = `${w}px`;
204
+ const E = () => n.filter((d) => !d.disabled);
205
+ return l.add(a, "keydown", (d) => {
206
+ const b = E(), y = b.findIndex((_) => _ === d.target);
207
+ if (d.key === "Escape")
208
+ d.preventDefault(), d.stopPropagation(), u(), s.focus();
209
+ else if (d.key === "Tab")
210
+ u();
211
+ else if (b.length && (d.key === "ArrowDown" || d.key === "ArrowUp")) {
212
+ d.preventDefault();
213
+ const _ = d.key === "ArrowDown" ? 1 : -1;
214
+ b[(y + _ + b.length) % b.length].focus();
215
+ } else b.length && d.key === "Home" ? (d.preventDefault(), b[0].focus()) : b.length && d.key === "End" && (d.preventDefault(), b[b.length - 1].focus());
216
+ }), l.add(document, "pointerdown", (d) => {
217
+ const b = d.composedPath();
218
+ !b.includes(a) && !b.includes(s) && u();
219
+ }, !0), l.add(window, "resize", u), l.add(window, "scroll", (d) => {
220
+ d.target instanceof Node && a.contains(d.target) || u();
221
+ }, !0), l.add(window, "blur", u), i.focar && ((F = E()[0]) == null || F.focus()), { elemento: a, ancora: s, fechar: u, focarPrimeiro: () => {
222
+ var d;
223
+ return (d = E()[0]) == null ? void 0 : d.focus();
224
224
  } };
225
225
  }
226
- const Q = 3;
227
- function Z({ aba: a, ativa: o, idBotao: t, idPainel: e }) {
228
- const i = document.createElement("button");
229
- return i.type = "button", i.className = "ui-ribbon__aba", i.setAttribute("role", "tab"), i.dataset.id = a.id, i.id = t, o && i.setAttribute("aria-controls", e), i.textContent = a.rotulo, i.tabIndex = o ? 0 : -1, i.setAttribute("aria-selected", String(o)), i.classList.toggle("ui-ribbon__aba--ativa", o), i.classList.toggle("ui-ribbon__aba--contextual", !!a.contextual), i;
230
- }
231
- function tt(a, o) {
232
- const t = document.createElement("div");
233
- t.className = "ui-ribbon__grupo", t.setAttribute("role", "group"), t.setAttribute("aria-label", a.rotulo), t.dataset.id = a.id;
234
- const e = document.createElement("div");
235
- e.className = "ui-ribbon__grupo-itens";
236
- let i = null, r = 0;
237
- const s = () => {
238
- i && e.appendChild(i), i = null, r = 0;
239
- };
240
- a.itens.forEach((l) => {
241
- if (l.tipo === "separador") {
242
- s();
243
- const d = document.createElement("div");
244
- d.className = "ui-ribbon__separador", d.setAttribute("role", "separator"), e.appendChild(d);
245
- } else l.tamanho === "grande" ? (s(), e.appendChild(o(l, "grande", 24))) : (i || (i = document.createElement("div"), i.className = "ui-ribbon__coluna"), i.appendChild(o(l, "pequeno", 16)), ++r === Q && s());
246
- }), s();
247
- const n = document.createElement("div");
248
- return n.className = "ui-ribbon__grupo-rotulo", n.textContent = a.rotulo, t.appendChild(e), t.appendChild(n), t;
249
- }
250
- function et(a, o, t, e) {
251
- if (o < 0 || t <= 0) return null;
252
- const [i, r] = e ? ["ArrowLeft", "ArrowRight"] : ["ArrowRight", "ArrowLeft"];
253
- return a === i ? { tipo: "ir-para", indice: (o + 1) % t } : a === r ? { tipo: "ir-para", indice: (o - 1 + t) % t } : a === "Home" ? { tipo: "ir-para", indice: 0 } : a === "End" ? { tipo: "ir-para", indice: t - 1 } : a === "ArrowDown" ? { tipo: "descer" } : null;
254
- }
255
- let it = 0;
256
- class rt extends M {
226
+ let Q = 0;
227
+ class Z extends M {
257
228
  constructor() {
258
229
  super();
259
- u(this, "rootElement");
260
- u(this, "abasElement");
261
- u(this, "gruposElement");
262
- u(this, "painelElement");
263
- u(this, "fixarElement");
264
- u(this, "uid", `ui-ribbon-${++it}`);
265
- u(this, "_abaPendente", "");
266
- u(this, "_pronto", !1);
267
- u(this, "_abas", []);
268
- u(this, "_abaAtiva", "");
269
- u(this, "menu", null);
270
- u(this, "listeners", new P());
271
- u(this, "handleFocusInGrupos", (t) => q(this.botoesPainel(), t.target));
230
+ c(this, "rootElement");
231
+ c(this, "abasElement");
232
+ c(this, "gruposElement");
233
+ c(this, "painelElement");
234
+ c(this, "fixarElement");
235
+ c(this, "uid", `ui-ribbon-${++Q}`);
236
+ c(this, "_abaPendente", "");
237
+ c(this, "_pronto", !1);
238
+ c(this, "_abas", []);
239
+ c(this, "_abaAtiva", "");
240
+ c(this, "menu", null);
241
+ c(this, "listeners", new S());
242
+ c(this, "handleFocusInGrupos", (t) => R(this.botoesPainel(), t.target));
272
243
  /* ---------- Interação ---------- */
273
- u(this, "handleClickAbas", (t) => {
244
+ c(this, "handleClickAbas", (t) => {
274
245
  const e = t.target.closest(".ui-ribbon__aba");
275
246
  e != null && e.dataset.id && (this.selecionarAba(e.dataset.id), this.recolhido && this.rootElement.classList.toggle("ui-ribbon--aberto"));
276
247
  });
277
- u(this, "handleClickFixar", () => {
248
+ c(this, "handleClickFixar", () => {
278
249
  this.recolhido = !this.recolhido;
279
250
  });
280
- u(this, "handleDblClickAbas", (t) => {
251
+ c(this, "handleDblClickAbas", (t) => {
281
252
  t.target.closest(".ui-ribbon__aba") && (this.recolhido = !this.recolhido);
282
253
  });
283
- u(this, "handleKeyDownAbas", (t) => {
284
- var s, n;
285
- const e = Array.from(this.abasElement.querySelectorAll(".ui-ribbon__aba")), i = et(t.key, e.findIndex((l) => l === t.target), e.length, this.rtl);
286
- if (!i) return;
287
- if (t.preventDefault(), i.tipo === "descer") {
288
- this.recolhido && this.rootElement.classList.add("ui-ribbon--aberto"), (s = this.botoesPainel().find((l) => !l.disabled)) == null || s.focus();
254
+ c(this, "handleKeyDownAbas", (t) => {
255
+ var h, u;
256
+ const e = Array.from(this.abasElement.querySelectorAll(".ui-ribbon__aba")), i = e.findIndex((p) => p === t.target);
257
+ if (i < 0) return;
258
+ let r = i;
259
+ const [l, a] = this.rtl ? ["ArrowLeft", "ArrowRight"] : ["ArrowRight", "ArrowLeft"];
260
+ if (t.key === l) r = (i + 1) % e.length;
261
+ else if (t.key === a) r = (i - 1 + e.length) % e.length;
262
+ else if (t.key === "Home") r = 0;
263
+ else if (t.key === "End") r = e.length - 1;
264
+ else if (t.key === "ArrowDown") {
265
+ t.preventDefault(), this.recolhido && this.rootElement.classList.add("ui-ribbon--aberto"), (h = this.botoesPainel().find((p) => !p.disabled)) == null || h.focus();
289
266
  return;
290
- }
291
- const r = e[i.indice].dataset.id;
292
- r && this.selecionarAba(r), (n = this.abasElement.querySelector(`.ui-ribbon__aba[data-id="${CSS.escape(r ?? "")}"]`)) == null || n.focus();
267
+ } else return;
268
+ t.preventDefault();
269
+ const n = e[r].dataset.id;
270
+ n && this.selecionarAba(n), (u = this.abasElement.querySelector(`.ui-ribbon__aba[data-id="${CSS.escape(n ?? "")}"]`)) == null || u.focus();
293
271
  });
294
- u(this, "handleClickGrupos", (t) => {
272
+ c(this, "handleClickGrupos", (t) => {
295
273
  const e = t.target.closest(".ui-ferr-btn");
296
274
  e != null && e.dataset.id && this.acionar(e, t.detail === 0);
297
275
  });
298
- u(this, "handleKeyDownGrupos", (t) => {
276
+ c(this, "handleKeyDownGrupos", (t) => {
299
277
  var r;
300
278
  const e = this.botoesPainel();
301
- if (this.rtl ? S(t, e, ["ArrowRight"], ["ArrowLeft"]) : S(t, e, ["ArrowLeft"], ["ArrowRight"])) return;
279
+ if (this.rtl ? P(t, e, ["ArrowRight"], ["ArrowLeft"]) : P(t, e, ["ArrowLeft"], ["ArrowRight"])) return;
302
280
  const i = t.target instanceof HTMLButtonElement ? t.target : null;
303
281
  (i == null ? void 0 : i.getAttribute("aria-haspopup")) === "menu" && t.key === "ArrowDown" && (t.preventDefault(), ((r = this.menu) == null ? void 0 : r.ancora) === i ? this.menu.focarPrimeiro() : this.acionar(i, !0));
304
282
  });
305
- u(this, "handleEscape", (t) => {
283
+ c(this, "handleEscape", (t) => {
306
284
  t.key === "Escape" && !this.menu && this.rootElement.classList.remove("ui-ribbon--aberto");
307
285
  });
308
- u(this, "handlePointerDownFora", (t) => {
286
+ c(this, "handlePointerDownFora", (t) => {
309
287
  !this.recolhido || !this.rootElement.classList.contains("ui-ribbon--aberto") || t.composedPath().includes(this) || this.rootElement.classList.remove("ui-ribbon--aberto");
310
288
  });
311
289
  const t = this.attachShadow({ mode: "open" });
312
290
  t.innerHTML = `
313
- <style>${R}${Y}</style>
291
+ <style>${q}${W}</style>
314
292
  <div class="ui-ribbon">
315
293
  <div class="ui-ribbon__cabecalho">
316
294
  <div class="ui-ribbon__abas" role="tablist"></div>
@@ -394,27 +372,27 @@ class rt extends M {
394
372
  ));
395
373
  }
396
374
  definirAbaVisivel(t, e) {
397
- const i = this._abas.find((n) => n.id === t);
375
+ const i = this._abas.find((a) => a.id === t);
398
376
  if (!i) return;
399
377
  const r = this._abaAtiva;
400
378
  i.oculta = !e, !e && r === t && (this._abaAtiva = ""), this.renderizar();
401
- const s = this._abas.find((n) => n.id === this._abaAtiva);
402
- !e && r === t && s && this.dispatchEvent(
403
- new CustomEvent("ui-aba-change", { detail: { id: s.id, aba: s }, bubbles: !0, composed: !0 })
379
+ const l = this._abas.find((a) => a.id === this._abaAtiva);
380
+ !e && r === t && l && this.dispatchEvent(
381
+ new CustomEvent("ui-aba-change", { detail: { id: l.id, aba: l }, bubbles: !0, composed: !0 })
404
382
  );
405
383
  }
406
384
  /** Atualiza um item (estado ou aparência) sem precisar recriar as abas. */
407
385
  atualizarItem(t, e) {
408
- const i = this._abas.flatMap((d) => d.grupos.flatMap((h) => h.itens)), r = m(i, t);
386
+ const i = this._abas.flatMap((h) => h.grupos.flatMap((u) => u.itens)), r = g(i, t);
409
387
  if (!r) {
410
388
  console.warn(`[ui-ribbon] atualizarItem("${t}"): item não encontrado.`);
411
389
  return;
412
390
  }
413
391
  Object.assign(r, e);
414
- const s = this._abas.find((d) => d.id === this._abaAtiva);
415
- if (!s || !m(s.grupos.flatMap((d) => d.itens), t)) return;
416
- const n = Object.keys(e).every((d) => d === "ativo" || d === "disabled"), l = this.gruposElement.querySelector(`.ui-ferr-btn[data-id="${CSS.escape(t)}"]`);
417
- n ? l && (A(l, this.efetivo(r)), H(this.botoesPainel())) : this.comFoco(() => this.renderizarPainel());
392
+ const l = this._abas.find((h) => h.id === this._abaAtiva);
393
+ if (!l || !g(l.grupos.flatMap((h) => h.itens), t)) return;
394
+ const a = Object.keys(e).every((h) => h === "ativo" || h === "disabled"), n = this.gruposElement.querySelector(`.ui-ferr-btn[data-id="${CSS.escape(t)}"]`);
395
+ a ? n && (A(n, this.efetivo(r)), B(this.botoesPainel())) : this.comFoco(() => this.renderizarPainel());
418
396
  }
419
397
  efetivo(t) {
420
398
  var e;
@@ -445,12 +423,8 @@ class rt extends M {
445
423
  }
446
424
  renderizarAbas() {
447
425
  this.abasElement.innerHTML = "", this.abasVisiveis().forEach((t) => {
448
- this.abasElement.appendChild(Z({
449
- aba: t,
450
- ativa: t.id === this._abaAtiva,
451
- idBotao: this.idAba(t.id),
452
- idPainel: this.painelElement.id
453
- }));
426
+ const e = t.id === this._abaAtiva, i = document.createElement("button");
427
+ i.type = "button", i.className = "ui-ribbon__aba", i.setAttribute("role", "tab"), i.dataset.id = t.id, i.id = this.idAba(t.id), e && i.setAttribute("aria-controls", this.painelElement.id), i.textContent = t.rotulo, i.tabIndex = e ? 0 : -1, i.setAttribute("aria-selected", String(e)), i.classList.toggle("ui-ribbon__aba--ativa", e), i.classList.toggle("ui-ribbon__aba--contextual", !!t.contextual), this.abasElement.appendChild(i);
454
428
  });
455
429
  }
456
430
  idAba(t) {
@@ -463,10 +437,29 @@ class rt extends M {
463
437
  this.painelElement.removeAttribute("aria-labelledby");
464
438
  return;
465
439
  }
466
- this.painelElement.setAttribute("aria-labelledby", this.idAba(t.id)), t.grupos.forEach((e) => this.gruposElement.appendChild(tt(e, (i, r, s) => this.criarBotao(i, r, s)))), T(this.botoesPainel());
440
+ this.painelElement.setAttribute("aria-labelledby", this.idAba(t.id)), t.grupos.forEach((e) => this.gruposElement.appendChild(this.criarGrupo(e))), T(this.botoesPainel());
441
+ }
442
+ criarGrupo(t) {
443
+ const e = document.createElement("div");
444
+ e.className = "ui-ribbon__grupo", e.setAttribute("role", "group"), e.setAttribute("aria-label", t.rotulo), e.dataset.id = t.id;
445
+ const i = document.createElement("div");
446
+ i.className = "ui-ribbon__grupo-itens";
447
+ let r = null, l = 0;
448
+ const a = () => {
449
+ r && i.appendChild(r), r = null, l = 0;
450
+ };
451
+ t.itens.forEach((h) => {
452
+ if (h.tipo === "separador") {
453
+ a();
454
+ const u = document.createElement("div");
455
+ u.className = "ui-ribbon__separador", u.setAttribute("role", "separator"), i.appendChild(u);
456
+ } else h.tamanho === "grande" ? (a(), i.appendChild(this.criarBotao(h, "grande", 24))) : (r || (r = document.createElement("div"), r.className = "ui-ribbon__coluna"), r.appendChild(this.criarBotao(h, "pequeno", 16)), ++l === 3 && a());
457
+ }), a();
458
+ const n = document.createElement("div");
459
+ return n.className = "ui-ribbon__grupo-rotulo", n.textContent = t.rotulo, e.appendChild(i), e.appendChild(n), e;
467
460
  }
468
461
  criarBotao(t, e, i) {
469
- return j(this.efetivo(t), e, i);
462
+ return H(this.efetivo(t), e, i);
470
463
  }
471
464
  botoesPainel() {
472
465
  return Array.from(this.gruposElement.querySelectorAll(".ui-ferr-btn"));
@@ -475,34 +468,34 @@ class rt extends M {
475
468
  return getComputedStyle(this).direction === "rtl";
476
469
  }
477
470
  acionar(t, e) {
478
- var s;
479
- const i = this._abas.find((n) => n.id === this._abaAtiva), r = i && m(i.grupos.flatMap((n) => n.itens), t.dataset.id);
471
+ var l;
472
+ const i = this._abas.find((a) => a.id === this._abaAtiva), r = i && g(i.grupos.flatMap((a) => a.itens), t.dataset.id);
480
473
  if (!(!r || r.disabled)) {
481
- if ((s = r.filhos) != null && s.length) {
474
+ if ((l = r.filhos) != null && l.length) {
482
475
  this.alternarMenu(t, r, e);
483
476
  return;
484
477
  }
485
478
  if (r.tipo === "toggle") {
486
- const n = r.ativo;
487
- r.ativo = !n, A(t, r), this.emitir(r) || (r.ativo = n, A(t, r));
479
+ const a = r.ativo;
480
+ r.ativo = !a, A(t, r), this.emitir(r) || (r.ativo = a, A(t, r));
488
481
  } else
489
482
  this.emitir(r);
490
483
  this.rootElement.classList.remove("ui-ribbon--aberto");
491
484
  }
492
485
  }
493
486
  alternarMenu(t, e, i) {
494
- var s;
495
- const r = ((s = this.menu) == null ? void 0 : s.ancora) === t;
487
+ var l;
488
+ const r = ((l = this.menu) == null ? void 0 : l.ancora) === t;
496
489
  this.fecharMenu(), !r && (t.setAttribute("aria-expanded", "true"), this.menu = O(
497
490
  this.shadowRoot,
498
491
  t,
499
492
  e.filhos,
500
- (n) => {
501
- if (n.tipo === "toggle") {
502
- const l = n.ativo;
503
- n.ativo = !l, this.emitir(n, e) || (n.ativo = l);
493
+ (a) => {
494
+ if (a.tipo === "toggle") {
495
+ const n = a.ativo;
496
+ a.ativo = !n, this.emitir(a, e) || (a.ativo = n);
504
497
  } else
505
- this.emitir(n, e);
498
+ this.emitir(a, e);
506
499
  this.rootElement.classList.remove("ui-ribbon--aberto");
507
500
  },
508
501
  {
@@ -530,121 +523,98 @@ class rt extends M {
530
523
  );
531
524
  }
532
525
  }
533
- z("ui-ribbon", rt);
534
- const at = ':host{display:inline-flex;flex-direction:column;max-width:100%;max-height:100%;vertical-align:top;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #e1e1e6)}.ui-paleta{--ui-paleta-btn: 34px;--ui-paleta-padding: 4px;--ui-paleta-raio: var(--ui-paleta-raio-borda, 10px);--ui-paleta-btn-raio: var(--ui-paleta-raio-botao, max(2px, calc(var(--ui-paleta-raio) - var(--ui-paleta-padding))));display:flex;flex-direction:column;align-items:center;gap:2px;padding:var(--ui-paleta-padding);box-sizing:border-box;background:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-paleta-raio);-webkit-user-select:none;user-select:none;min-width:0;min-height:0;max-width:100%;overflow:auto;scrollbar-width:thin}.ui-paleta--horizontal{flex-direction:row}.ui-paleta--sm{--ui-paleta-btn: 28px;--ui-paleta-raio: var(--ui-paleta-raio-borda, 8px)}.ui-paleta--lg{--ui-paleta-btn: 42px;--ui-paleta-raio: var(--ui-paleta-raio-borda, 12px)}.ui-paleta--cols-2{display:grid;grid-template-columns:repeat(2,var(--ui-paleta-btn));justify-content:center}.ui-paleta--cols-2 .ui-paleta__sep{grid-column:1 / -1}.ui-ferr-btn--grupo:after{content:"";position:absolute;inset-inline-end:3px;bottom:3px;width:0;height:0;border-inline-start:6px solid transparent;border-bottom:6px solid currentColor;opacity:.8;pointer-events:none;transition:opacity .12s ease,transform .12s ease}.ui-ferr-btn--grupo:hover:after,.ui-ferr-btn--grupo:focus-visible:after,.ui-ferr-btn--grupo[aria-expanded=true]:after{opacity:1;transform:scale(1.2);transform-origin:bottom right}.ui-paleta__sep{grid-column:1 / -1}.ui-paleta .ui-ferr-btn{width:var(--ui-paleta-btn);height:var(--ui-paleta-btn);border-radius:var(--ui-paleta-btn-raio)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo,.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled),.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:var(--ui-cor-primaria, #00E08A);border-color:transparent;color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 86%,#fff)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 80%,#000)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:disabled{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:inherit}.ui-ferr-btn--grupo:after{content:"";position:absolute;right:3px;bottom:3px;width:0;height:0;border-left:5px solid transparent;border-bottom:5px solid currentColor;opacity:.7;pointer-events:none}.ui-paleta__sep{width:70%;height:1px;margin:3px 0;background:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-paleta--horizontal .ui-paleta__sep{width:1px;height:70%;margin:0 3px}@media (pointer: coarse){.ui-paleta{--ui-paleta-btn: 40px}.ui-paleta--sm{--ui-paleta-btn: 36px}.ui-paleta--lg{--ui-paleta-btn: 48px}}@media (prefers-reduced-motion: reduce){.ui-ferr-btn--grupo:after{transition:none}}@media (forced-colors: active){.ui-paleta{border-color:CanvasText}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo,.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled),.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:Highlight;color:HighlightText;border-color:ButtonText;forced-color-adjust:none}.ui-paleta__sep{background:CanvasText}}', ot = 380, nt = 8, st = 50;
535
- class lt {
536
- constructor() {
537
- u(this, "timer");
538
- u(this, "timerSupressao");
539
- u(this, "inicio", null);
540
- u(this, "suprimir", !1);
541
- }
542
- /** Começa a contar; `aoDisparar` roda se o ponteiro ficar parado até `TEMPO_PRESSAO_LONGA_MS`. */
543
- iniciar(o, t, e) {
544
- this.cancelar(), window.clearTimeout(this.timerSupressao), this.inicio = { x: o, y: t }, this.timer = window.setTimeout(() => {
545
- this.suprimir = !0, e();
546
- }, ot);
547
- }
548
- /** Arrastar/rolar com o dedo cancela o clique longo. */
549
- mover(o, t) {
550
- this.timer === void 0 || !this.inicio || Math.hypot(o - this.inicio.x, t - this.inicio.y) > nt && this.cancelar();
551
- }
552
- /** Fim do gesto: cancela a contagem e, se o flyout abriu, descarta a supressão logo após o `click` residual. */
553
- fim() {
554
- this.cancelar(), this.suprimir && (window.clearTimeout(this.timerSupressao), this.timerSupressao = window.setTimeout(() => {
555
- this.suprimir = !1;
556
- }, st));
557
- }
558
- cancelar() {
559
- this.timer !== void 0 && (window.clearTimeout(this.timer), this.timer = void 0), this.inicio = null;
560
- }
561
- /** `true` (uma única vez) se o próximo `click` deve ser ignorado por ser o resíduo de uma pressão longa. */
562
- consumirSupressao() {
563
- return this.suprimir ? (this.suprimir = !1, window.clearTimeout(this.timerSupressao), !0) : !1;
564
- }
565
- destruir() {
566
- this.cancelar(), window.clearTimeout(this.timerSupressao), this.suprimir = !1;
567
- }
568
- }
569
- const ut = /* @__PURE__ */ new Set(["textbox", "searchbox", "combobox", "spinbutton"]);
570
- function ct(a) {
571
- const o = a[0];
572
- return o && (/^(INPUT|TEXTAREA|SELECT)$/.test(o.tagName) || o.isContentEditable) ? !0 : a.some((t) => {
573
- var r, s;
574
- const e = t, i = (r = e.getAttribute) == null ? void 0 : r.call(e, "role");
575
- return ((s = e.getAttribute) == null ? void 0 : s.call(e, "aria-modal")) === "true" || !!i && ut.has(i);
576
- });
577
- }
578
- function dt(a, o, t, e) {
579
- const i = (a || "").toUpperCase();
580
- if (i.length !== 1) return null;
581
- const r = o.filter((l) => {
582
- var d;
583
- return !l.disabled && ((d = l.atalho) == null ? void 0 : d.toUpperCase()) === i;
584
- });
585
- if (r.length === 0) return null;
586
- let s = r[0];
587
- if (r.length > 1) {
588
- const l = r.findIndex((d) => d.id === e);
589
- s = r[(l + 1) % r.length];
590
- }
591
- const n = t.find((l) => {
592
- var d;
593
- return (d = l.filhos) == null ? void 0 : d.some((h) => h.id === s.id);
594
- });
595
- return { alvo: s, pai: n };
596
- }
597
- const ht = { sm: 16, md: 18, lg: 22 };
598
- class bt extends M {
526
+ z("ui-ribbon", Z);
527
+ const tt = ':host{display:inline-flex;flex-direction:column;max-width:100%;max-height:100%;vertical-align:top;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #e1e1e6)}.ui-paleta{--ui-paleta-btn: 34px;--ui-paleta-padding: 4px;--ui-paleta-raio: var(--ui-paleta-raio-borda, 10px);--ui-paleta-btn-raio: var(--ui-paleta-raio-botao, max(2px, calc(var(--ui-paleta-raio) - var(--ui-paleta-padding))));display:flex;flex-direction:column;align-items:center;gap:2px;padding:var(--ui-paleta-padding);box-sizing:border-box;background:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-paleta-raio);-webkit-user-select:none;user-select:none;min-width:0;min-height:0;max-width:100%;overflow:auto;scrollbar-width:thin}.ui-paleta--horizontal{flex-direction:row}.ui-paleta--sm{--ui-paleta-btn: 28px;--ui-paleta-raio: var(--ui-paleta-raio-borda, 8px)}.ui-paleta--lg{--ui-paleta-btn: 42px;--ui-paleta-raio: var(--ui-paleta-raio-borda, 12px)}.ui-paleta--cols-2{display:grid;grid-template-columns:repeat(2,var(--ui-paleta-btn));justify-content:center}.ui-paleta--cols-2 .ui-paleta__sep{grid-column:1 / -1}.ui-ferr-btn--grupo:after{content:"";position:absolute;inset-inline-end:3px;bottom:3px;width:0;height:0;border-inline-start:6px solid transparent;border-bottom:6px solid currentColor;opacity:.8;pointer-events:none;transition:opacity .12s ease,transform .12s ease}.ui-ferr-btn--grupo:hover:after,.ui-ferr-btn--grupo:focus-visible:after,.ui-ferr-btn--grupo[aria-expanded=true]:after{opacity:1;transform:scale(1.2);transform-origin:bottom right}.ui-paleta__sep{grid-column:1 / -1}.ui-paleta .ui-ferr-btn{width:var(--ui-paleta-btn);height:var(--ui-paleta-btn);border-radius:var(--ui-paleta-btn-raio)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo,.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled),.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:var(--ui-cor-primaria, #00E08A);border-color:transparent;color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 86%,#fff)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 80%,#000)}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:disabled{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:inherit}.ui-ferr-btn--grupo:after{content:"";position:absolute;right:3px;bottom:3px;width:0;height:0;border-left:5px solid transparent;border-bottom:5px solid currentColor;opacity:.7;pointer-events:none}.ui-paleta__sep{width:70%;height:1px;margin:3px 0;background:var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-paleta--horizontal .ui-paleta__sep{width:1px;height:70%;margin:0 3px}@media (pointer: coarse){.ui-paleta{--ui-paleta-btn: 40px}.ui-paleta--sm{--ui-paleta-btn: 36px}.ui-paleta--lg{--ui-paleta-btn: 48px}}@media (prefers-reduced-motion: reduce){.ui-ferr-btn--grupo:after{transition:none}}@media (forced-colors: active){.ui-paleta{border-color:CanvasText}.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo,.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:hover:not(:disabled),.ui-paleta .ui-ferr-btn.ui-ferr-btn--ativo:active:not(:disabled){background:Highlight;color:HighlightText;border-color:ButtonText;forced-color-adjust:none}.ui-paleta__sep{background:CanvasText}}', et = 380, it = 8, rt = 50, at = { sm: 16, md: 18, lg: 22 };
528
+ class ot extends M {
599
529
  constructor() {
600
530
  super();
601
- u(this, "rootElement");
602
- u(this, "_ferramentas", []);
603
- u(this, "_ativo", "");
604
- u(this, "_pendente", "");
605
- u(this, "visiveis", /* @__PURE__ */ new Map());
531
+ c(this, "rootElement");
532
+ c(this, "_ferramentas", []);
533
+ c(this, "_ativo", "");
534
+ c(this, "_pendente", "");
535
+ c(this, "visiveis", /* @__PURE__ */ new Map());
606
536
  // id do grupo → id do filho exibido
607
- u(this, "menu", null);
608
- u(this, "pressao", new lt());
609
- u(this, "listeners", new P());
610
- u(this, "handleClick", (t) => {
611
- if (this.pressao.consumirSupressao()) return;
612
- const e = t.target.closest(".ui-ferr-btn"), i = e != null && e.dataset.id ? m(this._ferramentas, e.dataset.id) : void 0;
537
+ c(this, "menu", null);
538
+ c(this, "timerPressao");
539
+ c(this, "timerSupressao");
540
+ c(this, "inicioPressao", null);
541
+ c(this, "suprimirClique", !1);
542
+ c(this, "listeners", new S());
543
+ c(this, "handleClick", (t) => {
544
+ if (this.suprimirClique) {
545
+ this.suprimirClique = !1, window.clearTimeout(this.timerSupressao);
546
+ return;
547
+ }
548
+ const e = t.target.closest(".ui-ferr-btn"), i = e != null && e.dataset.id ? g(this._ferramentas, e.dataset.id) : void 0;
613
549
  if (!e || !i) return;
614
- const r = e.dataset.grupo ? m(this._ferramentas, e.dataset.grupo) : void 0;
550
+ const r = e.dataset.grupo ? g(this._ferramentas, e.dataset.grupo) : void 0;
615
551
  this.acionar(i, r);
616
552
  });
617
- u(this, "handleFocusIn", (t) => q(this.botoes(), t.target));
618
- u(this, "handlePointerDown", (t) => {
553
+ c(this, "handleFocusIn", (t) => R(this.botoes(), t.target));
554
+ c(this, "handlePointerDown", (t) => {
619
555
  const e = t;
620
556
  if (e.pointerType === "mouse" && e.button !== 0) return;
621
557
  const i = t.target.closest(".ui-ferr-btn--grupo");
622
- !i || i.disabled || this.pressao.iniciar(e.clientX ?? 0, e.clientY ?? 0, () => this.abrirFlyout(i, !1));
558
+ !i || i.disabled || (this.cancelarPressao(), window.clearTimeout(this.timerSupressao), this.inicioPressao = { x: e.clientX ?? 0, y: e.clientY ?? 0 }, this.timerPressao = window.setTimeout(() => {
559
+ this.suprimirClique = !0, this.abrirFlyout(i, !1);
560
+ }, et));
623
561
  });
624
- u(this, "handlePointerMove", (t) => {
625
- const e = t;
626
- this.pressao.mover(e.clientX ?? 0, e.clientY ?? 0);
562
+ /** Arrastar/rolar com o dedo cancela o clique longo. */
563
+ c(this, "handlePointerMove", (t) => {
564
+ if (this.timerPressao === void 0 || !this.inicioPressao) return;
565
+ const e = t, i = (e.clientX ?? 0) - this.inicioPressao.x, r = (e.clientY ?? 0) - this.inicioPressao.y;
566
+ Math.hypot(i, r) > it && this.cancelarPressao();
567
+ });
568
+ /** Fim do gesto: cancela o timer e, se o flyout abriu, descarta a supressão logo após o `click` residual. */
569
+ c(this, "handlePointerFim", () => {
570
+ this.cancelarPressao(), this.suprimirClique && (window.clearTimeout(this.timerSupressao), this.timerSupressao = window.setTimeout(() => {
571
+ this.suprimirClique = !1;
572
+ }, rt));
573
+ });
574
+ c(this, "cancelarPressao", () => {
575
+ this.timerPressao !== void 0 && (window.clearTimeout(this.timerPressao), this.timerPressao = void 0), this.inicioPressao = null;
627
576
  });
628
- u(this, "handlePointerFim", () => this.pressao.fim());
629
- u(this, "handleContextMenu", (t) => {
577
+ c(this, "handleContextMenu", (t) => {
630
578
  const e = t.target.closest(".ui-ferr-btn--grupo");
631
- e && (t.preventDefault(), this.pressao.cancelar(), this.abrirFlyout(e, !1));
579
+ e && (t.preventDefault(), this.cancelarPressao(), this.abrirFlyout(e, !1));
632
580
  });
633
- u(this, "handleKeyDown", (t) => {
634
- var d;
635
- const e = this.getAttribute("orientacao") === "horizontal", i = getComputedStyle(this).direction === "rtl", r = e ? [i ? "ArrowRight" : "ArrowLeft"] : ["ArrowUp"], s = e ? [i ? "ArrowLeft" : "ArrowRight"] : ["ArrowDown"];
636
- if (S(t, this.botoes(), r, s)) return;
637
- const n = e ? "ArrowDown" : i ? "ArrowLeft" : "ArrowRight", l = t.target instanceof HTMLButtonElement ? t.target : null;
638
- l != null && l.dataset.grupo && t.key === n && (t.preventDefault(), ((d = this.menu) == null ? void 0 : d.ancora) === l ? this.menu.focarPrimeiro() : this.abrirFlyout(l, !0));
581
+ c(this, "handleKeyDown", (t) => {
582
+ var h;
583
+ const e = this.getAttribute("orientacao") === "horizontal", i = getComputedStyle(this).direction === "rtl", r = e ? [i ? "ArrowRight" : "ArrowLeft"] : ["ArrowUp"], l = e ? [i ? "ArrowLeft" : "ArrowRight"] : ["ArrowDown"];
584
+ if (P(t, this.botoes(), r, l)) return;
585
+ const a = e ? "ArrowDown" : i ? "ArrowLeft" : "ArrowRight", n = t.target instanceof HTMLButtonElement ? t.target : null;
586
+ n != null && n.dataset.grupo && t.key === a && (t.preventDefault(), ((h = this.menu) == null ? void 0 : h.ancora) === n ? this.menu.focarPrimeiro() : this.abrirFlyout(n, !0));
639
587
  });
640
- u(this, "handleAtalho", (t) => {
641
- if (!this.hasAttribute("atalhos") || t.ctrlKey || t.metaKey || t.altKey || t.defaultPrevented || ct(t.composedPath())) return;
642
- const e = dt(t.key, this.todasFerramentas(), this._ferramentas, this._ativo);
643
- e && (t.preventDefault(), this.acionar(e.alvo, e.pai));
588
+ c(this, "handleAtalho", (t) => {
589
+ if (!this.hasAttribute("atalhos") || t.ctrlKey || t.metaKey || t.altKey || t.defaultPrevented) return;
590
+ const e = t.composedPath(), i = e[0];
591
+ if (i && (/^(INPUT|TEXTAREA|SELECT)$/.test(i.tagName) || i.isContentEditable) || e.some((u) => {
592
+ var m, f;
593
+ const p = (m = u.getAttribute) == null ? void 0 : m.call(u, "role");
594
+ return ((f = u.getAttribute) == null ? void 0 : f.call(u, "aria-modal")) === "true" || p === "textbox" || p === "searchbox" || p === "combobox" || p === "spinbutton";
595
+ })) return;
596
+ const l = (t.key || "").toUpperCase();
597
+ if (l.length !== 1) return;
598
+ const a = this.todasFerramentas().filter((u) => {
599
+ var p;
600
+ return !u.disabled && ((p = u.atalho) == null ? void 0 : p.toUpperCase()) === l;
601
+ });
602
+ if (!a.length) return;
603
+ t.preventDefault();
604
+ let n = a[0];
605
+ if (a.length > 1) {
606
+ const u = a.findIndex((p) => p.id === this._ativo);
607
+ n = a[(u + 1) % a.length];
608
+ }
609
+ const h = this._ferramentas.find((u) => {
610
+ var p;
611
+ return (p = u.filhos) == null ? void 0 : p.some((m) => m.id === n.id);
612
+ });
613
+ this.acionar(n, h);
644
614
  });
645
615
  const t = this.attachShadow({ mode: "open" });
646
616
  t.innerHTML = `
647
- <style>${R}${at}</style>
617
+ <style>${q}${tt}</style>
648
618
  <div class="ui-paleta ui-paleta--vertical" role="toolbar" aria-orientation="vertical" aria-label="Ferramentas"></div>
649
619
  `, this.rootElement = t.querySelector(".ui-paleta");
650
620
  }
@@ -657,7 +627,7 @@ class bt extends M {
657
627
  t && !this._ativo && (this._pendente = t), this.aplicarPendente(), this.renderizar();
658
628
  }
659
629
  disconnectedCallback() {
660
- this.pressao.destruir(), this.fecharMenu(), this.listeners.cleanup();
630
+ this.cancelarPressao(), window.clearTimeout(this.timerSupressao), this.suprimirClique = !1, this.fecharMenu(), this.listeners.cleanup();
661
631
  }
662
632
  attributeChangedCallback(t, e, i) {
663
633
  if (e !== i)
@@ -714,7 +684,7 @@ class bt extends M {
714
684
  this.limpar(e);
715
685
  return;
716
686
  }
717
- const i = m(this._ferramentas, t);
687
+ const i = g(this._ferramentas, t);
718
688
  if (!i) {
719
689
  this._ferramentas.length ? console.warn(`[ui-paleta-ferramentas] ativar("${t}"): ferramenta não encontrada.`) : this._pendente = t;
720
690
  return;
@@ -733,24 +703,24 @@ class bt extends M {
733
703
  !e && !this._pendente || (this._ativo = "", this._pendente = "", this.removeAttribute("valor"), this.removeAttribute("value"), this.renderizar(), t && e && this.emitirMudanca("", null, e));
734
704
  }
735
705
  atualizarItem(t, e) {
736
- var n;
737
- const i = m(this._ferramentas, t);
706
+ var a;
707
+ const i = g(this._ferramentas, t);
738
708
  if (!i) {
739
709
  console.warn(`[ui-paleta-ferramentas] atualizarItem("${t}"): item não encontrado.`);
740
710
  return;
741
711
  }
742
712
  Object.assign(i, e);
743
- const r = Object.keys(e).every((l) => l === "ativo" || l === "disabled"), s = this._ferramentas.find((l) => {
744
- var d;
745
- return (d = l.filhos) == null ? void 0 : d.some((h) => h.id === t);
713
+ const r = Object.keys(e).every((n) => n === "ativo" || n === "disabled"), l = this._ferramentas.find((n) => {
714
+ var h;
715
+ return (h = n.filhos) == null ? void 0 : h.some((u) => u.id === t);
746
716
  });
747
- if (r && !(s && "disabled" in e)) {
748
- const l = this.botoes().find((d) => d.dataset.id === t || d.dataset.grupo === t);
749
- if (l) {
750
- A(l, this.itemParaBotao(s ?? i)), H(this.botoes());
717
+ if (r && !(l && "disabled" in e)) {
718
+ const n = this.botoes().find((h) => h.dataset.id === t || h.dataset.grupo === t);
719
+ if (n) {
720
+ A(n, this.itemParaBotao(l ?? i)), B(this.botoes());
751
721
  return;
752
722
  }
753
- if (s || (n = i.filhos) != null && n.length) return;
723
+ if (l || (a = i.filhos) != null && a.length) return;
754
724
  }
755
725
  this.renderizar();
756
726
  }
@@ -761,14 +731,14 @@ class bt extends M {
761
731
  }
762
732
  aplicarPendente() {
763
733
  if (!this._pendente) return;
764
- const t = m(this._ferramentas, this._pendente);
734
+ const t = g(this._ferramentas, this._pendente);
765
735
  t && !t.disabled && (t.tipo ?? "ferramenta") === "ferramenta" ? (this.definirAtivoInterno(this._pendente), this._pendente = "") : this._ferramentas.length && (console.warn(`[ui-paleta-ferramentas] valor="${this._pendente}" não é uma ferramenta ativável em "ferramentas".`), this._pendente = "");
766
736
  }
767
737
  definirAtivoInterno(t) {
768
738
  this._ativo = t;
769
739
  const e = this._ferramentas.find((i) => {
770
740
  var r;
771
- return (r = i.filhos) == null ? void 0 : r.some((s) => s.id === t);
741
+ return (r = i.filhos) == null ? void 0 : r.some((l) => l.id === t);
772
742
  });
773
743
  e && this.visiveis.set(e.id, t);
774
744
  }
@@ -778,10 +748,10 @@ class bt extends M {
778
748
  }
779
749
  /** Filho exibido de um grupo: o último usado, pulando separadores e itens desabilitados. */
780
750
  itemExibido(t) {
781
- var s;
782
- if (!((s = t.filhos) != null && s.length)) return t;
783
- const e = (n) => n.tipo !== "separador" && !n.disabled, i = this.visiveis.get(t.id), r = t.filhos.find((n) => n.id === i);
784
- return (r && e(r) ? r : void 0) ?? t.filhos.find(e) ?? t.filhos.find((n) => n.tipo !== "separador") ?? t.filhos[0];
751
+ var l;
752
+ if (!((l = t.filhos) != null && l.length)) return t;
753
+ const e = (a) => a.tipo !== "separador" && !a.disabled, i = this.visiveis.get(t.id), r = t.filhos.find((a) => a.id === i);
754
+ return (r && e(r) ? r : void 0) ?? t.filhos.find(e) ?? t.filhos.find((a) => a.tipo !== "separador") ?? t.filhos[0];
785
755
  }
786
756
  itemParaBotao(t) {
787
757
  const e = this.itemExibido(t), i = e.tipo ?? "ferramenta";
@@ -800,26 +770,26 @@ class bt extends M {
800
770
  }
801
771
  /* ---------- Renderização ---------- */
802
772
  renderizar() {
803
- var d;
804
- const t = (d = this.shadowRoot) == null ? void 0 : d.activeElement, e = t && t.classList.contains("ui-ferr-btn") ? { id: t.dataset.id ?? "", grupo: t.dataset.grupo ?? "" } : null;
773
+ var h;
774
+ const t = (h = this.shadowRoot) == null ? void 0 : h.activeElement, e = t && t.classList.contains("ui-ferr-btn") ? { id: t.dataset.id ?? "", grupo: t.dataset.grupo ?? "" } : null;
805
775
  this.fecharMenu();
806
- const i = this.orientacao, r = this.tamanho, s = this.colunas;
807
- this.rootElement.className = `ui-paleta ui-paleta--${i} ui-paleta--${r}`, s === 2 && i === "vertical" && this.rootElement.classList.add("ui-paleta--cols-2"), this.rootElement.setAttribute("aria-orientation", i), this.rootElement.setAttribute("aria-label", this.getAttribute("aria-label") || "Ferramentas"), this.rootElement.innerHTML = "";
808
- const n = ht[r] ?? 18;
809
- this._ferramentas.forEach((h) => {
776
+ const i = this.orientacao, r = this.tamanho, l = this.colunas;
777
+ this.rootElement.className = `ui-paleta ui-paleta--${i} ui-paleta--${r}`, l === 2 && i === "vertical" && this.rootElement.classList.add("ui-paleta--cols-2"), this.rootElement.setAttribute("aria-orientation", i), this.rootElement.setAttribute("aria-label", this.getAttribute("aria-label") || "Ferramentas"), this.rootElement.innerHTML = "";
778
+ const a = at[r] ?? 18;
779
+ this._ferramentas.forEach((u) => {
810
780
  var f;
811
- if (h.tipo === "separador") {
812
- const v = document.createElement("div");
813
- v.className = "ui-paleta__sep", v.setAttribute("role", "separator"), this.rootElement.appendChild(v);
781
+ if (u.tipo === "separador") {
782
+ const x = document.createElement("div");
783
+ x.className = "ui-paleta__sep", x.setAttribute("role", "separator"), this.rootElement.appendChild(x);
814
784
  return;
815
785
  }
816
- const p = this.itemExibido(h), _ = j(this.itemParaBotao(h), "paleta", n);
817
- _.dataset.id = p.id, (f = h.filhos) != null && f.length && (_.dataset.grupo = h.id), this.rootElement.appendChild(_);
786
+ const p = this.itemExibido(u), m = H(this.itemParaBotao(u), "paleta", a);
787
+ m.dataset.id = p.id, (f = u.filhos) != null && f.length && (m.dataset.grupo = u.id), this.rootElement.appendChild(m);
818
788
  }), T(this.botoes());
819
- const l = this.botoes().find((h) => h.dataset.id === this._ativo && !h.disabled);
820
- if (l && (this.botoes().forEach((h) => h.tabIndex = -1), l.tabIndex = 0), e) {
821
- const h = this.botoes().find((p) => e.grupo ? p.dataset.grupo === e.grupo : p.dataset.id === e.id);
822
- h && !h.disabled && h.focus();
789
+ const n = this.botoes().find((u) => u.dataset.id === this._ativo && !u.disabled);
790
+ if (n && (this.botoes().forEach((u) => u.tabIndex = -1), n.tabIndex = 0), e) {
791
+ const u = this.botoes().find((p) => e.grupo ? p.dataset.grupo === e.grupo : p.dataset.id === e.id);
792
+ u && !u.disabled && u.focus();
823
793
  }
824
794
  }
825
795
  botoes() {
@@ -833,7 +803,7 @@ class bt extends M {
833
803
  /* ---------- Interação ---------- */
834
804
  acionar(t, e) {
835
805
  if (t.disabled) return;
836
- const i = t.tipo ?? "ferramenta", r = this._ativo, s = t.ativo;
806
+ const i = t.tipo ?? "ferramenta", r = this._ativo, l = t.ativo;
837
807
  i === "ferramenta" ? this.ativar(t.id) : i === "toggle" && (t.ativo = !t.ativo, this.atualizarBotaoDe(t, e)), this.dispatchEvent(
838
808
  new CustomEvent("ui-ferramenta", {
839
809
  detail: {
@@ -847,25 +817,25 @@ class bt extends M {
847
817
  composed: !0,
848
818
  cancelable: !0
849
819
  })
850
- ) || (i === "ferramenta" && r !== t.id ? r ? this.ativar(r) : this.limpar() : i === "toggle" && (t.ativo = s, this.atualizarBotaoDe(t, e)));
820
+ ) || (i === "ferramenta" && r !== t.id ? r ? this.ativar(r) : this.limpar() : i === "toggle" && (t.ativo = l, this.atualizarBotaoDe(t, e)));
851
821
  }
852
822
  abrirFlyout(t, e) {
853
- var s;
854
- const i = t.dataset.grupo ? m(this._ferramentas, t.dataset.grupo) : void 0;
855
- if (!((s = i == null ? void 0 : i.filhos) != null && s.length)) return;
823
+ var l;
824
+ const i = t.dataset.grupo ? g(this._ferramentas, t.dataset.grupo) : void 0;
825
+ if (!((l = i == null ? void 0 : i.filhos) != null && l.length)) return;
856
826
  this.fecharMenu();
857
- const r = i.filhos.map((n) => ({
858
- ...n,
859
- ativo: (n.tipo ?? "ferramenta") === "ferramenta" ? n.id === this._ativo : n.ativo
827
+ const r = i.filhos.map((a) => ({
828
+ ...a,
829
+ ativo: (a.tipo ?? "ferramenta") === "ferramenta" ? a.id === this._ativo : a.ativo
860
830
  }));
861
831
  t.setAttribute("aria-expanded", "true"), this.menu = O(
862
832
  this.shadowRoot,
863
833
  t,
864
834
  r,
865
- (n) => {
866
- var d;
867
- const l = m(i.filhos, n.id);
868
- l && (this.acionar(l, i), (d = this.botoes().find((h) => h.dataset.grupo === i.id)) == null || d.focus());
835
+ (a) => {
836
+ var h;
837
+ const n = g(i.filhos, a.id);
838
+ n && (this.acionar(n, i), (h = this.botoes().find((u) => u.dataset.grupo === i.id)) == null || h.focus());
869
839
  },
870
840
  {
871
841
  lado: this.getAttribute("orientacao") === "horizontal" ? "baixo" : "direita",
@@ -882,9 +852,9 @@ class bt extends M {
882
852
  (t = this.menu) == null || t.fechar(), this.menu = null;
883
853
  }
884
854
  }
885
- z("ui-paleta-ferramentas", bt);
855
+ z("ui-paleta-ferramentas", ot);
886
856
  export {
887
- X as U,
888
- bt as a,
889
- rt as b
857
+ Y as U,
858
+ ot as a,
859
+ Z as b
890
860
  };