@thibezer/ui-components-kit 2.17.0 → 2.17.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 (127) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/camadas.cjs +85 -86
  3. package/dist/camadas.js +1380 -1331
  4. package/dist/components/ui-camadas/camadas-colecao.d.ts +3 -0
  5. package/dist/components/ui-camadas/camadas-drag-drop.d.ts +3 -1
  6. package/dist/components/ui-camadas/camadas-selecao-api.d.ts +1 -0
  7. package/dist/cores.cjs +1 -1
  8. package/dist/cores.js +2 -2
  9. package/dist/custom-elements.json +19922 -19922
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/register.cjs +1 -1
  13. package/dist/register.js +2 -2
  14. package/dist/{ui-controle-cores-Bq_XUrIQ.cjs → ui-controle-cores-B1w_Yl69.cjs} +1 -1
  15. package/dist/{ui-controle-cores-BtA6yzu3.js → ui-controle-cores-BRjMvmMn.js} +1 -1
  16. package/dist/ui-seletor-cor-CMuuW-Ym.cjs +83 -0
  17. package/dist/ui-seletor-cor-DFIQ1sin.js +405 -0
  18. package/package.json +1 -1
  19. package/dist/form-validacao-BIOXxt-1.js +0 -140
  20. package/dist/form-validacao-ytRYSF3E.cjs +0 -1
  21. package/dist/gerencigeo-canvas/layer_defaults.d.ts +0 -3
  22. package/dist/gerencigeo-canvas/layer_instance_ops.d.ts +0 -6
  23. package/dist/gerencigeo-canvas/layer_state_ops.d.ts +0 -6
  24. package/dist/leaflet-DcO7uRC-.cjs +0 -1
  25. package/dist/leaflet-PPDKB6Dd.js +0 -69
  26. package/dist/motor-BCWqlv3e.cjs +0 -1
  27. package/dist/motor-CXjQjVba.js +0 -1386
  28. package/dist/svg-seguro-BsbNQqpd.js +0 -50
  29. package/dist/svg-seguro-C76iLlAZ.cjs +0 -1
  30. package/dist/ui-badge-1UU8vT-b.js +0 -198
  31. package/dist/ui-badge-B5J_c5P5.js +0 -197
  32. package/dist/ui-badge-BxT-sDmV.cjs +0 -28
  33. package/dist/ui-badge-C0eKBI8E.js +0 -183
  34. package/dist/ui-badge-CKKKPdt8.cjs +0 -28
  35. package/dist/ui-badge-DC4y6Dik.cjs +0 -28
  36. package/dist/ui-botao-BOOnP8ds.cjs +0 -12
  37. package/dist/ui-botao-D24oXySA.cjs +0 -12
  38. package/dist/ui-botao-DfqSivHl.js +0 -165
  39. package/dist/ui-botao-Dsj08jjw.js +0 -165
  40. package/dist/ui-botao-OGJV6Vfk.js +0 -165
  41. package/dist/ui-botao-bU_bf6SU.js +0 -166
  42. package/dist/ui-botao-psS1juof.cjs +0 -12
  43. package/dist/ui-botao-xTbH5mpH.cjs +0 -12
  44. package/dist/ui-campo-texto-19tIrmBK.js +0 -377
  45. package/dist/ui-campo-texto-CH8mzX61.cjs +0 -16
  46. package/dist/ui-campo-texto-Cnn2UAkS.cjs +0 -16
  47. package/dist/ui-campo-texto-DVU_sWV1.cjs +0 -16
  48. package/dist/ui-campo-texto-Uu2dJE_0.js +0 -379
  49. package/dist/ui-campo-texto-W5M0gNE4.js +0 -377
  50. package/dist/ui-card-0wu4rjEX.cjs +0 -20
  51. package/dist/ui-card-B86lJXTP.cjs +0 -20
  52. package/dist/ui-card-BYyYxxY1.cjs +0 -20
  53. package/dist/ui-card-C_o5_0cB.js +0 -111
  54. package/dist/ui-card-CojoGXaT.js +0 -144
  55. package/dist/ui-card-DRtpOo3l.js +0 -143
  56. package/dist/ui-controle-cores-B4R6ct4I.js +0 -291
  57. package/dist/ui-controle-cores-BS0WYPdi.js +0 -572
  58. package/dist/ui-controle-cores-C8um-If9.cjs +0 -32
  59. package/dist/ui-controle-cores-CHMKGemo.cjs +0 -141
  60. package/dist/ui-controle-cores-C_cVXxCn.js +0 -291
  61. package/dist/ui-controle-cores-CuDFS8Y8.cjs +0 -32
  62. package/dist/ui-controle-cores-Dog7ERYv.js +0 -697
  63. package/dist/ui-controle-cores-Er6ZcQ7U.cjs +0 -111
  64. package/dist/ui-linha-BxhEBn27.js +0 -749
  65. package/dist/ui-linha-C306zxWG.cjs +0 -19
  66. package/dist/ui-linha-C_azWkcG.js +0 -517
  67. package/dist/ui-linha-CcalUBDw.cjs +0 -38
  68. package/dist/ui-linha-DAz6DBcl.cjs +0 -38
  69. package/dist/ui-linha-DkxwMhD-.js +0 -749
  70. package/dist/ui-modal-4nU-tXjO.cjs +0 -18
  71. package/dist/ui-modal-BkYvNP0G.js +0 -214
  72. package/dist/ui-modal-BwB9fksp.js +0 -214
  73. package/dist/ui-modal-CUNbpbZ1.cjs +0 -18
  74. package/dist/ui-modal-CvGFGh1h.cjs +0 -18
  75. package/dist/ui-modal-DBOtSTbR.js +0 -238
  76. package/dist/ui-paleta-ferramentas-BXXrI1Y7.js +0 -1233
  77. package/dist/ui-paleta-ferramentas-CEZYcN4J.js +0 -624
  78. package/dist/ui-paleta-ferramentas-CU4icLl0.js +0 -1171
  79. package/dist/ui-paleta-ferramentas-Ccmo-rB5.cjs +0 -21
  80. package/dist/ui-paleta-ferramentas-CsPMTY0G.cjs +0 -21
  81. package/dist/ui-paleta-ferramentas-DLwZHIDv.cjs +0 -21
  82. package/dist/ui-paleta-ferramentas-DNN5i6nL.js +0 -860
  83. package/dist/ui-paleta-ferramentas-Dbj1kBS9.cjs +0 -18
  84. package/dist/ui-paleta-ferramentas-DbwdWVtT.js +0 -1173
  85. package/dist/ui-paleta-ferramentas-bvqxj1Yd.cjs +0 -21
  86. package/dist/ui-segmented-D6b6zxVs.cjs +0 -19
  87. package/dist/ui-segmented-DyF5YLsV.js +0 -418
  88. package/dist/ui-segmented-rn9RxRGM.cjs +0 -19
  89. package/dist/ui-segmented-wUraId2e.js +0 -412
  90. package/dist/ui-seletor-cor-C4U2eqxY.cjs +0 -82
  91. package/dist/ui-seletor-cor-D2_C6Aor.js +0 -391
  92. package/dist/ui-seletor-cor-DPKqf5wb.cjs +0 -82
  93. package/dist/ui-seletor-cor-FYtRccnK.js +0 -396
  94. package/dist/ui-skeleton-B2Rgrv8o.js +0 -648
  95. package/dist/ui-skeleton-DEHwpDqa.js +0 -648
  96. package/dist/ui-skeleton-DI4_9WOX.js +0 -428
  97. package/dist/ui-skeleton-DiOxTBZK.cjs +0 -52
  98. package/dist/ui-skeleton-SPYqku8P.cjs +0 -52
  99. package/dist/ui-skeleton-W9uwIceA.js +0 -585
  100. package/dist/ui-skeleton-elhKIh2B.cjs +0 -33
  101. package/dist/ui-skeleton-sIphhOSx.cjs +0 -52
  102. package/dist/ui-switch-BL-x_-SM.js +0 -1202
  103. package/dist/ui-switch-BcOqOkiV.js +0 -856
  104. package/dist/ui-switch-C0i_3QXu.cjs +0 -66
  105. package/dist/ui-switch-D7iPKDj-.cjs +0 -53
  106. package/dist/ui-switch-DAIgOhqr.cjs +0 -66
  107. package/dist/ui-switch-_F8yubdX.js +0 -1203
  108. package/dist/ui-tabela-propriedades-2bq2nX-b.js +0 -3202
  109. package/dist/ui-tabela-propriedades-8IAYmk3P.cjs +0 -142
  110. package/dist/ui-tabela-propriedades-B8AwlpqL.cjs +0 -141
  111. package/dist/ui-tabela-propriedades-BBr5sqki.cjs +0 -145
  112. package/dist/ui-tabela-propriedades-BecPqC-e.cjs +0 -141
  113. package/dist/ui-tabela-propriedades-BoYXzP5Z.js +0 -3191
  114. package/dist/ui-tabela-propriedades-BokvDD3b.js +0 -2648
  115. package/dist/ui-tabela-propriedades-Boy7I5yW.js +0 -2412
  116. package/dist/ui-tabela-propriedades-C-PeuW1i.cjs +0 -141
  117. package/dist/ui-tabela-propriedades-C5YYnod1.js +0 -3053
  118. package/dist/ui-tabela-propriedades-CnfW9DZG.cjs +0 -142
  119. package/dist/ui-tabela-propriedades-CyPyKXtB.js +0 -3013
  120. package/dist/ui-tabela-propriedades-DWOKznMN.cjs +0 -142
  121. package/dist/ui-tabela-propriedades-Df9ajC6M.js +0 -2648
  122. package/dist/ui-tabela-propriedades-DqvPilK_.cjs +0 -142
  123. package/dist/ui-tabela-propriedades-DuaC4sFX.js +0 -2767
  124. package/dist/ui-toast-Bp_NlM5G.js +0 -156
  125. package/dist/ui-toast-DGTZKne5.cjs +0 -20
  126. package/dist/zero-js-triggers-C_KrvFOQ.js +0 -244
  127. package/dist/zero-js-triggers-C_gtaojZ.cjs +0 -1
