@thibezer/ui-components-kit 2.11.0 → 2.11.1

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 (70) hide show
  1. package/CHANGELOG.md +497 -487
  2. package/README.md +1 -1
  3. package/dist/camadas.cjs +2 -2
  4. package/dist/camadas.js +6 -9
  5. package/dist/components/ui-cores/cores-utils.d.ts +1 -1
  6. package/dist/components/ui-cores/tipos.d.ts +2 -2
  7. package/dist/components/ui-cores/ui-controle-cores.d.ts +1 -1
  8. package/dist/components/ui-cores/ui-seletor-cor.d.ts +8 -4
  9. package/dist/cores.cjs +1 -1
  10. package/dist/cores.js +2 -2
  11. package/dist/custom-elements.json +13560 -13514
  12. package/dist/form-validacao-BIOXxt-1.js +140 -0
  13. package/dist/form-validacao-ytRYSF3E.cjs +1 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.js +2 -2
  16. package/dist/register.cjs +1 -1
  17. package/dist/register.js +2 -2
  18. package/dist/svg-seguro-BsbNQqpd.js +50 -0
  19. package/dist/svg-seguro-C76iLlAZ.cjs +1 -0
  20. package/dist/ui-badge-BxT-sDmV.cjs +28 -0
  21. package/dist/ui-badge-C0eKBI8E.js +183 -0
  22. package/dist/ui-botao-BOOnP8ds.cjs +12 -0
  23. package/dist/ui-botao-DfqSivHl.js +165 -0
  24. package/dist/ui-botao-OGJV6Vfk.js +165 -0
  25. package/dist/ui-botao-psS1juof.cjs +12 -0
  26. package/dist/ui-campo-texto-Cnn2UAkS.cjs +16 -0
  27. package/dist/ui-campo-texto-Uu2dJE_0.js +379 -0
  28. package/dist/ui-card-B86lJXTP.cjs +20 -0
  29. package/dist/ui-card-C_o5_0cB.js +111 -0
  30. package/dist/{ui-controle-cores-DMtTUtLk.js → ui-controle-cores-B4R6ct4I.js} +9 -10
  31. package/dist/ui-controle-cores-BS0WYPdi.js +572 -0
  32. package/dist/{ui-controle-cores-CohlwXJK.cjs → ui-controle-cores-C8um-If9.cjs} +2 -2
  33. package/dist/ui-controle-cores-CHMKGemo.cjs +141 -0
  34. package/dist/ui-controle-cores-Dog7ERYv.js +697 -0
  35. package/dist/ui-controle-cores-Er6ZcQ7U.cjs +111 -0
  36. package/dist/ui-modal-CvGFGh1h.cjs +18 -0
  37. package/dist/ui-modal-DBOtSTbR.js +238 -0
  38. package/dist/ui-paleta-ferramentas-CEZYcN4J.js +624 -0
  39. package/dist/ui-paleta-ferramentas-CU4icLl0.js +1171 -0
  40. package/dist/ui-paleta-ferramentas-Ccmo-rB5.cjs +21 -0
  41. package/dist/ui-paleta-ferramentas-DLwZHIDv.cjs +21 -0
  42. package/dist/ui-paleta-ferramentas-DNN5i6nL.js +860 -0
  43. package/dist/ui-paleta-ferramentas-Dbj1kBS9.cjs +18 -0
  44. package/dist/ui-paleta-ferramentas-DbwdWVtT.js +1173 -0
  45. package/dist/ui-paleta-ferramentas-bvqxj1Yd.cjs +21 -0
  46. package/dist/ui-segmented-D6b6zxVs.cjs +19 -0
  47. package/dist/ui-segmented-DyF5YLsV.js +418 -0
  48. package/dist/ui-segmented-rn9RxRGM.cjs +19 -0
  49. package/dist/ui-segmented-wUraId2e.js +412 -0
  50. package/dist/ui-seletor-cor-C4U2eqxY.cjs +82 -0
  51. package/dist/ui-seletor-cor-D2_C6Aor.js +391 -0
  52. package/dist/ui-skeleton-DI4_9WOX.js +428 -0
  53. package/dist/ui-skeleton-SPYqku8P.cjs +52 -0
  54. package/dist/ui-skeleton-W9uwIceA.js +585 -0
  55. package/dist/ui-skeleton-elhKIh2B.cjs +33 -0
  56. package/dist/ui-switch-BcOqOkiV.js +856 -0
  57. package/dist/ui-switch-D7iPKDj-.cjs +53 -0
  58. package/dist/ui-tabela-propriedades-BBr5sqki.cjs +145 -0
  59. package/dist/ui-tabela-propriedades-BecPqC-e.cjs +141 -0
  60. package/dist/ui-tabela-propriedades-BokvDD3b.js +2648 -0
  61. package/dist/ui-tabela-propriedades-Boy7I5yW.js +2412 -0
  62. package/dist/ui-tabela-propriedades-C-PeuW1i.cjs +141 -0
  63. package/dist/ui-tabela-propriedades-Df9ajC6M.js +2648 -0
  64. package/dist/ui-toast-Bp_NlM5G.js +156 -0
  65. package/dist/ui-toast-DGTZKne5.cjs +20 -0
  66. package/dist/zero-js-triggers-C_KrvFOQ.js +244 -0
  67. package/dist/zero-js-triggers-C_gtaojZ.cjs +1 -0
  68. package/package.json +187 -186
  69. package/dist/ui-seletor-cor-D9iI7yew.js +0 -413
  70. package/dist/ui-seletor-cor-Ft06TEUH.cjs +0 -110
