@thibezer/ui-components-kit 2.8.0 → 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 (183) hide show
  1. package/CHANGELOG.md +203 -265
  2. package/README.md +791 -815
  3. package/dist/botao.cjs +1 -1
  4. package/dist/botao.js +1 -1
  5. package/dist/camadas.cjs +94 -94
  6. package/dist/camadas.js +1124 -1218
  7. package/dist/campo-texto.cjs +1 -1
  8. package/dist/campo-texto.js +1 -1
  9. package/dist/canvas.cjs +65 -66
  10. package/dist/canvas.js +3444 -3795
  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/ui-camadas.d.ts +5 -3
  23. package/dist/components/ui-canvas-cad/cad-atributos-sync.d.ts +1 -2
  24. package/dist/components/ui-canvas-cad/cad-broadcast.d.ts +1 -1
  25. package/dist/components/ui-canvas-cad/cad-eventos-canvas.d.ts +8 -3
  26. package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +106 -26
  27. package/dist/components/ui-canvas-cad/cad-inicializador.d.ts +1 -3
  28. package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +1 -4
  29. package/dist/components/ui-checkbox/ui-checkbox.d.ts +1 -4
  30. package/dist/components/ui-cores/tipos.d.ts +0 -2
  31. package/dist/components/ui-cores/ui-controle-cores.d.ts +3 -8
  32. package/dist/components/ui-cores/ui-seletor-cor.d.ts +1 -3
  33. package/dist/components/ui-mapa/ui-mapa-linha.d.ts +5 -12
  34. package/dist/components/ui-mapa/ui-mapa-marcador.d.ts +6 -15
  35. package/dist/components/ui-mapa/ui-mapa.d.ts +1 -14
  36. package/dist/components/ui-modal/modal-acessibilidade.d.ts +5 -5
  37. package/dist/components/ui-modal/ui-modal.d.ts +11 -1
  38. package/dist/components/ui-radio/radio-grupo-registry.d.ts +0 -10
  39. package/dist/components/ui-radio/ui-radio.d.ts +2 -9
  40. package/dist/components/ui-skeleton/ui-skeleton.d.ts +0 -9
  41. package/dist/components/ui-switch/ui-switch.d.ts +1 -3
  42. package/dist/components/ui-tabela/ui-tabela.d.ts +19 -1
  43. package/dist/components/ui-tooltip/ui-tooltip.d.ts +1 -24
  44. package/dist/core/index.d.ts +0 -1
  45. package/dist/core.cjs +1 -1
  46. package/dist/core.js +18 -28
  47. package/dist/cores.cjs +1 -1
  48. package/dist/cores.js +1 -1
  49. package/dist/custom-elements.json +18859 -23721
  50. package/dist/data.cjs +1 -1
  51. package/dist/data.js +2 -2
  52. package/dist/feedback.cjs +1 -1
  53. package/dist/feedback.js +2 -2
  54. package/dist/form-validacao-BIOXxt-1.js +140 -0
  55. package/dist/form-validacao-ytRYSF3E.cjs +1 -0
  56. package/dist/forms.cjs +1 -1
  57. package/dist/forms.js +2 -2
  58. package/dist/gerencigeo-canvas/feature_metricas.d.ts +9 -0
  59. package/dist/index.cjs +1 -1
  60. package/dist/index.d.ts +0 -3
  61. package/dist/index.js +178 -179
  62. package/dist/mapa.cjs +16 -11
  63. package/dist/mapa.js +170 -242
  64. package/dist/modal.cjs +1 -1
  65. package/dist/modal.js +1 -1
  66. package/dist/register.cjs +1 -1
  67. package/dist/register.js +11 -11
  68. package/dist/svg-seguro-ChVJ2L2z.js +74 -0
  69. package/dist/svg-seguro-J2RM1Ssf.cjs +1 -0
  70. package/dist/tabela.cjs +1 -1
  71. package/dist/tabela.js +1 -1
  72. package/dist/tipos-elementos.d.ts +17 -35
  73. package/dist/tipos-react.d.ts +0 -2
  74. package/dist/tipos-vue.d.ts +12 -34
  75. package/dist/tools.cjs +1 -1
  76. package/dist/tools.js +1 -1
  77. package/dist/ui-badge-BxT-sDmV.cjs +28 -0
  78. package/dist/ui-badge-C0eKBI8E.js +183 -0
  79. package/dist/ui-botao-BOOnP8ds.cjs +12 -0
  80. package/dist/ui-botao-DfqSivHl.js +165 -0
  81. package/dist/ui-botao-OGJV6Vfk.js +165 -0
  82. package/dist/ui-botao-psS1juof.cjs +12 -0
  83. package/dist/ui-campo-texto-Cnn2UAkS.cjs +16 -0
  84. package/dist/{ui-campo-texto-B_OHVGiN.js → ui-campo-texto-Uu2dJE_0.js} +51 -51
  85. package/dist/ui-card-B86lJXTP.cjs +20 -0
  86. package/dist/{ui-card-BNYCQ7g-.js → ui-card-C_o5_0cB.js} +42 -50
  87. package/dist/ui-controle-cores-BS0WYPdi.js +572 -0
  88. package/dist/ui-controle-cores-Er6ZcQ7U.cjs +111 -0
  89. package/dist/ui-kit.css +1 -1
  90. package/dist/ui-modal-CvGFGh1h.cjs +18 -0
  91. package/dist/{ui-modal-BkYvNP0G.js → ui-modal-DBOtSTbR.js} +140 -116
  92. package/dist/ui-paleta-ferramentas-CEZYcN4J.js +624 -0
  93. package/dist/ui-paleta-ferramentas-CU4icLl0.js +1171 -0
  94. package/dist/{ui-paleta-ferramentas-bDLPbiGA.cjs → ui-paleta-ferramentas-Ccmo-rB5.cjs} +7 -7
  95. package/dist/ui-paleta-ferramentas-DLwZHIDv.cjs +21 -0
  96. package/dist/{ui-paleta-ferramentas-Ksh6gMW3.js → ui-paleta-ferramentas-DNN5i6nL.js} +329 -359
  97. package/dist/ui-paleta-ferramentas-Dbj1kBS9.cjs +18 -0
  98. package/dist/ui-paleta-ferramentas-DbwdWVtT.js +1173 -0
  99. package/dist/ui-paleta-ferramentas-bvqxj1Yd.cjs +21 -0
  100. package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
  101. package/dist/ui-segmented-DyF5YLsV.js +418 -0
  102. package/dist/ui-segmented-rn9RxRGM.cjs +19 -0
  103. package/dist/{ui-linha-nCDh2wPm.js → ui-segmented-wUraId2e.js} +105 -200
  104. package/dist/ui-skeleton-DI4_9WOX.js +428 -0
  105. package/dist/{ui-skeleton-DiOxTBZK.cjs → ui-skeleton-SPYqku8P.cjs} +10 -10
  106. package/dist/{ui-skeleton-B2Rgrv8o.js → ui-skeleton-W9uwIceA.js} +191 -254
  107. package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
  108. package/dist/{ui-switch-DO1R0Ce7.js → ui-switch-BcOqOkiV.js} +128 -187
  109. package/dist/ui-switch-D7iPKDj-.cjs +53 -0
  110. package/dist/ui-tabela-propriedades-BBr5sqki.cjs +145 -0
  111. package/dist/{ui-tabela-propriedades-DzZlyNZ_.cjs → ui-tabela-propriedades-BecPqC-e.cjs} +10 -10
  112. package/dist/{ui-tabela-propriedades-D9Echt2X.js → ui-tabela-propriedades-BokvDD3b.js} +826 -845
  113. package/dist/ui-tabela-propriedades-Boy7I5yW.js +2412 -0
  114. package/dist/ui-tabela-propriedades-C-PeuW1i.cjs +141 -0
  115. package/dist/ui-tabela-propriedades-Df9ajC6M.js +2648 -0
  116. package/dist/ui-toast-Bp_NlM5G.js +156 -0
  117. package/dist/ui-toast-DGTZKne5.cjs +20 -0
  118. package/dist/zero-js-triggers-C_KrvFOQ.js +244 -0
  119. package/dist/zero-js-triggers-C_gtaojZ.cjs +1 -0
  120. package/package.json +3 -3
  121. package/dist/acessibilidade-CSzX-DkG.cjs +0 -1
  122. package/dist/acessibilidade-CUlSXc2X.js +0 -38
  123. package/dist/altura-controle-ukMRPckR.cjs +0 -1
  124. package/dist/altura-controle-vxQiXG4q.js +0 -62
  125. package/dist/components/ui-barra-ferramentas/paleta-atalhos.d.ts +0 -16
  126. package/dist/components/ui-barra-ferramentas/paleta-pressao-longa.d.ts +0 -24
  127. package/dist/components/ui-barra-ferramentas/ribbon-render.d.ts +0 -14
  128. package/dist/components/ui-barra-ferramentas/ribbon-teclado.d.ts +0 -17
  129. package/dist/components/ui-camadas/camadas-colecao.d.ts +0 -27
  130. package/dist/components/ui-camadas/camadas-drop-ops.d.ts +0 -31
  131. package/dist/components/ui-camadas/camadas-hierarquia.d.ts +0 -10
  132. package/dist/components/ui-camadas/camadas-lembranca.d.ts +0 -34
  133. package/dist/components/ui-camadas/camadas-render.d.ts +0 -14
  134. package/dist/components/ui-camadas/camadas-renomear.d.ts +0 -12
  135. package/dist/components/ui-camadas/camadas-selecao-api.d.ts +0 -17
  136. package/dist/components/ui-camadas/camadas-thumb.d.ts +0 -1
  137. package/dist/components/ui-canvas-cad/cad-acessibilidade.d.ts +0 -15
  138. package/dist/components/ui-canvas-cad/cad-evento-coordenadas.d.ts +0 -22
  139. package/dist/components/ui-canvas-cad/cad-feicoes-camera.d.ts +0 -26
  140. package/dist/components/ui-canvas-cad/cad-feicoes-consulta.d.ts +0 -21
  141. package/dist/components/ui-canvas-cad/cad-feicoes-dados.d.ts +0 -39
  142. package/dist/components/ui-canvas-cad/cad-feicoes-desenho.d.ts +0 -68
  143. package/dist/components/ui-canvas-cad/cad-feicoes-edicao.d.ts +0 -37
  144. package/dist/components/ui-canvas-cad/cad-feicoes-operacoes.d.ts +0 -48
  145. package/dist/components/ui-canvas-cad/cad-feicoes-ponteiro.d.ts +0 -24
  146. package/dist/components/ui-canvas-cad/cad-feicoes-selecao-regiao.d.ts +0 -22
  147. package/dist/components/ui-canvas-cad/cad-feicoes-tipos.d.ts +0 -53
  148. package/dist/components/ui-canvas-cad/cad-feicoes-versoes.d.ts +0 -33
  149. package/dist/components/ui-canvas-cad/cad-leaflet-adaptador.d.ts +0 -5
  150. package/dist/components/ui-canvas-cad/cad-selecao-pontos.d.ts +0 -5
  151. package/dist/components/ui-canvas-cad/tipos.d.ts +0 -37
  152. package/dist/components/ui-linha/index.d.ts +0 -1
  153. package/dist/components/ui-linha/ui-linha.d.ts +0 -48
  154. package/dist/components/ui-mapa/mapa-atributos.d.ts +0 -14
  155. package/dist/components/ui-mapa/mapa-basemaps.d.ts +0 -7
  156. package/dist/components/ui-mapa/mapa-icones.d.ts +0 -4
  157. package/dist/components/ui-mapa/mapa-leaflet.d.ts +0 -5
  158. package/dist/components/ui-mapa/mapa-vinculo-pai.d.ts +0 -22
  159. package/dist/components/ui-mapa/tipos.d.ts +0 -13
  160. package/dist/components/ui-modal/modal-foco.d.ts +0 -28
  161. package/dist/components/ui-tabela/tabela-estados.d.ts +0 -16
  162. package/dist/components/ui-tabela/tabela-rolagem.d.ts +0 -44
  163. package/dist/components/ui-tabela/tabela-teclado.d.ts +0 -16
  164. package/dist/components/ui-tooltip/tooltip-popover.d.ts +0 -7
  165. package/dist/components/ui-tooltip/tooltip-posicionamento.d.ts +0 -29
  166. package/dist/core/altura-controle.d.ts +0 -34
  167. package/dist/core/opcoes.d.ts +0 -9
  168. package/dist/core/rotulo-controle.d.ts +0 -13
  169. package/dist/form-validacao-BlQFxUVj.js +0 -104
  170. package/dist/form-validacao-DIeyQVH5.cjs +0 -1
  171. package/dist/opcoes-CJYLi6kd.js +0 -12
  172. package/dist/opcoes-CkyDxBuQ.cjs +0 -1
  173. package/dist/ui-badge-BWhoGgo9.js +0 -197
  174. package/dist/ui-badge-SIR81R9l.cjs +0 -28
  175. package/dist/ui-botao-D24oXySA.cjs +0 -12
  176. package/dist/ui-botao-Dsj08jjw.js +0 -165
  177. package/dist/ui-campo-texto-DauJCde3.cjs +0 -16
  178. package/dist/ui-card-BrjBL-yo.cjs +0 -20
  179. package/dist/ui-controle-cores-DgEza3wF.js +0 -612
  180. package/dist/ui-controle-cores-uY__TgwW.cjs +0 -117
  181. package/dist/ui-linha-C6HBnsaw.cjs +0 -19
  182. package/dist/ui-modal-CUNbpbZ1.cjs +0 -18
  183. package/dist/ui-switch-D9a8XlVX.cjs +0 -53