@@ -1,238 +0,0 @@
1
- var y = Object.defineProperty;
2
- var E = (e, a, t) => a in e ? y(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
3
- var s = (e, a, t) => E(e, typeof a != "symbol" ? a + "" : a, t);
4
- import { d as f, S as w } from "./ssr-safe-5cWfJP-s.js";
5
- const A = ':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-modal__backdrop{display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:calc(var(--ui-z-modal, 1000) - 1);opacity:0;pointer-events:none;transition:opacity .25s ease}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{display:block;opacity:1;pointer-events:auto}.ui-modal__dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(.95);max-width:560px;width:90%;max-height:85vh;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-borda, 12px);box-shadow:var(--ui-sombra-lg, 0 12px 36px rgba(0, 0, 0, .6));z-index:var(--ui-z-modal, 1000);display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;overflow:hidden;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility 0s linear .2s;box-sizing:border-box;color:var(--ui-cor-texto, #e1e1e6)}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,-50%) scale(1);transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility 0s}@starting-style{:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:0;transform:translate(-50%,-50%) scale(.94)}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{opacity:0}}.ui-modal__handle{display:none;width:36px;height:4px;border-radius:2px;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent);margin:6px auto 12px;flex-shrink:0}.ui-modal__header{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);gap:12px}.ui-modal__titulo{font-size:18px;font-weight:600;margin:0;color:var(--ui-cor-texto, #e1e1e6)}.ui-modal__close{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-size:16px;cursor:pointer;padding:4px 8px;border-radius:var(--ui-raio-sm, 4px);line-height:1;display:inline-flex;align-items:center;justify-content:center;transition:color .15s ease,background-color .15s ease;touch-action:manipulation;-webkit-tap-highlight-color:transparent}:host([bloquear-fechamento]) .ui-modal__close{display:none}.ui-modal__close svg,.ui-modal__close ::slotted(svg){shape-rendering:geometricPrecision}.ui-modal__close:hover{color:#fff;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.ui-modal__body{padding:20px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:1;box-sizing:border-box}.ui-modal__footer{padding:14px 20px;display:flex;align-items:center;justify-content:flex-end;gap:12px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);background-color:var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15))}@media (max-width: 640px){.ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}.ui-modal__close{min-width:44px;min-height:44px;font-size:18px}.ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{transform:translateY(0)!important}.ui-modal__handle{display:block!important}}:host([bottom-sheet]) .ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}:host([bottom-sheet]) .ui-modal__close{min-width:44px;min-height:44px;font-size:18px}:host([bottom-sheet]) .ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([bottom-sheet][aberto]) .ui-modal__dialog,:host([bottom-sheet][open]) .ui-modal__dialog{transform:translateY(0)!important}:host([bottom-sheet]) .ui-modal__handle{display:block!important}';
6
- function k(e) {
7
- const a = /* @__PURE__ */ new Set();
8
- if (typeof document > "u") return a;
9
- let t = e;
10
- for (; t && t !== document.body && t !== document.documentElement; ) {
11
- const i = t.parentElement;
12
- if (!i) break;
13
- const o = Array.from(i.children);
14
- for (const r of o)
15
- if (r !== t && !r.contains(e) && r.tagName !== "SCRIPT" && r.tagName !== "STYLE" && !(r.hasAttribute("inert") || r.inert === !0)) {
16
- r.setAttribute("inert", "");
17
- try {
18
- r.inert = !0;
19
- } catch {
20
- }
21
- a.add(r);
22
- }
23
- t = i;
24
- }
25
- if (document.body) {
26
- const i = Array.from(document.body.children);
27
- for (const o of i)
28
- if (o !== e && !o.contains(e) && o.tagName !== "SCRIPT" && o.tagName !== "STYLE" && !(o.hasAttribute("inert") || o.inert === !0)) {
29
- o.setAttribute("inert", "");
30
- try {
31
- o.inert = !0;
32
- } catch {
33
- }
34
- a.add(o);
35
- }
36
- }
37
- return a;
38
- }
39
- function S(e) {
40
- e.forEach((a) => {
41
- try {
42
- a.removeAttribute("inert"), a.inert = !1;
43
- } catch {
44
- }
45
- }), e.clear();
46
- }
47
- const n = [];
48
- let b = /* @__PURE__ */ new Set(), _ = "";
49
- function g() {
50
- S(b);
51
- const e = n[n.length - 1];
52
- b = e ? k(e) : /* @__PURE__ */ new Set();
53
- }
54
- function C(e) {
55
- const a = n.indexOf(e);
56
- a >= 0 && n.splice(a, 1), n.length === 0 && (_ = document.body.style.overflow, document.body.style.overflow = "hidden"), n.push(e), g();
57
- }
58
- function p(e) {
59
- const a = n.indexOf(e);
60
- a < 0 || (n.splice(a, 1), n.length === 0 && (document.body.style.overflow = _), g());
61
- }
62
- function I(e) {
63
- return n[n.length - 1] === e;
64
- }
65
- const u = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), ui-campo-texto, ui-input, ui-botao, ui-botao-primario, ui-checkbox, ui-switch, ui-lista-flutuante, ui-radio, ui-select, ui-segmented';
66
- function F() {
67
- var a;
68
- let e = document.activeElement;
69
- for (; (a = e == null ? void 0 : e.shadowRoot) != null && a.activeElement; )
70
- e = e.shadowRoot.activeElement;
71
- return e;
72
- }
73
- class c extends w {
74
- constructor() {
75
- super();
76
- s(this, "backdropElement");
77
- s(this, "dialogElement");
78
- s(this, "tituloElement");
79
- s(this, "closeElement");
80
- s(this, "_elementoGatilho", null);
81
- s(this, "_focables", []);
82
- s(this, "_tituloId");
83
- /** Estado já aplicado (pilha, inert, scroll, eventos); difere de `aberto` durante uma transição. */
84
- s(this, "_estaAberto", !1);
85
- s(this, "handleSlotChange", () => {
86
- this.syncState();
87
- });
88
- s(this, "handleBackdropClick", (t) => {
89
- t.stopPropagation(), this.fechar();
90
- });
91
- s(this, "handleCloseClick", (t) => {
92
- t.stopPropagation(), this.fechar();
93
- });
94
- s(this, "handleKeyDown", (t) => {
95
- var i, o;
96
- if (this._estaAberto && I(this)) {
97
- if (t.key === "Escape")
98
- this.fechar(), t.stopImmediatePropagation();
99
- else if (t.key === "Tab") {
100
- if (this._atualizarFocables(), this._focables.length === 0) {
101
- t.preventDefault();
102
- return;
103
- }
104
- const r = this._focables[0], d = this._focables[this._focables.length - 1], l = this.getRootNode().activeElement;
105
- t.shiftKey ? (l === r || !this.contains(l) && !((i = this.shadowRoot) != null && i.contains(l))) && (t.preventDefault(), d.focus()) : (l === d || !this.contains(l) && !((o = this.shadowRoot) != null && o.contains(l))) && (t.preventDefault(), r.focus());
106
- }
107
- }
108
- });
109
- this._tituloId = `ui-modal-title-${Math.random().toString(36).substring(2, 9)}`;
110
- const t = this.attachShadow({ mode: "open" });
111
- t.innerHTML = `
112
- <style>${A}</style>
113
- <div class="ui-modal__backdrop" part="fundo"></div>
114
- <div class="ui-modal__dialog" part="painel" role="dialog" aria-modal="true" aria-labelledby="${this._tituloId}" tabindex="-1">
115
- <div class="ui-modal__handle"></div>
116
- <div class="ui-modal__header" part="cabecalho">
117
- <h3 class="ui-modal__titulo" part="titulo" id="${this._tituloId}"></h3>
118
- <button class="ui-modal__close" part="fechar" type="button" aria-label="Fechar modal" title="Fechar">✕</button>
119
- </div>
120
- <div class="ui-modal__body" part="corpo">
121
- <slot></slot>
122
- </div>
123
- <div class="ui-modal__footer" part="rodape">
124
- <slot name="rodape"></slot>
125
- <slot name="footer"></slot>
126
- </div>
127
- </div>
128
- `, this.backdropElement = t.querySelector(".ui-modal__backdrop"), this.dialogElement = t.querySelector(".ui-modal__dialog"), this.tituloElement = t.querySelector(".ui-modal__titulo"), this.closeElement = t.querySelector(".ui-modal__close");
129
- }
130
- static get observedAttributes() {
131
- return [
132
- "aberto",
133
- "open",
134
- "titulo",
135
- "title",
136
- "aria-label",
137
- "aria-labelledby",
138
- "rotulo",
139
- "bottom-sheet",
140
- "bloquear-fechamento"
141
- ];
142
- }
143
- connectedCallback() {
144
- this.backdropElement.addEventListener("click", this.handleBackdropClick), this.closeElement.addEventListener("click", this.handleCloseClick), window.addEventListener("keydown", this.handleKeyDown), this.shadowRoot.querySelectorAll("slot").forEach((i) => {
145
- i.addEventListener("slotchange", this.handleSlotChange);
146
- }), this.syncState();
147
- }
148
- disconnectedCallback() {
149
- this.backdropElement.removeEventListener("click", this.handleBackdropClick), this.closeElement.removeEventListener("click", this.handleCloseClick), window.removeEventListener("keydown", this.handleKeyDown), this.shadowRoot.querySelectorAll("slot").forEach((i) => {
150
- i.removeEventListener("slotchange", this.handleSlotChange);
151
- }), this._estaAberto && (this._estaAberto = !1, p(this));
152
- }
153
- attributeChangedCallback(t, i, o) {
154
- this.syncState();
155
- }
156
- get aberto() {
157
- return this.hasAttribute("aberto") || this.hasAttribute("open");
158
- }
159
- set aberto(t) {
160
- t ? this.setAttribute("aberto", "") : (this.removeAttribute("aberto"), this.removeAttribute("open"));
161
- }
162
- abrir() {
163
- this.aberto = !0;
164
- }
165
- /** Fecha o modal, exceto com `bloquear-fechamento` (remova o atributo ou use `aberto = false` para forçar). */
166
- fechar() {
167
- this.hasAttribute("bloquear-fechamento") || (this.aberto = !1);
168
- }
169
- /**
170
- * Abrir/fechar pelo método, pela propriedade ou pelo atributo (`aberto`/`open`, comum em
171
- * React/Vue) passa sempre por aqui: mesmos eventos, mesmo foco e mesma camada de inert.
172
- */
173
- aoAbrir() {
174
- this._estaAberto = !0;
175
- const t = F();
176
- this._elementoGatilho = t && t !== document.body && !this.contains(t) ? t : null, C(this), this.dispatchEvent(new CustomEvent("ui-abrir", { bubbles: !0, composed: !0 })), setTimeout(() => {
177
- this._estaAberto && this.focarConteudoInicial();
178
- }, 0);
179
- }
180
- aoFechar() {
181
- this._estaAberto = !1, p(this), this.dispatchEvent(new CustomEvent("ui-fechar", { bubbles: !0, composed: !0 }));
182
- const t = this._elementoGatilho;
183
- this._elementoGatilho = null;
184
- const i = document.activeElement, o = !i || i === document.body || i === this || this.contains(i);
185
- t != null && t.isConnected && o && t.focus();
186
- }
187
- /**
188
- * Foco inicial: `[autofocus]`, senão o primeiro controle do conteúdo/rodapé.
189
- * O botão "✕" não recebe o foco inicial, evitando fechar o modal com um Enter acidental;
190
- * sem controles, o próprio diálogo é focado para que o leitor de tela anuncie o título.
191
- */
192
- focarConteudoInicial() {
193
- const t = this.obterFocaveisDoConteudo(), i = t.filter((o) => o.hasAttribute("autofocus"));
194
- for (const o of [...i, ...t]) {
195
- o.focus();
196
- const r = document.activeElement;
197
- if (r === o || o.contains(r)) return;
198
- }
199
- this.dialogElement.focus();
200
- }
201
- syncState() {
202
- var l, m;
203
- const t = this.aberto, i = this.getAttribute("titulo") || this.getAttribute("title") || "", o = (l = this.shadowRoot) == null ? void 0 : l.querySelector(".ui-modal__footer");
204
- this.dialogElement.setAttribute("aria-hidden", String(!t));
205
- const r = this.getAttribute("aria-label") || this.getAttribute("rotulo"), d = this.getAttribute("aria-labelledby");
206
- if (r ? (this.dialogElement.setAttribute("aria-label", r), this.dialogElement.removeAttribute("aria-labelledby")) : d ? (this.dialogElement.setAttribute("aria-labelledby", d), this.dialogElement.removeAttribute("aria-label")) : i ? (this.tituloElement.textContent = i, this.tituloElement.style.display = "block", this.dialogElement.setAttribute("aria-labelledby", this._tituloId), this.dialogElement.removeAttribute("aria-label")) : (this.tituloElement.style.display = "none", this.dialogElement.removeAttribute("aria-labelledby"), this.dialogElement.setAttribute("aria-label", "Diálogo modal")), o) {
207
- const v = Array.from(((m = this.shadowRoot) == null ? void 0 : m.querySelectorAll('slot[name="rodape"], slot[name="footer"]')) || []).some((x) => x.assignedNodes({ flatten: !0 }).some((h) => h.nodeType === Node.ELEMENT_NODE || h.textContent && h.textContent.trim() !== "")) || this.querySelector('[slot="rodape"], [slot="footer"]') !== null;
208
- o.style.display = v ? "flex" : "none";
209
- }
210
- this.isConnected && t !== this._estaAberto && (t ? this.aoAbrir() : this.aoFechar());
211
- }
212
- static ehFocavel(t) {
213
- return !t.hasAttribute("disabled") && t.getAttribute("aria-hidden") !== "true";
214
- }
215
- /** Focáveis do conteúdo projetado (corpo e rodapé), na ordem dos slots. */
216
- obterFocaveisDoConteudo() {
217
- const t = [];
218
- return this.shadowRoot.querySelectorAll("slot").forEach((i) => {
219
- i.assignedElements({ flatten: !0 }).forEach((o) => {
220
- o instanceof HTMLElement && (o.matches(u) && t.push(o), t.push(...Array.from(o.querySelectorAll(u))));
221
- });
222
- }), t.filter(c.ehFocavel);
223
- }
224
- _atualizarFocables() {
225
- const t = Array.from(this.shadowRoot.querySelectorAll(u)).filter((i) => window.getComputedStyle(i).display !== "none" && c.ehFocavel(i));
226
- this._focables = [...t, ...this.obterFocaveisDoConteudo()];
227
- }
228
- }
229
- class L extends c {
230
- }
231
- f("ui-modal", c);
232
- f("ui-dialog", L);
233
- export {
234
- L as U,
235
- c as a,
236
- k as b,
237
- S as r
238
- };