@@ -0,0 +1,379 @@
1
+ var g = Object.defineProperty;
2
+ var x = (i, s, t) => s in i ? g(i, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[s] = t;
3
+ var a = (i, s, t) => x(i, typeof s != "symbol" ? s + "" : s, t);
4
+ import { S as f, d as m } from "./ssr-safe-5cWfJP-s.js";
5
+ import { g as v, v as _, a as E, o as y, c as A } from "./form-validacao-BIOXxt-1.js";
6
+ import { a as w } from "./form-submissao-C-SPRKgT.js";
7
+ const S = ':host{display:flex;flex-direction:column;gap:4px;width:100%;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){width:auto;display:inline-flex}.ui-campo-texto__container{position:relative;width:100%;display:flex;flex-direction:column;justify-content:center}:host([label-flutuante]) .ui-campo-texto__container{margin-top:6px}.ui-campo-texto__label{display:flex;align-items:center;justify-content:space-between;font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-medio, 500);color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;margin-bottom:4px;flex-shrink:0}.ui-campo-texto__asterisco{color:var(--ui-cor-texto-erro, #ff5555);margin-left:2px;font-weight:600}.ui-campo-texto__wrapper{position:relative;display:flex;align-items:center;width:100%;height:var(--ui-campo-altura, 100%);min-height:var(--ui-campo-altura, var(--ui-altura-minima, 15px));background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);padding:0 8px;gap:6px;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ui-campo-texto__wrapper--foco{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent);background-color:var(--ui-cor-fundo-menu, #18181c)}.ui-campo-texto__wrapper--erro{border-color:var(--ui-cor-texto-erro, #ff5555)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 18%,transparent)!important}.ui-campo-texto__wrapper--disabled{opacity:.5;cursor:not-allowed;background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-campo-texto__input{flex:1;width:100%;height:100%;min-height:0;background:transparent;border:none;outline:none;color:var(--ui-cor-texto, #e1e1e6);font-family:inherit;font-size:clamp(11px,.85rem,13px);line-height:1.2;padding:0;margin:0;box-sizing:border-box}.ui-campo-texto__input::placeholder{color:var(--ui-cor-texto-secundario, #888899);opacity:.65}.ui-campo-texto__input:disabled{cursor:not-allowed}.ui-campo-texto__icone{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0;font-size:14px;line-height:1;max-height:100%}.ui-campo-texto__icone svg,.ui-campo-texto__icone ::slotted(svg),.ui-campo-texto__icone ::slotted(ui-icone){shape-rendering:geometricPrecision;display:inline-flex;vertical-align:middle}.ui-campo-texto__icone--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none;transition:opacity .15s ease,transform .15s ease}.ui-campo-texto__icone--clicavel:hover{opacity:.85;transform:scale(1.1)}:host([label-flutuante]) .ui-campo-texto__label{position:absolute;left:8px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--ui-cor-texto-secundario, #888899);pointer-events:none;z-index:3;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);padding:0 4px;border-radius:3px;margin-bottom:0;white-space:nowrap;max-width:calc(100% - 16px);overflow:hidden;text-overflow:ellipsis;transition:top .15s cubic-bezier(.4,0,.2,1),transform .15s cubic-bezier(.4,0,.2,1),color .15s ease,font-size .15s ease}:host([label-flutuante][tem-icone-esquerda]) .ui-campo-texto__label{left:28px}:host([label-flutuante]) .ui-campo-texto__label--ativa{top:-8px;left:8px!important;transform:translateY(0) scale(.85);transform-origin:left top;font-weight:600;color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-elevado, #1a1a1e)}:host([label-flutuante][erro]) .ui-campo-texto__label--ativa,:host([label-flutuante][mensagem-erro]) .ui-campo-texto__label--ativa{color:var(--ui-cor-texto-erro, #ff5555)}.ui-campo-texto__helper{font-size:var(--ui-tamanho-caption, 11px);color:var(--ui-cor-texto-secundario, #888899);line-height:var(--ui-altura-linha-compacta, 1.2);margin-top:2px}.ui-campo-texto__helper--erro{color:var(--ui-cor-texto-erro, #ff5555);font-weight:500;display:flex;align-items:center;gap:4px}.ui-campo-texto__wrapper{touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-campo-texto__input{touch-action:manipulation}@media (max-width: 640px),(pointer: coarse) and (max-width: 1024px){.ui-campo-texto__input{font-size:16px!important}:host(:not([inline])) .ui-campo-texto__wrapper{min-height:max(var(--ui-campo-altura, 38px),38px);padding:0 10px}.ui-campo-texto__label{font-size:13px}.ui-campo-texto__icone--clicavel{min-width:32px;min-height:32px}}', k = [
8
+ "label",
9
+ "placeholder",
10
+ "value",
11
+ "tipo",
12
+ "type",
13
+ "obrigatorio",
14
+ "required",
15
+ "minlength",
16
+ "min-length",
17
+ "maxlength",
18
+ "max-length",
19
+ "pattern",
20
+ "min",
21
+ "max",
22
+ "step",
23
+ "mensagem-validacao",
24
+ "helper-text",
25
+ "erro",
26
+ "mensagem-erro",
27
+ "disabled",
28
+ "readonly",
29
+ "label-flutuante",
30
+ "alternar-senha",
31
+ "tamanho",
32
+ "size",
33
+ "altura",
34
+ "height",
35
+ "densidade",
36
+ "aria-label"
37
+ ];
38
+ function C() {
39
+ return `
40
+ <style>${S}</style>
41
+ <div class="ui-campo-texto__container">
42
+ <label class="ui-campo-texto__label" part="rotulo" style="display: none;"></label>
43
+ <div class="ui-campo-texto__wrapper" part="campo">
44
+ <span class="ui-campo-texto__icone ui-campo-texto__icone--esquerda" part="icone icone-esquerda">
45
+ <slot name="icone-esquerda"></slot>
46
+ </span>
47
+ <input class="ui-campo-texto__input" part="input" type="text" />
48
+ <span class="ui-campo-texto__icone ui-campo-texto__icone--direita" part="icone icone-direita">
49
+ <slot name="icone-direita"></slot>
50
+ </span>
51
+ </div>
52
+ </div>
53
+ <div class="ui-campo-texto__helper" part="ajuda" style="display: none;"></div>
54
+ `;
55
+ }
56
+ function I(i, s, t, e) {
57
+ if (i.textContent = s, !t) return;
58
+ const n = document.createElement("span");
59
+ n.className = e, n.setAttribute("aria-hidden", "true"), n.textContent = "*", i.append(" ", n);
60
+ }
61
+ function V(i) {
62
+ const { labelElement: s, inputElement: t, labelText: e, placeholderText: n, isFlutuante: r, estaFocado: o, obrigatorio: u } = i, l = t.value.trim() !== "";
63
+ let h = !1;
64
+ try {
65
+ h = t.matches(":-webkit-autofill");
66
+ } catch {
67
+ h = !1;
68
+ }
69
+ e ? (I(s, e, !!u, "ui-campo-texto__asterisco"), s.style.display = "flex", r && (o || l || h) ? s.classList.add("ui-campo-texto__label--ativa") : s.classList.remove("ui-campo-texto__label--ativa")) : s.style.display = "none", r && !o && !l && !h ? t.placeholder = "" : t.placeholder = n;
70
+ }
71
+ function L(i, s, t) {
72
+ s ? (i.classList.add("ui-campo-texto__icone--clicavel"), i.setAttribute("role", "button"), i.setAttribute("tabindex", "0"), i.setAttribute("aria-label", t ? "Ocultar senha" : "Exibir senha")) : (i.classList.remove("ui-campo-texto__icone--clicavel"), i.removeAttribute("role"), i.removeAttribute("tabindex"), i.removeAttribute("aria-label"));
73
+ }
74
+ function q(i, s, t, e, n, r) {
75
+ e ? (i.classList.add("ui-campo-texto__wrapper--erro"), s.setAttribute("aria-invalid", "true")) : (i.classList.remove("ui-campo-texto__wrapper--erro"), s.removeAttribute("aria-invalid")), e && n ? (t.textContent = `⚠️ ${n}`, t.className = "ui-campo-texto__helper ui-campo-texto__helper--erro", t.style.display = "block") : r ? (t.textContent = r, t.className = "ui-campo-texto__helper", t.style.display = "block") : t.style.display = "none";
76
+ }
77
+ class d extends f {
78
+ constructor() {
79
+ super();
80
+ a(this, "internals");
81
+ a(this, "_formDisabled", !1);
82
+ a(this, "_customErrorMessage", "");
83
+ this.internals = typeof this.attachInternals == "function" ? this.attachInternals() : {};
84
+ }
85
+ // === Ciclo de Vida Form-Associated Custom Elements ===
86
+ formDisabledCallback(t) {
87
+ this._formDisabled = t, this.syncState();
88
+ }
89
+ get form() {
90
+ var t;
91
+ return this.closest("form") ?? ((t = this.internals) == null ? void 0 : t.form) ?? null;
92
+ }
93
+ get required() {
94
+ return this.hasAttribute("obrigatorio") || this.hasAttribute("required");
95
+ }
96
+ set required(t) {
97
+ t ? this.setAttribute("obrigatorio", "") : (this.removeAttribute("obrigatorio"), this.removeAttribute("required")), this.syncState();
98
+ }
99
+ get obrigatorio() {
100
+ return this.required;
101
+ }
102
+ set obrigatorio(t) {
103
+ this.required = t;
104
+ }
105
+ // === API de Validação Nativa ===
106
+ get validity() {
107
+ var t;
108
+ return this.atualizarValidade(), (t = this.internals) == null ? void 0 : t.validity;
109
+ }
110
+ get validationMessage() {
111
+ var t;
112
+ return this.atualizarValidade(), ((t = this.internals) == null ? void 0 : t.validationMessage) ?? "";
113
+ }
114
+ get willValidate() {
115
+ var t;
116
+ return ((t = this.internals) == null ? void 0 : t.willValidate) ?? !1;
117
+ }
118
+ checkValidity() {
119
+ var t, e;
120
+ return this.atualizarValidade(), ((e = (t = this.internals) == null ? void 0 : t.checkValidity) == null ? void 0 : e.call(t)) ?? !0;
121
+ }
122
+ reportValidity() {
123
+ var t, e;
124
+ return this.atualizarValidade(), ((e = (t = this.internals) == null ? void 0 : t.reportValidity) == null ? void 0 : e.call(t)) ?? !0;
125
+ }
126
+ setCustomValidity(t) {
127
+ this._customErrorMessage = t || "", this.atualizarValidade();
128
+ }
129
+ }
130
+ a(d, "formAssociated", !0);
131
+ class b extends d {
132
+ constructor() {
133
+ super();
134
+ a(this, "labelElement");
135
+ a(this, "wrapperElement");
136
+ a(this, "inputElement");
137
+ a(this, "helperElement");
138
+ a(this, "rightIconContainer");
139
+ a(this, "leftSlotElement");
140
+ a(this, "_senhaVisivel", !1);
141
+ a(this, "_checkTimer", null);
142
+ a(this, "_focado", !1);
143
+ a(this, "_inputId");
144
+ a(this, "_defaultValue", "");
145
+ a(this, "handleSlotChange", () => {
146
+ this.syncState();
147
+ });
148
+ a(this, "handleHostClick", (t) => {
149
+ A(this, t) && !this.disabled && this.inputElement.focus();
150
+ });
151
+ a(this, "handleRightIconClick", (t) => {
152
+ (this.getAttribute("tipo") === "password" || this.hasAttribute("alternar-senha")) && (t.stopPropagation(), this.alternarVisibilidadeSenha());
153
+ });
154
+ a(this, "handleRightIconKeyDown", (t) => {
155
+ (this.getAttribute("tipo") === "password" || this.hasAttribute("alternar-senha")) && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), this.alternarVisibilidadeSenha());
156
+ });
157
+ a(this, "handleFocus", () => {
158
+ this._focado = !0, this.wrapperElement.classList.add("ui-campo-texto__wrapper--foco"), this.syncState();
159
+ });
160
+ a(this, "handleBlur", () => {
161
+ this._focado = !1, this.wrapperElement.classList.remove("ui-campo-texto__wrapper--foco"), this.syncState();
162
+ });
163
+ /**
164
+ * Enter submete o formulário como num <input> nativo. Aguarda um tick para que
165
+ * ouvintes do consumidor possam cancelar com `preventDefault()` no keydown.
166
+ */
167
+ a(this, "handleKeyDown", (t) => {
168
+ if (t.key !== "Enter" || t.isComposing || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey) return;
169
+ const e = this.form;
170
+ e && setTimeout(() => {
171
+ !t.defaultPrevented && this.isConnected && w(e);
172
+ });
173
+ });
174
+ a(this, "handleInput", (t) => {
175
+ t.stopPropagation();
176
+ const e = t.target.value;
177
+ this.internals.setFormValue(e), this.syncState(), this.dispatchEvent(
178
+ new CustomEvent("ui-input", {
179
+ detail: { value: e },
180
+ bubbles: !0,
181
+ composed: !0
182
+ })
183
+ ), this.dispatchEvent(
184
+ new Event("input", {
185
+ bubbles: !0,
186
+ composed: !0
187
+ })
188
+ );
189
+ });
190
+ a(this, "handleChange", (t) => {
191
+ t.stopPropagation();
192
+ const e = t.target.value;
193
+ this.internals.setFormValue(e), this.syncState(), this.dispatchEvent(
194
+ new CustomEvent("ui-change", {
195
+ detail: { value: e },
196
+ bubbles: !0,
197
+ composed: !0
198
+ })
199
+ ), this.dispatchEvent(
200
+ new Event("change", {
201
+ bubbles: !0,
202
+ composed: !0
203
+ })
204
+ );
205
+ });
206
+ const t = this.attachShadow({ mode: "open", delegatesFocus: !0 });
207
+ t.innerHTML = C(), this.labelElement = t.querySelector(".ui-campo-texto__label"), this.wrapperElement = t.querySelector(".ui-campo-texto__wrapper"), this.inputElement = t.querySelector(".ui-campo-texto__input"), this.helperElement = t.querySelector(".ui-campo-texto__helper"), this.rightIconContainer = t.querySelector(".ui-campo-texto__icone--direita"), this.leftSlotElement = t.querySelector('slot[name="icone-esquerda"]'), this._inputId = v("ui-input"), this.inputElement.id = this._inputId, this.labelElement.htmlFor = this._inputId, this.helperElement.id = `${this._inputId}-helper`, this.inputElement.setAttribute("aria-describedby", `${this._inputId}-helper`);
208
+ }
209
+ static get observedAttributes() {
210
+ return k;
211
+ }
212
+ focus(t) {
213
+ this.inputElement.focus(t);
214
+ }
215
+ blur() {
216
+ this.inputElement.blur();
217
+ }
218
+ connectedCallback() {
219
+ this.inputElement.addEventListener("input", this.handleInput), this.inputElement.addEventListener("change", this.handleChange), this.inputElement.addEventListener("focus", this.handleFocus), this.inputElement.addEventListener("blur", this.handleBlur), this.inputElement.addEventListener("keydown", this.handleKeyDown), this.rightIconContainer.addEventListener("click", this.handleRightIconClick), this.rightIconContainer.addEventListener("keydown", this.handleRightIconKeyDown), this.leftSlotElement.addEventListener("slotchange", this.handleSlotChange), this.addEventListener("click", this.handleHostClick), this._defaultValue = this.getAttribute("value") || "", this.hasAttribute("value") && !this.inputElement.value && (this.inputElement.value = this._defaultValue), this.syncState(), this._checkTimer = setTimeout(() => this.syncState(), 100);
220
+ }
221
+ disconnectedCallback() {
222
+ this.inputElement.removeEventListener("input", this.handleInput), this.inputElement.removeEventListener("change", this.handleChange), this.inputElement.removeEventListener("focus", this.handleFocus), this.inputElement.removeEventListener("blur", this.handleBlur), this.inputElement.removeEventListener("keydown", this.handleKeyDown), this.rightIconContainer.removeEventListener("click", this.handleRightIconClick), this.rightIconContainer.removeEventListener("keydown", this.handleRightIconKeyDown), this.leftSlotElement.removeEventListener("slotchange", this.handleSlotChange), this.removeEventListener("click", this.handleHostClick), this._checkTimer && clearTimeout(this._checkTimer);
223
+ }
224
+ attributeChangedCallback(t, e, n) {
225
+ t === "value" && n !== this.inputElement.value && !this._focado && (this.inputElement.value = n || ""), this.syncState();
226
+ }
227
+ get value() {
228
+ return this.inputElement ? this.inputElement.value : this.getAttribute("value") || "";
229
+ }
230
+ set value(t) {
231
+ if (this.setAttribute("value", t), this.inputElement)
232
+ try {
233
+ this.inputElement.value = t;
234
+ } catch {
235
+ }
236
+ this.syncState();
237
+ }
238
+ // === Ciclo de Vida Form-Associated Custom Elements (W3C FACE) ===
239
+ formResetCallback() {
240
+ var t;
241
+ this.inputElement.value = this._defaultValue, (t = this.internals) == null || t.setFormValue(this._defaultValue), this.syncState();
242
+ }
243
+ formStateRestoreCallback(t, e) {
244
+ typeof t == "string" && (this.value = t);
245
+ }
246
+ get name() {
247
+ return this.getAttribute("name") || "";
248
+ }
249
+ set name(t) {
250
+ this.setAttribute("name", t);
251
+ }
252
+ get type() {
253
+ return this.getAttribute("tipo") || this.getAttribute("type") || "text";
254
+ }
255
+ get disabled() {
256
+ return this.hasAttribute("disabled") || this._formDisabled;
257
+ }
258
+ set disabled(t) {
259
+ t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
260
+ }
261
+ get minLength() {
262
+ const t = this.getAttribute("minlength") ?? this.getAttribute("min-length");
263
+ return t ? parseInt(t, 10) : -1;
264
+ }
265
+ set minLength(t) {
266
+ t >= 0 ? this.setAttribute("minlength", String(t)) : this.removeAttribute("minlength"), this.syncState();
267
+ }
268
+ get maxLength() {
269
+ const t = this.getAttribute("maxlength") ?? this.getAttribute("max-length");
270
+ return t ? parseInt(t, 10) : -1;
271
+ }
272
+ set maxLength(t) {
273
+ t >= 0 ? this.setAttribute("maxlength", String(t)) : this.removeAttribute("maxlength"), this.syncState();
274
+ }
275
+ get pattern() {
276
+ return this.getAttribute("pattern") || "";
277
+ }
278
+ set pattern(t) {
279
+ t ? this.setAttribute("pattern", t) : this.removeAttribute("pattern"), this.syncState();
280
+ }
281
+ atualizarValidade() {
282
+ var c, p;
283
+ const t = this.getAttribute("minlength") ?? this.getAttribute("min-length"), e = this.getAttribute("maxlength") ?? this.getAttribute("max-length"), n = this.getAttribute("min"), r = this.getAttribute("max"), o = this.inputElement ? this.inputElement.value : "", u = this.getAttribute("value") || o, l = !!((p = (c = this.inputElement) == null ? void 0 : c.validity) != null && p.badInput), h = _({
284
+ val: o,
285
+ rawVal: u,
286
+ badInput: l,
287
+ disabled: this.disabled,
288
+ required: this.required,
289
+ tipo: this.type,
290
+ minlength: t !== null ? parseInt(t, 10) : null,
291
+ maxlength: e !== null ? parseInt(e, 10) : null,
292
+ min: n !== null ? parseFloat(n) : null,
293
+ max: r !== null ? parseFloat(r) : null,
294
+ step: this.getAttribute("step"),
295
+ pattern: this.getAttribute("pattern"),
296
+ customError: this._customErrorMessage,
297
+ mensagemValidacao: this.getAttribute("mensagem-validacao")
298
+ });
299
+ E(this.internals, h, this.inputElement);
300
+ }
301
+ alternarVisibilidadeSenha() {
302
+ var n;
303
+ if (!(this.getAttribute("tipo") === "password" || this._senhaVisivel)) return;
304
+ this._senhaVisivel = !this._senhaVisivel, this.inputElement.type = this._senhaVisivel ? "text" : "password";
305
+ const e = (n = this.shadowRoot) == null ? void 0 : n.querySelector('slot[name="icone-direita"]');
306
+ e && e.assignedElements().forEach((o) => {
307
+ var u, l;
308
+ (((u = o.textContent) == null ? void 0 : u.trim()) === "👁️" || ((l = o.textContent) == null ? void 0 : l.trim()) === "🙈") && (o.textContent = this._senhaVisivel ? "🙈" : "👁️");
309
+ }), this.dispatchEvent(
310
+ new CustomEvent("ui-toggle-senha", {
311
+ detail: { visivel: this._senhaVisivel },
312
+ bubbles: !0,
313
+ composed: !0
314
+ })
315
+ );
316
+ }
317
+ syncState() {
318
+ this.leftSlotElement.assignedNodes().length > 0 || this.querySelector('[slot="icone-esquerda"]') !== null ? this.setAttribute("tem-icone-esquerda", "") : this.removeAttribute("tem-icone-esquerda");
319
+ const e = this.getAttribute("altura") || this.getAttribute("height");
320
+ e ? this.style.setProperty("--ui-campo-altura", isNaN(Number(e)) ? e : `${e}px`) : this.style.removeProperty("--ui-campo-altura"), V({
321
+ labelElement: this.labelElement,
322
+ inputElement: this.inputElement,
323
+ labelText: this.getAttribute("label"),
324
+ placeholderText: this.getAttribute("placeholder") || "",
325
+ isFlutuante: this.hasAttribute("label-flutuante"),
326
+ estaFocado: this._focado,
327
+ obrigatorio: this.required
328
+ }), this.sincronizarNomeAcessivel();
329
+ const n = this.getAttribute("tipo") || this.getAttribute("type") || "text";
330
+ if (!this._senhaVisivel)
331
+ try {
332
+ this.inputElement.type = n;
333
+ } catch {
334
+ this.inputElement.type = "text";
335
+ }
336
+ const r = this.getAttribute("minlength") ?? this.getAttribute("min-length");
337
+ r !== null ? this.inputElement.minLength = parseInt(r, 10) : this.inputElement.removeAttribute("minlength");
338
+ const o = this.getAttribute("maxlength") ?? this.getAttribute("max-length");
339
+ o !== null ? this.inputElement.maxLength = parseInt(o, 10) : this.inputElement.removeAttribute("maxlength");
340
+ const u = this.getAttribute("pattern");
341
+ u !== null ? this.inputElement.pattern = u : this.inputElement.removeAttribute("pattern"), this.internals.setFormValue(this.inputElement.value);
342
+ const l = this.hasAttribute("disabled") || this._formDisabled, h = this.hasAttribute("readonly");
343
+ this.inputElement.disabled = l, this.inputElement.readOnly = h, l ? this.wrapperElement.classList.add("ui-campo-texto__wrapper--disabled") : this.wrapperElement.classList.remove("ui-campo-texto__wrapper--disabled");
344
+ const c = n === "password" || this.hasAttribute("alternar-senha");
345
+ L(this.rightIconContainer, c, this._senhaVisivel);
346
+ const p = this.hasAttribute("erro") || this.hasAttribute("mensagem-erro");
347
+ q(
348
+ this.wrapperElement,
349
+ this.inputElement,
350
+ this.helperElement,
351
+ p,
352
+ this.getAttribute("mensagem-erro"),
353
+ this.getAttribute("helper-text")
354
+ ), this.atualizarValidade();
355
+ }
356
+ /**
357
+ * Sem o atributo `label`, o input nativo herda o nome acessível de fora do Shadow DOM
358
+ * (`aria-label` no host, `<label for>` ou `<label>` envolvente).
359
+ */
360
+ sincronizarNomeAcessivel() {
361
+ const t = this.getAttribute("label") ? "" : y(this, this.internals);
362
+ t ? this.inputElement.setAttribute("aria-label", t) : this.inputElement.removeAttribute("aria-label");
363
+ }
364
+ }
365
+ class z extends b {
366
+ }
367
+ m("ui-campo-texto", b);
368
+ m("ui-input", z);
369
+ export {
370
+ k as A,
371
+ d as F,
372
+ b as U,
373
+ z as a,
374
+ L as b,
375
+ C as c,
376
+ V as d,
377
+ I as r,
378
+ q as s
379
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";var w=Object.defineProperty;var E=(i,t,e)=>t in i?w(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var r=(i,t,e)=>E(i,typeof t!="symbol"?t+"":t,e);const k=require("./listener-bag-D5omxZ9h.cjs"),x=require("./ssr-safe-CiHD1adl.cjs"),A=':host{display:block;width:100%;box-sizing:border-box}:host(.h-full),:host([style*="height: 100%"]){height:100%}.ui-card{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);overflow:hidden;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-card--plano{background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:none}.ui-card--elevado{background-color:var(--ui-cor-fundo-elevado, #1e1e24);box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .4));border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-card--destaque{border-color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-card--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none}.ui-card--clicavel:hover{transform:translateY(-3px);border-color:var(--ui-cor-primaria, #00E08A);box-shadow:var(--ui-sombra-lg, 0 10px 30px rgba(0, 0, 0, .5)),0 0 15px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-card--clicavel:active{transform:translateY(-1px)}.ui-card--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-card__media{width:100%;overflow:hidden;display:block;line-height:0}::slotted([slot="midia"]),::slotted([slot="media"]){width:100%;height:auto;display:block;object-fit:cover}.ui-card__header{padding:14px 16px 8px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card__body{padding:12px 16px;flex:1;box-sizing:border-box}.ui-card__footer{padding:10px 16px 14px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card--compacto .ui-card__header{padding:10px 12px 6px}.ui-card--compacto .ui-card__body{padding:8px 12px}.ui-card--compacto .ui-card__footer{padding:8px 12px 10px}';class f extends x.SafeHTMLElement{constructor(){super();r(this,"cardElement");r(this,"listeners",new k.ListenerBag);r(this,"handleSlotChange",()=>{this.syncState()});r(this,"handleClick",e=>{this.disabled||e&&e.target&&e.target instanceof HTMLElement&&e.target.closest('button, a, input, select, textarea, ui-botao, ui-switch, ui-checkbox, ui-radio, [role="button"]')||this.clicavel&&(this.dispatchEvent(new CustomEvent("ui-click",{detail:{id:this.id||"sem-id"},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-clique",{detail:{id:this.id||"sem-id"},bubbles:!0,composed:!0})))});r(this,"handleKeyDown",e=>{!this.clicavel||this.disabled||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleClick())});const e=this.attachShadow({mode:"open"});e.innerHTML=`
2
+ <style>${A}</style>
3
+ <div class="ui-card" part="base">
4
+ <div class="ui-card__media" part="midia">
5
+ <slot name="midia"></slot>
6
+ <slot name="media"></slot>
7
+ </div>
8
+ <div class="ui-card__header" part="cabecalho">
9
+ <slot name="cabecalho"></slot>
10
+ <slot name="header"></slot>
11
+ </div>
12
+ <div class="ui-card__body" part="corpo">
13
+ <slot></slot>
14
+ </div>
15
+ <div class="ui-card__footer" part="rodape">
16
+ <slot name="rodape"></slot>
17
+ <slot name="footer"></slot>
18
+ </div>
19
+ </div>
20
+ `,this.cardElement=e.querySelector(".ui-card")}static get observedAttributes(){return["elevacao","elevation","variante","variant","clicavel","clickable","compacto","compact","disabled"]}connectedCallback(){var a;this.listeners.cleanup(),this.listeners.add(this.cardElement,"click",this.handleClick),this.listeners.add(this.cardElement,"keydown",this.handleKeyDown);const e=(a=this.shadowRoot)==null?void 0:a.querySelectorAll("slot");e==null||e.forEach(s=>this.listeners.add(s,"slotchange",this.handleSlotChange)),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,a,s){this.syncState()}get clicavel(){return this.hasAttribute("clicavel")||this.hasAttribute("clickable")}set clicavel(e){e?this.setAttribute("clicavel",""):(this.removeAttribute("clicavel"),this.removeAttribute("clickable")),this.syncState()}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.syncState()}syncState(){var h,b,p;const e=this.getAttribute("elevacao")||this.getAttribute("elevation")||"plano",a=this.getAttribute("variante")||this.getAttribute("variant"),s=this.clicavel,g=this.hasAttribute("compacto")||this.hasAttribute("compact"),y=this.disabled;this.cardElement.className="ui-card",this.cardElement.classList.add(`ui-card--${e}`),a&&this.cardElement.classList.add(`ui-card--${a}`),s?(this.cardElement.classList.add("ui-card--clicavel"),this.cardElement.setAttribute("tabindex","0")):this.cardElement.removeAttribute("tabindex"),g&&this.cardElement.classList.add("ui-card--compacto"),y&&this.cardElement.classList.add("ui-card--disabled");const l=(h=this.shadowRoot)==null?void 0:h.querySelector(".ui-card__header"),n=(b=this.shadowRoot)==null?void 0:b.querySelector(".ui-card__footer"),u=(p=this.shadowRoot)==null?void 0:p.querySelector(".ui-card__media"),c=m=>{var v;const _=m.map(o=>`slot[name="${o}"]`).join(", ");return Array.from(((v=this.shadowRoot)==null?void 0:v.querySelectorAll(_))||[]).some(o=>o.assignedNodes({flatten:!0}).some(d=>d.nodeType===Node.ELEMENT_NODE||d.textContent&&d.textContent.trim()!==""))||m.some(o=>this.querySelector(`[slot="${o}"]`)!==null)};u&&(u.style.display=c(["midia","media"])?"block":"none"),l&&(l.style.display=c(["cabecalho","header"])?"flex":"none"),n&&(n.style.display=c(["rodape","footer"])?"flex":"none")}}x.definirCustomElement("ui-card",f);exports.UICard=f;
@@ -0,0 +1,111 @@
1
+ var y = Object.defineProperty;
2
+ var _ = (i, t, e) => t in i ? y(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var o = (i, t, e) => _(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { L as w } from "./listener-bag-DQgv7OON.js";
5
+ import { d as E, S as k } from "./ssr-safe-5cWfJP-s.js";
6
+ const A = ':host{display:block;width:100%;box-sizing:border-box}:host(.h-full),:host([style*="height: 100%"]){height:100%}.ui-card{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);overflow:hidden;transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;color:var(--ui-cor-texto, #e1e1e6);font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-card--plano{background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:none}.ui-card--elevado{background-color:var(--ui-cor-fundo-elevado, #1e1e24);box-shadow:var(--ui-sombra-lg, 0 8px 24px rgba(0, 0, 0, .4));border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-card--destaque{border-color:var(--ui-cor-primaria, #00E08A);background-color:var(--ui-cor-fundo-card, #18181c);box-shadow:0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-card--clicavel{cursor:pointer;-webkit-user-select:none;user-select:none}.ui-card--clicavel:hover{transform:translateY(-3px);border-color:var(--ui-cor-primaria, #00E08A);box-shadow:var(--ui-sombra-lg, 0 10px 30px rgba(0, 0, 0, .5)),0 0 15px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-card--clicavel:active{transform:translateY(-1px)}.ui-card--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-card__media{width:100%;overflow:hidden;display:block;line-height:0}::slotted([slot="midia"]),::slotted([slot="media"]){width:100%;height:auto;display:block;object-fit:cover}.ui-card__header{padding:14px 16px 8px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card__body{padding:12px 16px;flex:1;box-sizing:border-box}.ui-card__footer{padding:10px 16px 14px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.ui-card--compacto .ui-card__header{padding:10px 12px 6px}.ui-card--compacto .ui-card__body{padding:8px 12px}.ui-card--compacto .ui-card__footer{padding:8px 12px 10px}';
7
+ class S extends k {
8
+ constructor() {
9
+ super();
10
+ o(this, "cardElement");
11
+ o(this, "listeners", new w());
12
+ o(this, "handleSlotChange", () => {
13
+ this.syncState();
14
+ });
15
+ o(this, "handleClick", (e) => {
16
+ this.disabled || e && e.target && e.target instanceof HTMLElement && e.target.closest('button, a, input, select, textarea, ui-botao, ui-switch, ui-checkbox, ui-radio, [role="button"]') || this.clicavel && (this.dispatchEvent(
17
+ new CustomEvent("ui-click", {
18
+ detail: {
19
+ id: this.id || "sem-id"
20
+ },
21
+ bubbles: !0,
22
+ composed: !0
23
+ })
24
+ ), this.dispatchEvent(
25
+ new CustomEvent("ui-clique", {
26
+ detail: {
27
+ id: this.id || "sem-id"
28
+ },
29
+ bubbles: !0,
30
+ composed: !0
31
+ })
32
+ ));
33
+ });
34
+ o(this, "handleKeyDown", (e) => {
35
+ !this.clicavel || this.disabled || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.handleClick());
36
+ });
37
+ const e = this.attachShadow({ mode: "open" });
38
+ e.innerHTML = `
39
+ <style>${A}</style>
40
+ <div class="ui-card" part="base">
41
+ <div class="ui-card__media" part="midia">
42
+ <slot name="midia"></slot>
43
+ <slot name="media"></slot>
44
+ </div>
45
+ <div class="ui-card__header" part="cabecalho">
46
+ <slot name="cabecalho"></slot>
47
+ <slot name="header"></slot>
48
+ </div>
49
+ <div class="ui-card__body" part="corpo">
50
+ <slot></slot>
51
+ </div>
52
+ <div class="ui-card__footer" part="rodape">
53
+ <slot name="rodape"></slot>
54
+ <slot name="footer"></slot>
55
+ </div>
56
+ </div>
57
+ `, this.cardElement = e.querySelector(".ui-card");
58
+ }
59
+ static get observedAttributes() {
60
+ return [
61
+ "elevacao",
62
+ "elevation",
63
+ "variante",
64
+ "variant",
65
+ "clicavel",
66
+ "clickable",
67
+ "compacto",
68
+ "compact",
69
+ "disabled"
70
+ ];
71
+ }
72
+ connectedCallback() {
73
+ var a;
74
+ this.listeners.cleanup(), this.listeners.add(this.cardElement, "click", this.handleClick), this.listeners.add(this.cardElement, "keydown", this.handleKeyDown);
75
+ const e = (a = this.shadowRoot) == null ? void 0 : a.querySelectorAll("slot");
76
+ e == null || e.forEach((s) => this.listeners.add(s, "slotchange", this.handleSlotChange)), this.syncState();
77
+ }
78
+ disconnectedCallback() {
79
+ this.listeners.cleanup();
80
+ }
81
+ attributeChangedCallback(e, a, s) {
82
+ this.syncState();
83
+ }
84
+ get clicavel() {
85
+ return this.hasAttribute("clicavel") || this.hasAttribute("clickable");
86
+ }
87
+ set clicavel(e) {
88
+ e ? this.setAttribute("clicavel", "") : (this.removeAttribute("clicavel"), this.removeAttribute("clickable")), this.syncState();
89
+ }
90
+ get disabled() {
91
+ return this.hasAttribute("disabled");
92
+ }
93
+ set disabled(e) {
94
+ e ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"), this.syncState();
95
+ }
96
+ syncState() {
97
+ var h, b, p;
98
+ const e = this.getAttribute("elevacao") || this.getAttribute("elevation") || "plano", a = this.getAttribute("variante") || this.getAttribute("variant"), s = this.clicavel, x = this.hasAttribute("compacto") || this.hasAttribute("compact"), f = this.disabled;
99
+ this.cardElement.className = "ui-card", this.cardElement.classList.add(`ui-card--${e}`), a && this.cardElement.classList.add(`ui-card--${a}`), s ? (this.cardElement.classList.add("ui-card--clicavel"), this.cardElement.setAttribute("tabindex", "0")) : this.cardElement.removeAttribute("tabindex"), x && this.cardElement.classList.add("ui-card--compacto"), f && this.cardElement.classList.add("ui-card--disabled");
100
+ const l = (h = this.shadowRoot) == null ? void 0 : h.querySelector(".ui-card__header"), n = (b = this.shadowRoot) == null ? void 0 : b.querySelector(".ui-card__footer"), u = (p = this.shadowRoot) == null ? void 0 : p.querySelector(".ui-card__media"), c = (m) => {
101
+ var v;
102
+ const g = m.map((r) => `slot[name="${r}"]`).join(", ");
103
+ return Array.from(((v = this.shadowRoot) == null ? void 0 : v.querySelectorAll(g)) || []).some((r) => r.assignedNodes({ flatten: !0 }).some((d) => d.nodeType === Node.ELEMENT_NODE || d.textContent && d.textContent.trim() !== "")) || m.some((r) => this.querySelector(`[slot="${r}"]`) !== null);
104
+ };
105
+ u && (u.style.display = c(["midia", "media"]) ? "block" : "none"), l && (l.style.display = c(["cabecalho", "header"]) ? "flex" : "none"), n && (n.style.display = c(["rodape", "footer"]) ? "flex" : "none");
106
+ }
107
+ }
108
+ E("ui-card", S);
109
+ export {
110
+ S as U
111
+ };
@@ -3,9 +3,9 @@ var S = (d, l, e) => l in d ? k(d, l, { enumerable: !0, configurable: !0, writab
3
3
  var s = (d, l, e) => S(d, typeof l != "symbol" ? l + "" : l, e);
4
4
  import { d as T, S as w } from "./ssr-safe-5cWfJP-s.js";
5
5
  import { L as q } from "./listener-bag-DQgv7OON.js";
6
- import { b as g, n as m, c as P, d as $, a as E } from "./ui-seletor-cor-D9iI7yew.js";
7
- const j = ':host{--_a: var(--ui-controle-cores-amostra, 26px);--_pilha: calc(var(--_a) * 5 / 3);--_borda: color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 30%, transparent);--_borda-forte: color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 70%, transparent);--_base: var(--ui-cor-superficie, #1d1d22);--_destaque: var(--ui-cor-primaria, #00e08a);--_vermelho: #ef4444;display:inline-block;flex-shrink:0;-webkit-user-select:none;user-select:none}:host([hidden]){display:none}*,*:before,*:after{box-sizing:border-box}.pilha{display:flex;align-items:stretch;gap:6px}.amostras{position:relative;flex:none;width:var(--_pilha);height:var(--_pilha)}.amostra{position:absolute;width:var(--_a);height:var(--_a);padding:0;background:var(--_base);border:1px solid var(--_borda);border-radius:6px;cursor:pointer;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease}.amostra--traco{right:0;bottom:0;z-index:1}.amostra--preenchimento{top:0;left:0;z-index:2;box-shadow:0 2px 6px #00000059}.amostra:hover{border-color:var(--_borda-forte);transform:scale(1.05)}.amostra:focus-visible{outline:2px solid var(--ui-cor-texto, #e1e1e6);outline-offset:2px}.amostra--ativa,.amostra--ativa:hover{z-index:3;border-color:var(--_destaque);box-shadow:0 0 0 1.5px var(--_destaque),0 2px 6px #00000059}:host([so-traco]) .amostra--preenchimento{opacity:.4}.face{position:absolute;top:3px;right:3px;bottom:3px;left:3px;border-radius:3.5px;pointer-events:none}.face--traco{background:transparent;border:4px solid #ffffff}.face--sem-cor{background:repeating-conic-gradient(#3a3a45,#3a3a45 25%,#24242b 0%,#24242b 50%) 50% / 6px 6px!important;border-color:#ef44448c!important;overflow:hidden}.face--sem-cor:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top right,transparent calc(50% - 1px),var(--_vermelho) calc(50% - 1px),var(--_vermelho) calc(50% + 1px),transparent calc(50% + 1px))}.face--misto{display:flex;align-items:center;justify-content:center;background:#2e2e38!important;border-color:#64748b!important}.face--misto:after{content:"?";color:#fff;font-size:12px;font-weight:800;line-height:1;text-shadow:0 1px 2px rgba(0,0,0,.8)}.acoes{display:flex;flex:none;flex-direction:column;gap:2px;width:16px}.acao{display:flex;flex:1;align-items:center;justify-content:center;min-height:0;padding:0;background:transparent;border:0;border-radius:4px;color:var(--ui-cor-texto-secundario, #9696a6);cursor:pointer;transition:color .15s ease,background .15s ease}.acao:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent);color:var(--_destaque)}.acao:focus-visible{outline:2px solid var(--ui-cor-texto, #e1e1e6);outline-offset:1px}.acao svg{width:12px;height:12px}.acao--sem-cor:hover{background:#ef444433;color:var(--_vermelho)}.icone-padrao{position:relative;width:11px;height:11px}.ponto{position:absolute;width:7px;height:7px;border-radius:1.5px}.ponto--preenchimento{top:0;left:0;background:#00e08a;border:1px solid var(--_borda-forte)}.ponto--traco{right:0;bottom:0;background:var(--_base);border:1.5px solid #ffffff}:host([desabilitado]) .pilha{opacity:.5}:host([desabilitado]) .amostra,:host([desabilitado]) .acao{cursor:not-allowed;pointer-events:none}@media (prefers-reduced-motion: reduce){.amostra,.acao{transition:none}.amostra:hover{transform:none}}';
8
- class M extends w {
6
+ import { b as g, n as m, c as $, d as P, a as E } from "./ui-seletor-cor-D2_C6Aor.js";
7
+ const M = ':host{--_a: var(--ui-controle-cores-amostra, 26px);--_pilha: calc(var(--_a) * 5 / 3);--_borda: color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 30%, transparent);--_borda-forte: color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 70%, transparent);--_base: var(--ui-cor-superficie, #1d1d22);--_destaque: var(--ui-cor-primaria, #00e08a);--_vermelho: #ef4444;display:inline-block;flex-shrink:0;-webkit-user-select:none;user-select:none}:host([hidden]){display:none}*,*:before,*:after{box-sizing:border-box}.pilha{display:flex;align-items:stretch;gap:6px}.amostras{position:relative;flex:none;width:var(--_pilha);height:var(--_pilha)}.amostra{position:absolute;width:var(--_a);height:var(--_a);padding:0;background:var(--_base);border:1px solid var(--_borda);border-radius:6px;cursor:pointer;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease}.amostra--traco{right:0;bottom:0;z-index:1}.amostra--preenchimento{top:0;left:0;z-index:2;box-shadow:0 2px 6px #00000059}.amostra:hover{border-color:var(--_borda-forte);transform:scale(1.05)}.amostra:focus-visible{outline:2px solid var(--ui-cor-texto, #e1e1e6);outline-offset:2px}.amostra--ativa,.amostra--ativa:hover{z-index:3;border-color:var(--_destaque);box-shadow:0 0 0 1.5px var(--_destaque),0 2px 6px #00000059}:host([so-traco]) .amostra--preenchimento{opacity:.4}.face{position:absolute;top:3px;right:3px;bottom:3px;left:3px;border-radius:3.5px;pointer-events:none}.face--traco{background:transparent;border:4px solid #ffffff}.face--sem-cor{background:repeating-conic-gradient(#3a3a45,#3a3a45 25%,#24242b 0%,#24242b 50%) 50% / 6px 6px!important;border-color:#ef44448c!important;overflow:hidden}.face--sem-cor:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top right,transparent calc(50% - 1px),var(--_vermelho) calc(50% - 1px),var(--_vermelho) calc(50% + 1px),transparent calc(50% + 1px))}.face--misto{display:flex;align-items:center;justify-content:center;background:#2e2e38!important;border-color:#64748b!important}.face--misto:after{content:"?";color:#fff;font-size:12px;font-weight:800;line-height:1;text-shadow:0 1px 2px rgba(0,0,0,.8)}.acoes{display:flex;flex:none;flex-direction:column;gap:2px;width:16px}.acao{display:flex;flex:1;align-items:center;justify-content:center;min-height:0;padding:0;background:transparent;border:0;border-radius:4px;color:var(--ui-cor-texto-secundario, #9696a6);cursor:pointer;transition:color .15s ease,background .15s ease}.acao:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent);color:var(--_destaque)}.acao:focus-visible{outline:2px solid var(--ui-cor-texto, #e1e1e6);outline-offset:1px}.acao svg{width:12px;height:12px}.acao--sem-cor:hover{background:#ef444433;color:var(--_vermelho)}.icone-padrao{position:relative;width:11px;height:11px}.ponto{position:absolute;width:7px;height:7px;border-radius:1.5px}.ponto--preenchimento{top:0;left:0;background:#00e08a;border:1px solid var(--_borda-forte)}.ponto--traco{right:0;bottom:0;background:var(--_base);border:1.5px solid #ffffff}:host([desabilitado]) .pilha{opacity:.5}:host([desabilitado]) .amostra,:host([desabilitado]) .acao{cursor:not-allowed;pointer-events:none}@media (prefers-reduced-motion: reduce){.amostra,.acao{transition:none}.amostra:hover{transform:none}}';
8
+ class j extends w {
9
9
  constructor() {
10
10
  super();
11
11
  s(this, "raiz");
@@ -84,12 +84,12 @@ class M extends w {
84
84
  set alvo(e) {
85
85
  this.definirAlvo(e);
86
86
  }
87
- /** Cores oferecidas em "Cores do projeto" no seletor. */
87
+ /** @deprecated Ignorado: o seletor de cor não mostra mais amostras de cores. */
88
88
  get coresProjeto() {
89
89
  return [...this._coresProjeto];
90
90
  }
91
91
  set coresProjeto(e) {
92
- this._coresProjeto = P(e);
92
+ this._coresProjeto = $(e);
93
93
  }
94
94
  /** Teclas exibidas nas dicas dos botões (ex.: `{ inverter: 'Shift+X' }`). */
95
95
  get atalhos() {
@@ -106,7 +106,7 @@ class M extends w {
106
106
  /** Define cores, opacidade e/ou espessura sem emitir eventos. Valores inválidos são ignorados; uma cor definida deixa de ser "mista". */
107
107
  definirCores(e = {}) {
108
108
  const t = m(e.preenchimento), r = m(e.traco);
109
- t && (this._preenchimento = t, this._misto.preenchimento = !1), r && (this._traco = r, this._misto.traco = !1), e.opacidade !== void 0 && (this._opacidade = $(e.opacidade, this._opacidade)), e.espessuraTraco !== void 0 && (this._espessuraTraco = g(e.espessuraTraco, this._espessuraTraco)), this.atualizar();
109
+ t && (this._preenchimento = t, this._misto.preenchimento = !1), r && (this._traco = r, this._misto.traco = !1), e.opacidade !== void 0 && (this._opacidade = P(e.opacidade, this._opacidade)), e.espessuraTraco !== void 0 && (this._espessuraTraco = g(e.espessuraTraco, this._espessuraTraco)), this.atualizar();
110
110
  }
111
111
  obterCores() {
112
112
  return {
@@ -158,7 +158,6 @@ class M extends w {
158
158
  opacidade: this._opacidade,
159
159
  espessuraTraco: this._espessuraTraco,
160
160
  misto: this._misto[this._alvo],
161
- coresProjeto: this._coresProjeto,
162
161
  focar: t,
163
162
  aoAlterar: (a) => this.aplicarDoSeletor(a, !1),
164
163
  aoConfirmar: (a) => {
@@ -207,7 +206,7 @@ class M extends w {
207
206
  }
208
207
  renderizar() {
209
208
  this.raiz.innerHTML = `
210
- <style>${j}</style>
209
+ <style>${M}</style>
211
210
  <div class="pilha" part="pilha" role="group" aria-label="Cores de desenho">
212
211
  <div class="amostras" part="amostras">
213
212
  <button type="button" class="amostra amostra--traco" data-alvo="traco" part="amostra amostra-traco">
@@ -286,7 +285,7 @@ class M extends w {
286
285
  v && (v.style.borderColor = this._padrao.traco === "none" ? "#ef4444" : this._padrao.traco);
287
286
  }
288
287
  }
289
- T("ui-controle-cores", M);
288
+ T("ui-controle-cores", j);
290
289
  export {
291
- M as U
290
+ j as U
292
291
  };