@@ -0,0 +1,418 @@
1
+ var g = Object.defineProperty;
2
+ var v = (s, n, t) => n in s ? g(s, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[n] = t;
3
+ var u = (s, n, t) => v(s, typeof n != "symbol" ? n + "" : n, t);
4
+ import { d, S as h } from "./ssr-safe-5cWfJP-s.js";
5
+ import { L as f } from "./listener-bag-DQgv7OON.js";
6
+ import { F as b } from "./ui-campo-texto-Uu2dJE_0.js";
7
+ import { a as x } from "./parts-CaoQiCfI.js";
8
+ const _ = ':host{display:block;box-sizing:border-box;margin:0;padding:0;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){display:inline-block}.ui-texto{margin:0;padding:0;box-sizing:border-box;font-family:inherit;color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.ui-texto--h1{font-size:var(--ui-tamanho-h1, clamp(24px, 4vw, 36px));font-weight:var(--ui-peso-negrito, 700);line-height:var(--ui-altura-linha-titulo, 1.25);letter-spacing:-.5px}.ui-texto--h2{font-size:var(--ui-tamanho-h2, clamp(20px, 3vw, 28px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25);letter-spacing:-.3px}.ui-texto--h3{font-size:var(--ui-tamanho-h3, clamp(18px, 2.4vw, 24px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h4{font-size:var(--ui-tamanho-h4, clamp(16px, 2vw, 20px));font-weight:var(--ui-peso-medio, 500);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h5{font-size:var(--ui-tamanho-h5, clamp(14px, 1.6vw, 18px));font-weight:var(--ui-peso-medio, 500);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h6{font-size:var(--ui-tamanho-h6, clamp(13px, 1.2vw, 16px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25);text-transform:uppercase;letter-spacing:.5px}.ui-texto--corpo{font-size:var(--ui-tamanho-corpo, 14px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5)}.ui-texto--corpo-sm{font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5)}.ui-texto--caption{font-size:var(--ui-tamanho-caption, 11px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-compacta, 1.2);color:var(--ui-cor-texto-secundario, #888899)}.ui-texto--codigo{font-family:var(--ui-fonte-codigo, monospace);font-size:var(--ui-tamanho-codigo, 12px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5);background:var(--ui-cor-fundo-elevado, #1a1a1e);padding:2px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-texto--cor-primaria{color:var(--ui-cor-primaria, #00E08A)}.ui-texto--cor-secundaria{color:var(--ui-cor-texto-secundario, #888899)}.ui-texto--cor-destaque{color:var(--ui-cor-destaque, #00E08A)}.ui-texto--cor-erro{color:var(--ui-cor-texto-erro, #ff5555)}.ui-texto--cor-sucesso{color:var(--ui-cor-texto-sucesso, #00E08A)}.ui-texto--cor-alerta{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-texto--peso-normal{font-weight:var(--ui-peso-normal, 400)!important}.ui-texto--peso-medio{font-weight:var(--ui-peso-medio, 500)!important}.ui-texto--peso-seminegrito{font-weight:var(--ui-peso-seminegrito, 600)!important}.ui-texto--peso-negrito{font-weight:var(--ui-peso-negrito, 700)!important}.ui-texto--alinhamento-esquerda{text-align:left}.ui-texto--alinhamento-centro{text-align:center}.ui-texto--alinhamento-direita{text-align:right}.ui-texto--alinhamento-justificado{text-align:justify}.ui-texto--truncar{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}', y = /* @__PURE__ */ new Set([
9
+ "p",
10
+ "span",
11
+ "div",
12
+ "h1",
13
+ "h2",
14
+ "h3",
15
+ "h4",
16
+ "h5",
17
+ "h6",
18
+ "small",
19
+ "code",
20
+ "strong",
21
+ "em",
22
+ "label",
23
+ "blockquote",
24
+ "pre",
25
+ "b",
26
+ "i"
27
+ ]);
28
+ class w extends h {
29
+ constructor() {
30
+ super();
31
+ u(this, "container");
32
+ u(this, "shadow");
33
+ typeof this.attachShadow == "function" && typeof document < "u" ? (this.shadow = this.attachShadow({ mode: "open" }), this.container = document.createElement("p"), this.container.className = "ui-texto ui-texto--corpo", this.container.appendChild(document.createElement("slot")), this.shadow.innerHTML = `<style>${_}</style>`, this.shadow.appendChild(this.container)) : (this.shadow = null, this.container = null);
34
+ }
35
+ static get observedAttributes() {
36
+ return ["variante", "tag", "cor", "peso", "alinhamento", "truncar"];
37
+ }
38
+ connectedCallback() {
39
+ this.render();
40
+ }
41
+ attributeChangedCallback(t, i, e) {
42
+ this.render();
43
+ }
44
+ resolveTag() {
45
+ const t = this.getAttribute("tag");
46
+ if (t) {
47
+ const e = t.toLowerCase().trim();
48
+ if (y.has(e))
49
+ return e;
50
+ console.warn(`[ui-texto] Tag "${t}" não permitida ou inválida. Utilizando fallback semântico.`);
51
+ }
52
+ const i = (this.getAttribute("variante") || "corpo").toLowerCase();
53
+ switch (i) {
54
+ case "h1":
55
+ case "h2":
56
+ case "h3":
57
+ case "h4":
58
+ case "h5":
59
+ case "h6":
60
+ return i;
61
+ case "caption":
62
+ return "small";
63
+ case "codigo":
64
+ return "code";
65
+ case "corpo-sm":
66
+ case "corpo":
67
+ default:
68
+ return "p";
69
+ }
70
+ }
71
+ render() {
72
+ const t = this.resolveTag(), i = this.getAttribute("variante") || "corpo", e = this.getAttribute("cor"), a = this.getAttribute("peso"), r = this.getAttribute("alinhamento"), o = this.hasAttribute("truncar");
73
+ if (this.container.tagName.toLowerCase() !== t) {
74
+ const c = document.createElement(t);
75
+ c.appendChild(document.createElement("slot")), this.shadow.replaceChild(c, this.container), this.container = c;
76
+ }
77
+ const l = ["ui-texto", `ui-texto--${i}`];
78
+ e && l.push(`ui-texto--cor-${e}`), a && l.push(`ui-texto--peso-${a}`), r && l.push(`ui-texto--alinhamento-${r}`), o && l.push("ui-texto--truncar"), this.container.className = l.join(" ");
79
+ }
80
+ }
81
+ d("ui-texto", w);
82
+ const E = ':host{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle;position:relative}.ui-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--ui-tamanho-avatar, 36px);height:var(--ui-tamanho-avatar, 36px);min-width:var(--ui-tamanho-avatar, 36px);min-height:var(--ui-tamanho-avatar, 36px);border-radius:50%;background-color:var(--ui-cor-fundo-elevado, #22222a);color:var(--ui-cor-primaria, #00E08A);font-weight:600;font-size:var(--ui-avatar-font-size, 14px);-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));line-height:1}.ui-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.ui-avatar--quadrado{border-radius:8px}.ui-avatar__status{position:absolute;bottom:0;right:0;width:25%;height:25%;min-width:8px;min-height:8px;max-width:14px;max-height:14px;border-radius:50%;border:2px solid var(--ui-cor-fundo-card, #121214);box-sizing:border-box}.ui-avatar__status--online{background-color:var(--ui-cor-primaria, #00E08A)}.ui-avatar__status--offline{background-color:#889}.ui-avatar__status--ausente{background-color:#ffb86c}.ui-avatar__status--ocupado{background-color:#f55}.ui-avatar--xs{--ui-tamanho-avatar: 20px;--ui-avatar-font-size: 10px}.ui-avatar--sm{--ui-tamanho-avatar: 28px;--ui-avatar-font-size: 11px}.ui-avatar--md{--ui-tamanho-avatar: 36px;--ui-avatar-font-size: 14px}.ui-avatar--lg{--ui-tamanho-avatar: 48px;--ui-avatar-font-size: 18px}.ui-avatar--xl{--ui-tamanho-avatar: 64px;--ui-avatar-font-size: 24px}';
83
+ class A extends h {
84
+ constructor() {
85
+ super();
86
+ u(this, "avatarElement");
87
+ u(this, "statusElement");
88
+ const t = this.attachShadow({ mode: "open" });
89
+ t.innerHTML = `
90
+ <style>${E}</style>
91
+ <div class="ui-avatar">
92
+ <span class="ui-avatar__content"></span>
93
+ </div>
94
+ <span class="ui-avatar__status" style="display: none;"></span>
95
+ `, this.avatarElement = t.querySelector(".ui-avatar"), this.statusElement = t.querySelector(".ui-avatar__status");
96
+ }
97
+ static get observedAttributes() {
98
+ return [
99
+ "src",
100
+ "nome",
101
+ "name",
102
+ "tamanho",
103
+ "size",
104
+ "formato",
105
+ "status"
106
+ ];
107
+ }
108
+ connectedCallback() {
109
+ this.syncState();
110
+ }
111
+ attributeChangedCallback(t, i, e) {
112
+ this.syncState();
113
+ }
114
+ extrairIniciais(t) {
115
+ const i = t.trim().split(/\s+/).filter(Boolean);
116
+ if (i.length === 0) return "?";
117
+ if (i.length === 1)
118
+ return i[0].substring(0, 2).toUpperCase();
119
+ const e = i[0][0], a = i[i.length - 1][0];
120
+ return (e + a).toUpperCase();
121
+ }
122
+ syncState() {
123
+ const t = this.getAttribute("src"), i = this.getAttribute("nome") || this.getAttribute("name") || "", e = this.getAttribute("tamanho") || this.getAttribute("size") || "md", a = this.getAttribute("formato") || "circulo", r = this.getAttribute("status");
124
+ this.avatarElement.className = "ui-avatar", ["xs", "sm", "md", "lg", "xl"].includes(e) ? (this.avatarElement.classList.add(`ui-avatar--${e}`), this.avatarElement.style.removeProperty("--ui-tamanho-avatar")) : isNaN(parseInt(e, 10)) ? this.avatarElement.style.removeProperty("--ui-tamanho-avatar") : this.avatarElement.style.setProperty("--ui-tamanho-avatar", `${parseInt(e, 10)}px`), a === "quadrado" && this.avatarElement.classList.add("ui-avatar--quadrado");
125
+ const o = this.avatarElement.querySelector(".ui-avatar__content");
126
+ if (o)
127
+ if (t) {
128
+ const l = o.querySelector("img");
129
+ if (l && l.getAttribute("src") === t)
130
+ l.alt = i || "Avatar";
131
+ else {
132
+ o.textContent = "";
133
+ const c = document.createElement("img");
134
+ c.className = "ui-avatar__img", c.src = t, c.alt = i || "Avatar", c.onerror = () => {
135
+ this.renderFallback(o, i);
136
+ }, o.appendChild(c);
137
+ }
138
+ } else
139
+ o.textContent = "", this.renderFallback(o, i);
140
+ r && ["online", "offline", "ausente", "ocupado"].includes(r) ? (this.statusElement.className = `ui-avatar__status ui-avatar__status--${r}`, this.statusElement.style.display = "block") : this.statusElement.style.display = "none";
141
+ }
142
+ renderFallback(t, i) {
143
+ i ? t.textContent = this.extrairIniciais(i) : t.innerHTML = `
144
+ <svg viewBox="0 0 24 24" width="60%" height="60%" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
145
+ <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
146
+ <circle cx="12" cy="7" r="4"></circle>
147
+ </svg>
148
+ `;
149
+ }
150
+ }
151
+ d("ui-avatar", A);
152
+ class z {
153
+ constructor(n, t) {
154
+ u(this, "rafId", null);
155
+ u(this, "resizeObserver");
156
+ this.trackElement = n, this.indicadorElement = t;
157
+ }
158
+ iniciarObserver(n, t) {
159
+ typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(() => {
160
+ this.atualizar(), t && t();
161
+ }), this.resizeObserver.observe(n));
162
+ }
163
+ destruir() {
164
+ this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = void 0), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
165
+ }
166
+ atualizar() {
167
+ this.rafId !== null && cancelAnimationFrame(this.rafId), this.rafId = requestAnimationFrame(() => {
168
+ this.rafId = null;
169
+ const n = this.trackElement.querySelector(".ui-segmented__item--ativo");
170
+ if (!n) {
171
+ this.indicadorElement.style.opacity = "0";
172
+ return;
173
+ }
174
+ const t = this.indicadorElement.parentElement, i = n.getBoundingClientRect(), e = t == null ? void 0 : t.getBoundingClientRect();
175
+ let a, r;
176
+ if (t && e && i.width > 0 && e.width > 0) {
177
+ const o = t.clientLeft || 0;
178
+ a = Number((i.left - e.left - o).toFixed(2)), r = Number(i.width.toFixed(2));
179
+ } else
180
+ a = Math.round(n.offsetLeft), r = Math.round(n.offsetWidth);
181
+ this.indicadorElement.style.transform = `translateX(${a}px)`, this.indicadorElement.style.width = `${r}px`, this.indicadorElement.style.opacity = "1";
182
+ });
183
+ }
184
+ }
185
+ function k(s, n, t, i) {
186
+ if (t) return;
187
+ const e = Array.from(
188
+ n.querySelectorAll(".ui-segmented__item:not(:disabled)")
189
+ );
190
+ if (e.length === 0) return;
191
+ const a = e.findIndex((l) => l.classList.contains("ui-segmented__item--ativo"));
192
+ let r = a;
193
+ if (s.key === "ArrowRight" || s.key === "ArrowDown")
194
+ s.preventDefault(), r = (a + 1) % e.length;
195
+ else if (s.key === "ArrowLeft" || s.key === "ArrowUp")
196
+ s.preventDefault(), r = (a - 1 + e.length) % e.length;
197
+ else if (s.key === "Home")
198
+ s.preventDefault(), r = 0;
199
+ else if (s.key === "End")
200
+ s.preventDefault(), r = e.length - 1;
201
+ else
202
+ return;
203
+ const o = e[r];
204
+ if (o && o.dataset.indice) {
205
+ const l = parseInt(o.dataset.indice, 10);
206
+ i(l);
207
+ }
208
+ }
209
+ const S = ':host{display:inline-block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([largura-total]),:host([full-width]){display:block;width:100%}.ui-segmented{display:inline-flex;position:relative;background-color:var(--ui-cor-fundo, #0b0b0d);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);padding:3px;box-sizing:border-box;-webkit-user-select:none;user-select:none;gap:2px;align-items:center}.ui-segmented--full{display:flex;width:100%}.ui-segmented--full .ui-segmented__item{flex:1}.ui-segmented--sm{padding:2px;height:28px}.ui-segmented--sm .ui-segmented__item{font-size:12px;padding:0 8px;height:22px}.ui-segmented--md{padding:3px;height:36px}.ui-segmented--md .ui-segmented__item{font-size:13px;padding:0 14px;height:28px}.ui-segmented--lg{padding:4px;height:42px}.ui-segmented--lg .ui-segmented__item{font-size:14px;padding:0 18px;height:32px}.ui-segmented__indicador{position:absolute;top:3px;bottom:3px;left:0;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #1e1e24);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:calc(var(--ui-raio-borda, 8px) - 2px);box-shadow:var(--ui-sombra-sm, 0 2px 8px rgba(0, 0, 0, .4));pointer-events:none;transition:transform .22s cubic-bezier(.16,1,.3,1),width .22s cubic-bezier(.16,1,.3,1),opacity .15s ease;z-index:1;opacity:0}.ui-segmented--sm .ui-segmented__indicador{top:2px;bottom:2px}.ui-segmented--lg .ui-segmented__indicador{top:4px;bottom:4px}.ui-segmented__item{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;gap:6px;background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-family:inherit;font-weight:500;cursor:pointer;border-radius:calc(var(--ui-raio-borda, 8px) - 2px);line-height:1;white-space:nowrap;transition:color .15s ease;box-sizing:border-box}.ui-segmented__item:hover:not(:disabled){color:var(--ui-cor-texto, #e1e1e6)}.ui-segmented__item--ativo{color:var(--ui-cor-texto, #ffffff)!important;font-weight:600}.ui-segmented__item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-cor-primaria, #00E08A)}.ui-segmented__item:disabled{opacity:.35;cursor:not-allowed}.ui-segmented__icone{display:inline-flex;align-items:center;justify-content:center;line-height:1}.ui-segmented__icone ui-icone,.ui-segmented__icone svg{shape-rendering:geometricPrecision;display:inline-flex;align-items:center;justify-content:center}', C = [
210
+ "valor",
211
+ "value",
212
+ "name",
213
+ "disabled",
214
+ "tamanho",
215
+ "size",
216
+ "largura-total",
217
+ "full-width",
218
+ "obrigatorio",
219
+ "required",
220
+ "mensagem-validacao"
221
+ ];
222
+ function I() {
223
+ return `
224
+ <style>${S}</style>
225
+ <div class="ui-segmented ui-segmented--md" part="base" role="radiogroup">
226
+ <div class="ui-segmented__indicador" part="indicador"></div>
227
+ <div class="ui-segmented__track" style="display: contents;"></div>
228
+ <slot style="display: none;"></slot>
229
+ </div>
230
+ `;
231
+ }
232
+ function q(s, n, t, i, e) {
233
+ const a = document.createElement("button");
234
+ a.type = "button", a.role = "radio", a.className = "ui-segmented__item", a.setAttribute("part", s.valor === t ? "opcao opcao-selecionada" : "opcao"), a.dataset.valor = s.valor, a.dataset.indice = String(n);
235
+ const r = s.valor === t;
236
+ if (a.setAttribute("aria-checked", String(r)), a.tabIndex = r ? 0 : -1, r && a.classList.add("ui-segmented__item--ativo"), (i || s.disabled) && (a.disabled = !0), s.icone) {
237
+ const l = document.createElement("span");
238
+ l.className = "ui-segmented__icone";
239
+ const c = document.createElement("ui-icone");
240
+ c.setAttribute("nome", s.icone), c.setAttribute("tamanho", "14"), l.appendChild(c), a.appendChild(l);
241
+ }
242
+ const o = document.createElement("span");
243
+ return o.className = "ui-segmented__texto", o.textContent = s.rotulo, a.appendChild(o), a.addEventListener("click", (l) => {
244
+ l.stopPropagation(), e();
245
+ }), a;
246
+ }
247
+ class m extends b {
248
+ constructor() {
249
+ super();
250
+ u(this, "rootElement");
251
+ u(this, "trackElement");
252
+ u(this, "indicadorElement");
253
+ u(this, "slotElement");
254
+ u(this, "_opcoes", []);
255
+ u(this, "_defaultValue", "");
256
+ u(this, "listeners", new f());
257
+ u(this, "indicadorController");
258
+ u(this, "handleSlotChange", () => {
259
+ this._opcoes.length === 0 && this.carregarOpcoes();
260
+ });
261
+ u(this, "handleKeyDown", (t) => {
262
+ k(t, this.trackElement, this.disabled, (i) => {
263
+ this.selecionarIndice(i);
264
+ });
265
+ });
266
+ const t = this.attachShadow({ mode: "open" });
267
+ t.innerHTML = I(), this.rootElement = t.querySelector(".ui-segmented"), this.indicadorElement = t.querySelector(".ui-segmented__indicador"), this.trackElement = t.querySelector(".ui-segmented__track"), this.slotElement = t.querySelector("slot"), this.indicadorController = new z(
268
+ this.trackElement,
269
+ this.indicadorElement
270
+ );
271
+ }
272
+ static get observedAttributes() {
273
+ return C;
274
+ }
275
+ connectedCallback() {
276
+ this.listeners.cleanup(), this.listeners.add(this.rootElement, "keydown", this.handleKeyDown), this.listeners.add(this.slotElement, "slotchange", this.handleSlotChange), this._defaultValue || (this._defaultValue = this.getAttribute("valor") || this.getAttribute("value") || ""), this.indicadorController.iniciarObserver(this.rootElement), this.carregarOpcoes(), this.syncState();
277
+ }
278
+ disconnectedCallback() {
279
+ this.listeners.cleanup(), this.indicadorController.destruir();
280
+ }
281
+ attributeChangedCallback(t, i, e) {
282
+ i !== e && (t === "valor" || t === "value" ? this.atualizarSelecao(e || "") : this.syncState());
283
+ }
284
+ // === Ciclo de Vida Form-Associated Custom Elements (W3C FACE) ===
285
+ formResetCallback() {
286
+ this.valor = this._defaultValue, this.syncState();
287
+ }
288
+ formStateRestoreCallback(t, i) {
289
+ typeof t == "string" && (this.valor = t), this.syncState();
290
+ }
291
+ get type() {
292
+ return "select-one";
293
+ }
294
+ atualizarValidade() {
295
+ if (!this.internals || typeof this.internals.setValidity != "function") return;
296
+ if (this.disabled) {
297
+ this.internals.setValidity({});
298
+ return;
299
+ }
300
+ if (this._customErrorMessage) {
301
+ this.internals.setValidity({ customError: !0 }, this._customErrorMessage, this.rootElement);
302
+ return;
303
+ }
304
+ if ((this.hasAttribute("obrigatorio") || this.hasAttribute("required")) && (!this.valor || this.valor.trim() === "")) {
305
+ const i = this.getAttribute("mensagem-validacao") || "Selecione uma opção.";
306
+ this.internals.setValidity({ valueMissing: !0 }, i, this.rootElement);
307
+ return;
308
+ }
309
+ this.internals.setValidity({});
310
+ }
311
+ get valor() {
312
+ return this.getAttribute("valor") || this.getAttribute("value") || "";
313
+ }
314
+ set valor(t) {
315
+ this.setAttribute("valor", t), this.atualizarSelecao(t);
316
+ }
317
+ get value() {
318
+ return this.valor;
319
+ }
320
+ set value(t) {
321
+ this.valor = t;
322
+ }
323
+ get name() {
324
+ return this.getAttribute("name") || "";
325
+ }
326
+ set name(t) {
327
+ this.setAttribute("name", t);
328
+ }
329
+ get disabled() {
330
+ return this.hasAttribute("disabled") || this._formDisabled;
331
+ }
332
+ set disabled(t) {
333
+ t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
334
+ }
335
+ get opcoes() {
336
+ return this._opcoes;
337
+ }
338
+ set opcoes(t) {
339
+ this._opcoes = Array.isArray(t) ? t : [], this.renderizarOpcoes();
340
+ }
341
+ carregarOpcoes() {
342
+ const t = this.slotElement.assignedElements();
343
+ if (t.length > 0) {
344
+ const i = [];
345
+ t.forEach((e) => {
346
+ var a, r;
347
+ if (e instanceof HTMLElement) {
348
+ const o = e.getAttribute("valor") || e.getAttribute("value") || e.getAttribute("data-value") || ((a = e.textContent) == null ? void 0 : a.trim()) || "", l = e.getAttribute("label") || e.getAttribute("rotulo") || ((r = e.textContent) == null ? void 0 : r.trim()) || o, c = e.getAttribute("icone") || e.getAttribute("icon") || void 0, p = e.hasAttribute("disabled");
349
+ i.push({ valor: o, rotulo: l, icone: c, disabled: p });
350
+ }
351
+ }), this._opcoes = i, this.renderizarOpcoes();
352
+ }
353
+ }
354
+ renderizarOpcoes() {
355
+ this.trackElement.innerHTML = "";
356
+ const t = this.valor, i = this.disabled;
357
+ this._opcoes.forEach((a, r) => {
358
+ const o = q(
359
+ a,
360
+ r,
361
+ t,
362
+ i,
363
+ () => this.selecionarIndice(r)
364
+ );
365
+ this.trackElement.appendChild(o);
366
+ });
367
+ const e = this.required || this.hasAttribute("sem-selecao-inicial");
368
+ !t && this._opcoes.length > 0 && !e ? this.selecionarIndice(0, !1) : this.indicadorController.atualizar(), this.atualizarValidade();
369
+ }
370
+ selecionarIndice(t, i = !0) {
371
+ var r, o;
372
+ if (this.disabled) return;
373
+ const e = this._opcoes[t];
374
+ if (!e || e.disabled) return;
375
+ const a = this.valor;
376
+ this.setAttribute("valor", e.valor), this.internals && ((o = (r = this.internals).setFormValue) == null || o.call(r, e.valor)), this.atualizarSelecao(e.valor), i && a !== e.valor && (this.dispatchEvent(
377
+ new CustomEvent("ui-change", {
378
+ detail: { valor: e.valor, rotulo: e.rotulo, indice: t },
379
+ bubbles: !0,
380
+ composed: !0
381
+ })
382
+ ), this.dispatchEvent(
383
+ new CustomEvent("ui-selecionar", {
384
+ detail: { valor: e.valor, rotulo: e.rotulo, indice: t },
385
+ bubbles: !0,
386
+ composed: !0
387
+ })
388
+ ));
389
+ }
390
+ atualizarSelecao(t) {
391
+ var e, a;
392
+ Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((r) => {
393
+ const o = r.dataset.valor === t;
394
+ r.classList.toggle("ui-segmented__item--ativo", o), x(r, "opcao-selecionada", o), r.setAttribute("aria-checked", String(o)), r.tabIndex = o ? 0 : -1, o && r.focus();
395
+ }), this.internals && ((a = (e = this.internals).setFormValue) == null || a.call(e, t)), this.indicadorController.atualizar(), this.atualizarValidade();
396
+ }
397
+ syncState() {
398
+ const t = this.getAttribute("tamanho") || this.getAttribute("size") || "md", i = this.hasAttribute("largura-total") || this.hasAttribute("full-width"), e = this.disabled;
399
+ this.rootElement.className = `ui-segmented ui-segmented--${t}`, i && this.rootElement.classList.add("ui-segmented--full"), this.rootElement.setAttribute("aria-disabled", String(e)), Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach((r) => {
400
+ r.disabled = e;
401
+ }), this.indicadorController.atualizar(), this.atualizarValidade();
402
+ }
403
+ }
404
+ class L extends m {
405
+ }
406
+ d("ui-segmented", m);
407
+ d("ui-segmento", L);
408
+ export {
409
+ C as A,
410
+ z as S,
411
+ A as U,
412
+ m as a,
413
+ L as b,
414
+ w as c,
415
+ q as d,
416
+ I as e,
417
+ k as t
418
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";var E=Object.defineProperty;var A=(s,n,t)=>n in s?E(s,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[n]=t;var u=(s,n,t)=>A(s,typeof n!="symbol"?n+"":n,t);const d=require("./ssr-safe-CiHD1adl.cjs"),w=require("./listener-bag-D5omxZ9h.cjs"),z=require("./ui-campo-texto-Cnn2UAkS.cjs"),S=require("./parts-vQa2873h.cjs"),k=':host{display:block;box-sizing:border-box;margin:0;padding:0;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){display:inline-block}.ui-texto{margin:0;padding:0;box-sizing:border-box;font-family:inherit;color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.ui-texto--h1{font-size:var(--ui-tamanho-h1, clamp(24px, 4vw, 36px));font-weight:var(--ui-peso-negrito, 700);line-height:var(--ui-altura-linha-titulo, 1.25);letter-spacing:-.5px}.ui-texto--h2{font-size:var(--ui-tamanho-h2, clamp(20px, 3vw, 28px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25);letter-spacing:-.3px}.ui-texto--h3{font-size:var(--ui-tamanho-h3, clamp(18px, 2.4vw, 24px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h4{font-size:var(--ui-tamanho-h4, clamp(16px, 2vw, 20px));font-weight:var(--ui-peso-medio, 500);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h5{font-size:var(--ui-tamanho-h5, clamp(14px, 1.6vw, 18px));font-weight:var(--ui-peso-medio, 500);line-height:var(--ui-altura-linha-titulo, 1.25)}.ui-texto--h6{font-size:var(--ui-tamanho-h6, clamp(13px, 1.2vw, 16px));font-weight:var(--ui-peso-seminegrito, 600);line-height:var(--ui-altura-linha-titulo, 1.25);text-transform:uppercase;letter-spacing:.5px}.ui-texto--corpo{font-size:var(--ui-tamanho-corpo, 14px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5)}.ui-texto--corpo-sm{font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5)}.ui-texto--caption{font-size:var(--ui-tamanho-caption, 11px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-compacta, 1.2);color:var(--ui-cor-texto-secundario, #888899)}.ui-texto--codigo{font-family:var(--ui-fonte-codigo, monospace);font-size:var(--ui-tamanho-codigo, 12px);font-weight:var(--ui-peso-normal, 400);line-height:var(--ui-altura-linha-corpo, 1.5);background:var(--ui-cor-fundo-elevado, #1a1a1e);padding:2px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12))}.ui-texto--cor-primaria{color:var(--ui-cor-primaria, #00E08A)}.ui-texto--cor-secundaria{color:var(--ui-cor-texto-secundario, #888899)}.ui-texto--cor-destaque{color:var(--ui-cor-destaque, #00E08A)}.ui-texto--cor-erro{color:var(--ui-cor-texto-erro, #ff5555)}.ui-texto--cor-sucesso{color:var(--ui-cor-texto-sucesso, #00E08A)}.ui-texto--cor-alerta{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-texto--peso-normal{font-weight:var(--ui-peso-normal, 400)!important}.ui-texto--peso-medio{font-weight:var(--ui-peso-medio, 500)!important}.ui-texto--peso-seminegrito{font-weight:var(--ui-peso-seminegrito, 600)!important}.ui-texto--peso-negrito{font-weight:var(--ui-peso-negrito, 700)!important}.ui-texto--alinhamento-esquerda{text-align:left}.ui-texto--alinhamento-centro{text-align:center}.ui-texto--alinhamento-direita{text-align:right}.ui-texto--alinhamento-justificado{text-align:justify}.ui-texto--truncar{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}',C=new Set(["p","span","div","h1","h2","h3","h4","h5","h6","small","code","strong","em","label","blockquote","pre","b","i"]);class m extends d.SafeHTMLElement{constructor(){super();u(this,"container");u(this,"shadow");typeof this.attachShadow=="function"&&typeof document<"u"?(this.shadow=this.attachShadow({mode:"open"}),this.container=document.createElement("p"),this.container.className="ui-texto ui-texto--corpo",this.container.appendChild(document.createElement("slot")),this.shadow.innerHTML=`<style>${k}</style>`,this.shadow.appendChild(this.container)):(this.shadow=null,this.container=null)}static get observedAttributes(){return["variante","tag","cor","peso","alinhamento","truncar"]}connectedCallback(){this.render()}attributeChangedCallback(t,i,e){this.render()}resolveTag(){const t=this.getAttribute("tag");if(t){const e=t.toLowerCase().trim();if(C.has(e))return e;console.warn(`[ui-texto] Tag "${t}" não permitida ou inválida. Utilizando fallback semântico.`)}const i=(this.getAttribute("variante")||"corpo").toLowerCase();switch(i){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return i;case"caption":return"small";case"codigo":return"code";case"corpo-sm":case"corpo":default:return"p"}}render(){const t=this.resolveTag(),i=this.getAttribute("variante")||"corpo",e=this.getAttribute("cor"),a=this.getAttribute("peso"),r=this.getAttribute("alinhamento"),o=this.hasAttribute("truncar");if(this.container.tagName.toLowerCase()!==t){const c=document.createElement(t);c.appendChild(document.createElement("slot")),this.shadow.replaceChild(c,this.container),this.container=c}const l=["ui-texto",`ui-texto--${i}`];e&&l.push(`ui-texto--cor-${e}`),a&&l.push(`ui-texto--peso-${a}`),r&&l.push(`ui-texto--alinhamento-${r}`),o&&l.push("ui-texto--truncar"),this.container.className=l.join(" ")}}d.definirCustomElement("ui-texto",m);const I=':host{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle;position:relative}.ui-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--ui-tamanho-avatar, 36px);height:var(--ui-tamanho-avatar, 36px);min-width:var(--ui-tamanho-avatar, 36px);min-height:var(--ui-tamanho-avatar, 36px);border-radius:50%;background-color:var(--ui-cor-fundo-elevado, #22222a);color:var(--ui-cor-primaria, #00E08A);font-weight:600;font-size:var(--ui-avatar-font-size, 14px);-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));line-height:1}.ui-avatar__img{width:100%;height:100%;object-fit:cover;display:block}.ui-avatar--quadrado{border-radius:8px}.ui-avatar__status{position:absolute;bottom:0;right:0;width:25%;height:25%;min-width:8px;min-height:8px;max-width:14px;max-height:14px;border-radius:50%;border:2px solid var(--ui-cor-fundo-card, #121214);box-sizing:border-box}.ui-avatar__status--online{background-color:var(--ui-cor-primaria, #00E08A)}.ui-avatar__status--offline{background-color:#889}.ui-avatar__status--ausente{background-color:#ffb86c}.ui-avatar__status--ocupado{background-color:#f55}.ui-avatar--xs{--ui-tamanho-avatar: 20px;--ui-avatar-font-size: 10px}.ui-avatar--sm{--ui-tamanho-avatar: 28px;--ui-avatar-font-size: 11px}.ui-avatar--md{--ui-tamanho-avatar: 36px;--ui-avatar-font-size: 14px}.ui-avatar--lg{--ui-tamanho-avatar: 48px;--ui-avatar-font-size: 18px}.ui-avatar--xl{--ui-tamanho-avatar: 64px;--ui-avatar-font-size: 24px}';class p extends d.SafeHTMLElement{constructor(){super();u(this,"avatarElement");u(this,"statusElement");const t=this.attachShadow({mode:"open"});t.innerHTML=`
2
+ <style>${I}</style>
3
+ <div class="ui-avatar">
4
+ <span class="ui-avatar__content"></span>
5
+ </div>
6
+ <span class="ui-avatar__status" style="display: none;"></span>
7
+ `,this.avatarElement=t.querySelector(".ui-avatar"),this.statusElement=t.querySelector(".ui-avatar__status")}static get observedAttributes(){return["src","nome","name","tamanho","size","formato","status"]}connectedCallback(){this.syncState()}attributeChangedCallback(t,i,e){this.syncState()}extrairIniciais(t){const i=t.trim().split(/\s+/).filter(Boolean);if(i.length===0)return"?";if(i.length===1)return i[0].substring(0,2).toUpperCase();const e=i[0][0],a=i[i.length-1][0];return(e+a).toUpperCase()}syncState(){const t=this.getAttribute("src"),i=this.getAttribute("nome")||this.getAttribute("name")||"",e=this.getAttribute("tamanho")||this.getAttribute("size")||"md",a=this.getAttribute("formato")||"circulo",r=this.getAttribute("status");this.avatarElement.className="ui-avatar",["xs","sm","md","lg","xl"].includes(e)?(this.avatarElement.classList.add(`ui-avatar--${e}`),this.avatarElement.style.removeProperty("--ui-tamanho-avatar")):isNaN(parseInt(e,10))?this.avatarElement.style.removeProperty("--ui-tamanho-avatar"):this.avatarElement.style.setProperty("--ui-tamanho-avatar",`${parseInt(e,10)}px`),a==="quadrado"&&this.avatarElement.classList.add("ui-avatar--quadrado");const o=this.avatarElement.querySelector(".ui-avatar__content");if(o)if(t){const l=o.querySelector("img");if(l&&l.getAttribute("src")===t)l.alt=i||"Avatar";else{o.textContent="";const c=document.createElement("img");c.className="ui-avatar__img",c.src=t,c.alt=i||"Avatar",c.onerror=()=>{this.renderFallback(o,i)},o.appendChild(c)}}else o.textContent="",this.renderFallback(o,i);r&&["online","offline","ausente","ocupado"].includes(r)?(this.statusElement.className=`ui-avatar__status ui-avatar__status--${r}`,this.statusElement.style.display="block"):this.statusElement.style.display="none"}renderFallback(t,i){i?t.textContent=this.extrairIniciais(i):t.innerHTML=`
8
+ <svg viewBox="0 0 24 24" width="60%" height="60%" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
9
+ <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
10
+ <circle cx="12" cy="7" r="4"></circle>
11
+ </svg>
12
+ `}}d.definirCustomElement("ui-avatar",p);class g{constructor(n,t){u(this,"rafId",null);u(this,"resizeObserver");this.trackElement=n,this.indicadorElement=t}iniciarObserver(n,t){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(()=>{this.atualizar(),t&&t()}),this.resizeObserver.observe(n))}destruir(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}atualizar(){this.rafId!==null&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.rafId=null;const n=this.trackElement.querySelector(".ui-segmented__item--ativo");if(!n){this.indicadorElement.style.opacity="0";return}const t=this.indicadorElement.parentElement,i=n.getBoundingClientRect(),e=t==null?void 0:t.getBoundingClientRect();let a,r;if(t&&e&&i.width>0&&e.width>0){const o=t.clientLeft||0;a=Number((i.left-e.left-o).toFixed(2)),r=Number(i.width.toFixed(2))}else a=Math.round(n.offsetLeft),r=Math.round(n.offsetWidth);this.indicadorElement.style.transform=`translateX(${a}px)`,this.indicadorElement.style.width=`${r}px`,this.indicadorElement.style.opacity="1"})}}function v(s,n,t,i){if(t)return;const e=Array.from(n.querySelectorAll(".ui-segmented__item:not(:disabled)"));if(e.length===0)return;const a=e.findIndex(l=>l.classList.contains("ui-segmented__item--ativo"));let r=a;if(s.key==="ArrowRight"||s.key==="ArrowDown")s.preventDefault(),r=(a+1)%e.length;else if(s.key==="ArrowLeft"||s.key==="ArrowUp")s.preventDefault(),r=(a-1+e.length)%e.length;else if(s.key==="Home")s.preventDefault(),r=0;else if(s.key==="End")s.preventDefault(),r=e.length-1;else return;const o=e[r];if(o&&o.dataset.indice){const l=parseInt(o.dataset.indice,10);i(l)}}const q=':host{display:inline-block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([largura-total]),:host([full-width]){display:block;width:100%}.ui-segmented{display:inline-flex;position:relative;background-color:var(--ui-cor-fundo, #0b0b0d);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);padding:3px;box-sizing:border-box;-webkit-user-select:none;user-select:none;gap:2px;align-items:center}.ui-segmented--full{display:flex;width:100%}.ui-segmented--full .ui-segmented__item{flex:1}.ui-segmented--sm{padding:2px;height:28px}.ui-segmented--sm .ui-segmented__item{font-size:12px;padding:0 8px;height:22px}.ui-segmented--md{padding:3px;height:36px}.ui-segmented--md .ui-segmented__item{font-size:13px;padding:0 14px;height:28px}.ui-segmented--lg{padding:4px;height:42px}.ui-segmented--lg .ui-segmented__item{font-size:14px;padding:0 18px;height:32px}.ui-segmented__indicador{position:absolute;top:3px;bottom:3px;left:0;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #1e1e24);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:calc(var(--ui-raio-borda, 8px) - 2px);box-shadow:var(--ui-sombra-sm, 0 2px 8px rgba(0, 0, 0, .4));pointer-events:none;transition:transform .22s cubic-bezier(.16,1,.3,1),width .22s cubic-bezier(.16,1,.3,1),opacity .15s ease;z-index:1;opacity:0}.ui-segmented--sm .ui-segmented__indicador{top:2px;bottom:2px}.ui-segmented--lg .ui-segmented__indicador{top:4px;bottom:4px}.ui-segmented__item{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;gap:6px;background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-family:inherit;font-weight:500;cursor:pointer;border-radius:calc(var(--ui-raio-borda, 8px) - 2px);line-height:1;white-space:nowrap;transition:color .15s ease;box-sizing:border-box}.ui-segmented__item:hover:not(:disabled){color:var(--ui-cor-texto, #e1e1e6)}.ui-segmented__item--ativo{color:var(--ui-cor-texto, #ffffff)!important;font-weight:600}.ui-segmented__item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-cor-primaria, #00E08A)}.ui-segmented__item:disabled{opacity:.35;cursor:not-allowed}.ui-segmented__icone{display:inline-flex;align-items:center;justify-content:center;line-height:1}.ui-segmented__icone ui-icone,.ui-segmented__icone svg{shape-rendering:geometricPrecision;display:inline-flex;align-items:center;justify-content:center}',f=["valor","value","name","disabled","tamanho","size","largura-total","full-width","obrigatorio","required","mensagem-validacao"];function b(){return`
13
+ <style>${q}</style>
14
+ <div class="ui-segmented ui-segmented--md" part="base" role="radiogroup">
15
+ <div class="ui-segmented__indicador" part="indicador"></div>
16
+ <div class="ui-segmented__track" style="display: contents;"></div>
17
+ <slot style="display: none;"></slot>
18
+ </div>
19
+ `}function x(s,n,t,i,e){const a=document.createElement("button");a.type="button",a.role="radio",a.className="ui-segmented__item",a.setAttribute("part",s.valor===t?"opcao opcao-selecionada":"opcao"),a.dataset.valor=s.valor,a.dataset.indice=String(n);const r=s.valor===t;if(a.setAttribute("aria-checked",String(r)),a.tabIndex=r?0:-1,r&&a.classList.add("ui-segmented__item--ativo"),(i||s.disabled)&&(a.disabled=!0),s.icone){const l=document.createElement("span");l.className="ui-segmented__icone";const c=document.createElement("ui-icone");c.setAttribute("nome",s.icone),c.setAttribute("tamanho","14"),l.appendChild(c),a.appendChild(l)}const o=document.createElement("span");return o.className="ui-segmented__texto",o.textContent=s.rotulo,a.appendChild(o),a.addEventListener("click",l=>{l.stopPropagation(),e()}),a}class h extends z.FormAssociatedElement{constructor(){super();u(this,"rootElement");u(this,"trackElement");u(this,"indicadorElement");u(this,"slotElement");u(this,"_opcoes",[]);u(this,"_defaultValue","");u(this,"listeners",new w.ListenerBag);u(this,"indicadorController");u(this,"handleSlotChange",()=>{this._opcoes.length===0&&this.carregarOpcoes()});u(this,"handleKeyDown",t=>{v(t,this.trackElement,this.disabled,i=>{this.selecionarIndice(i)})});const t=this.attachShadow({mode:"open"});t.innerHTML=b(),this.rootElement=t.querySelector(".ui-segmented"),this.indicadorElement=t.querySelector(".ui-segmented__indicador"),this.trackElement=t.querySelector(".ui-segmented__track"),this.slotElement=t.querySelector("slot"),this.indicadorController=new g(this.trackElement,this.indicadorElement)}static get observedAttributes(){return f}connectedCallback(){this.listeners.cleanup(),this.listeners.add(this.rootElement,"keydown",this.handleKeyDown),this.listeners.add(this.slotElement,"slotchange",this.handleSlotChange),this._defaultValue||(this._defaultValue=this.getAttribute("valor")||this.getAttribute("value")||""),this.indicadorController.iniciarObserver(this.rootElement),this.carregarOpcoes(),this.syncState()}disconnectedCallback(){this.listeners.cleanup(),this.indicadorController.destruir()}attributeChangedCallback(t,i,e){i!==e&&(t==="valor"||t==="value"?this.atualizarSelecao(e||""):this.syncState())}formResetCallback(){this.valor=this._defaultValue,this.syncState()}formStateRestoreCallback(t,i){typeof t=="string"&&(this.valor=t),this.syncState()}get type(){return"select-one"}atualizarValidade(){if(!this.internals||typeof this.internals.setValidity!="function")return;if(this.disabled){this.internals.setValidity({});return}if(this._customErrorMessage){this.internals.setValidity({customError:!0},this._customErrorMessage,this.rootElement);return}if((this.hasAttribute("obrigatorio")||this.hasAttribute("required"))&&(!this.valor||this.valor.trim()==="")){const i=this.getAttribute("mensagem-validacao")||"Selecione uma opção.";this.internals.setValidity({valueMissing:!0},i,this.rootElement);return}this.internals.setValidity({})}get valor(){return this.getAttribute("valor")||this.getAttribute("value")||""}set valor(t){this.setAttribute("valor",t),this.atualizarSelecao(t)}get value(){return this.valor}set value(t){this.valor=t}get name(){return this.getAttribute("name")||""}set name(t){this.setAttribute("name",t)}get disabled(){return this.hasAttribute("disabled")||this._formDisabled}set disabled(t){t?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get opcoes(){return this._opcoes}set opcoes(t){this._opcoes=Array.isArray(t)?t:[],this.renderizarOpcoes()}carregarOpcoes(){const t=this.slotElement.assignedElements();if(t.length>0){const i=[];t.forEach(e=>{var a,r;if(e instanceof HTMLElement){const o=e.getAttribute("valor")||e.getAttribute("value")||e.getAttribute("data-value")||((a=e.textContent)==null?void 0:a.trim())||"",l=e.getAttribute("label")||e.getAttribute("rotulo")||((r=e.textContent)==null?void 0:r.trim())||o,c=e.getAttribute("icone")||e.getAttribute("icon")||void 0,y=e.hasAttribute("disabled");i.push({valor:o,rotulo:l,icone:c,disabled:y})}}),this._opcoes=i,this.renderizarOpcoes()}}renderizarOpcoes(){this.trackElement.innerHTML="";const t=this.valor,i=this.disabled;this._opcoes.forEach((a,r)=>{const o=x(a,r,t,i,()=>this.selecionarIndice(r));this.trackElement.appendChild(o)});const e=this.required||this.hasAttribute("sem-selecao-inicial");!t&&this._opcoes.length>0&&!e?this.selecionarIndice(0,!1):this.indicadorController.atualizar(),this.atualizarValidade()}selecionarIndice(t,i=!0){var r,o;if(this.disabled)return;const e=this._opcoes[t];if(!e||e.disabled)return;const a=this.valor;this.setAttribute("valor",e.valor),this.internals&&((o=(r=this.internals).setFormValue)==null||o.call(r,e.valor)),this.atualizarSelecao(e.valor),i&&a!==e.valor&&(this.dispatchEvent(new CustomEvent("ui-change",{detail:{valor:e.valor,rotulo:e.rotulo,indice:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-selecionar",{detail:{valor:e.valor,rotulo:e.rotulo,indice:t},bubbles:!0,composed:!0})))}atualizarSelecao(t){var e,a;Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach(r=>{const o=r.dataset.valor===t;r.classList.toggle("ui-segmented__item--ativo",o),S.alternarPart(r,"opcao-selecionada",o),r.setAttribute("aria-checked",String(o)),r.tabIndex=o?0:-1,o&&r.focus()}),this.internals&&((a=(e=this.internals).setFormValue)==null||a.call(e,t)),this.indicadorController.atualizar(),this.atualizarValidade()}syncState(){const t=this.getAttribute("tamanho")||this.getAttribute("size")||"md",i=this.hasAttribute("largura-total")||this.hasAttribute("full-width"),e=this.disabled;this.rootElement.className=`ui-segmented ui-segmented--${t}`,i&&this.rootElement.classList.add("ui-segmented--full"),this.rootElement.setAttribute("aria-disabled",String(e)),Array.from(this.trackElement.querySelectorAll(".ui-segmented__item")).forEach(r=>{r.disabled=e}),this.indicadorController.atualizar(),this.atualizarValidade()}}class _ extends h{}d.definirCustomElement("ui-segmented",h);d.definirCustomElement("ui-segmento",_);exports.ATRIBUTOS_OBSERVADOS_SEGMENTED=f;exports.SegmentedIndicadorController=g;exports.UIAvatar=p;exports.UISegmented=h;exports.UISegmento=_;exports.UITexto=m;exports.criarBotaoOpcao=x;exports.criarTemplateSegmented=b;exports.tratarTecladoSegmented=v;