@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,377 +0,0 @@
1
- var b = Object.defineProperty;
2
- var x = (a, s, t) => s in a ? b(a, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[s] = t;
3
- var i = (a, s, t) => x(a, typeof s != "symbol" ? s + "" : s, t);
4
- import { S as g, d as p } from "./ssr-safe-5cWfJP-s.js";
5
- import { b as _ } from "./altura-controle-vxQiXG4q.js";
6
- import { L as f } from "./listener-bag-DQgv7OON.js";
7
- import { i as c } from "./opcoes-CupvWVIm.js";
8
- import { g as v, o as E, c as y } from "./acessibilidade-CUlSXc2X.js";
9
- import { v as A, a as w } from "./form-validacao-BlQFxUVj.js";
10
- import { a as S } from "./form-submissao-C-SPRKgT.js";
11
- const V = ':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;vertical-align:middle}.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, 34px);min-height:var(--ui-campo-altura, 34px);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}}:host(.squarecircle) .ui-campo-texto__container,:host(.squarecircles) .ui-campo-texto__container,:host(.ui-squarecircle) .ui-campo-texto__container,:host(.ui-squarecircles) .ui-campo-texto__container,:host([formato="squarecircle"]) .ui-campo-texto__container,:host([formato="squarecircles"]) .ui-campo-texto__container,:host([formato="squircle"]) .ui-campo-texto__container{border-radius:var(--ui-raio-lg, 10px)}', k = [
12
- "label",
13
- "placeholder",
14
- "value",
15
- "tipo",
16
- "type",
17
- "obrigatorio",
18
- "required",
19
- "minlength",
20
- "min-length",
21
- "maxlength",
22
- "max-length",
23
- "pattern",
24
- "min",
25
- "max",
26
- "step",
27
- "mensagem-validacao",
28
- "helper-text",
29
- "erro",
30
- "mensagem-erro",
31
- "disabled",
32
- "readonly",
33
- "label-flutuante",
34
- "alternar-senha",
35
- "tamanho",
36
- "size",
37
- "altura",
38
- "height",
39
- "densidade",
40
- "aria-label"
41
- ];
42
- function q() {
43
- return `
44
- <style>${V}</style>
45
- <div class="ui-campo-texto__container">
46
- <label class="ui-campo-texto__label" part="rotulo" style="display: none;"></label>
47
- <div class="ui-campo-texto__wrapper" part="campo">
48
- <span class="ui-campo-texto__icone ui-campo-texto__icone--esquerda" part="icone icone-esquerda">
49
- <slot name="icone-esquerda"></slot>
50
- </span>
51
- <input class="ui-campo-texto__input" part="input" type="text" />
52
- <span class="ui-campo-texto__icone ui-campo-texto__icone--direita" part="icone icone-direita">
53
- <slot name="icone-direita"></slot>
54
- </span>
55
- </div>
56
- </div>
57
- <div class="ui-campo-texto__helper" part="ajuda" aria-live="polite" style="display: none;"></div>
58
- `;
59
- }
60
- function C(a, s, t, e) {
61
- if (a.textContent = s, !t) return;
62
- const r = document.createElement("span");
63
- r.className = e, r.setAttribute("aria-hidden", "true"), r.textContent = "*", a.append(" ", r);
64
- }
65
- function I(a) {
66
- const { labelElement: s, inputElement: t, labelText: e, placeholderText: r, isFlutuante: n, estaFocado: o, obrigatorio: u } = a, l = t.value.trim() !== "";
67
- let h = !1;
68
- try {
69
- h = t.matches(":-webkit-autofill");
70
- } catch {
71
- h = !1;
72
- }
73
- e ? (C(s, e, !!u, "ui-campo-texto__asterisco"), s.style.display = "flex", n && (o || l || h) ? s.classList.add("ui-campo-texto__label--ativa") : s.classList.remove("ui-campo-texto__label--ativa")) : s.style.display = "none", n && !o && !l && !h ? t.placeholder = "" : t.placeholder = r;
74
- }
75
- function L(a, s, t) {
76
- s ? (a.classList.add("ui-campo-texto__icone--clicavel"), a.setAttribute("role", "button"), a.setAttribute("tabindex", "0"), a.setAttribute("aria-label", t ? "Ocultar senha" : "Exibir senha")) : (a.classList.remove("ui-campo-texto__icone--clicavel"), a.removeAttribute("role"), a.removeAttribute("tabindex"), a.removeAttribute("aria-label"));
77
- }
78
- function z(a, s, t, e, r, n, o = "ui-campo-texto") {
79
- e ? (a.classList.add(`${o}__wrapper--erro`), s.setAttribute("aria-invalid", "true")) : (a.classList.remove(`${o}__wrapper--erro`), s.removeAttribute("aria-invalid")), e && r ? (t.textContent = `⚠️ ${r}`, t.className = `${o}__helper ${o}__helper--erro`, t.style.display = "block") : n ? (t.textContent = n, t.className = `${o}__helper`, t.style.display = "block") : t.style.display = "none";
80
- }
81
- class m extends g {
82
- constructor() {
83
- super();
84
- i(this, "internals");
85
- i(this, "_formDisabled", !1);
86
- i(this, "_customErrorMessage", "");
87
- this.internals = typeof this.attachInternals == "function" ? this.attachInternals() : {};
88
- }
89
- // === Ciclo de Vida Form-Associated Custom Elements ===
90
- formDisabledCallback(t) {
91
- this._formDisabled = t, this.syncState();
92
- }
93
- get form() {
94
- var t;
95
- return this.closest("form") ?? ((t = this.internals) == null ? void 0 : t.form) ?? null;
96
- }
97
- get required() {
98
- return this.hasAttribute("obrigatorio") || this.hasAttribute("required");
99
- }
100
- set required(t) {
101
- t ? this.setAttribute("obrigatorio", "") : (this.removeAttribute("obrigatorio"), this.removeAttribute("required")), this.syncState();
102
- }
103
- get obrigatorio() {
104
- return this.required;
105
- }
106
- set obrigatorio(t) {
107
- this.required = t;
108
- }
109
- // === API de Validação Nativa ===
110
- get validity() {
111
- var t;
112
- return this.atualizarValidade(), (t = this.internals) == null ? void 0 : t.validity;
113
- }
114
- get validationMessage() {
115
- var t;
116
- return this.atualizarValidade(), ((t = this.internals) == null ? void 0 : t.validationMessage) ?? "";
117
- }
118
- get willValidate() {
119
- var t;
120
- return ((t = this.internals) == null ? void 0 : t.willValidate) ?? !1;
121
- }
122
- checkValidity() {
123
- var t, e;
124
- return this.atualizarValidade(), ((e = (t = this.internals) == null ? void 0 : t.checkValidity) == null ? void 0 : e.call(t)) ?? !0;
125
- }
126
- reportValidity() {
127
- var t, e;
128
- return this.atualizarValidade(), ((e = (t = this.internals) == null ? void 0 : t.reportValidity) == null ? void 0 : e.call(t)) ?? !0;
129
- }
130
- setCustomValidity(t) {
131
- this._customErrorMessage = t || "", this.atualizarValidade();
132
- }
133
- }
134
- i(m, "formAssociated", !0);
135
- class d extends m {
136
- constructor() {
137
- super();
138
- i(this, "labelElement");
139
- i(this, "wrapperElement");
140
- i(this, "inputElement");
141
- i(this, "helperElement");
142
- i(this, "rightIconContainer");
143
- i(this, "leftSlotElement");
144
- i(this, "_senhaVisivel", !1);
145
- i(this, "listeners", new f());
146
- i(this, "_checkTimer", null);
147
- i(this, "_focado", !1);
148
- i(this, "_inputId");
149
- i(this, "_defaultValue", "");
150
- i(this, "handleSlotChange", () => {
151
- this.syncState();
152
- });
153
- i(this, "handleHostClick", (t) => {
154
- y(this, t) && !this.disabled && this.inputElement.focus();
155
- });
156
- i(this, "handleRightIconClick", (t) => {
157
- (this.getAttribute("tipo") === "password" || this.hasAttribute("alternar-senha")) && (t.stopPropagation(), this.alternarVisibilidadeSenha());
158
- });
159
- i(this, "handleRightIconKeyDown", (t) => {
160
- (this.getAttribute("tipo") === "password" || this.hasAttribute("alternar-senha")) && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), this.alternarVisibilidadeSenha());
161
- });
162
- i(this, "handleFocus", () => {
163
- this._focado = !0, this.wrapperElement.classList.add("ui-campo-texto__wrapper--foco"), this.syncState();
164
- });
165
- i(this, "handleBlur", () => {
166
- this._focado = !1, this.wrapperElement.classList.remove("ui-campo-texto__wrapper--foco"), this.syncState();
167
- });
168
- /**
169
- * Enter submete o formulário como num <input> nativo. Aguarda um tick para que
170
- * ouvintes do consumidor possam cancelar com `preventDefault()` no keydown.
171
- */
172
- i(this, "handleKeyDown", (t) => {
173
- if (t.key !== "Enter" || t.isComposing || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey) return;
174
- const e = this.form;
175
- e && setTimeout(() => {
176
- !t.defaultPrevented && this.isConnected && S(e);
177
- });
178
- });
179
- i(this, "handleInput", (t) => {
180
- t.stopPropagation();
181
- const e = t.target.value;
182
- this.internals.setFormValue(e), this.syncState(), this.dispatchEvent(
183
- new CustomEvent("ui-input", {
184
- detail: { value: e },
185
- bubbles: !0,
186
- composed: !0
187
- })
188
- ), this.dispatchEvent(
189
- new Event("input", {
190
- bubbles: !0,
191
- composed: !0
192
- })
193
- );
194
- });
195
- i(this, "handleChange", (t) => {
196
- t.stopPropagation();
197
- const e = t.target.value;
198
- this.internals.setFormValue(e), this.syncState(), this.dispatchEvent(
199
- new CustomEvent("ui-change", {
200
- detail: { value: e },
201
- bubbles: !0,
202
- composed: !0
203
- })
204
- ), this.dispatchEvent(
205
- new Event("change", {
206
- bubbles: !0,
207
- composed: !0
208
- })
209
- );
210
- });
211
- const t = this.attachShadow({ mode: "open", delegatesFocus: !0 });
212
- t.innerHTML = q(), 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`;
213
- }
214
- static get observedAttributes() {
215
- return k;
216
- }
217
- focus(t) {
218
- this.inputElement.focus(t);
219
- }
220
- blur() {
221
- this.inputElement.blur();
222
- }
223
- connectedCallback() {
224
- this.listeners.cleanup(), this.listeners.add(this.inputElement, "input", this.handleInput), this.listeners.add(this.inputElement, "change", this.handleChange), this.listeners.add(this.inputElement, "focus", this.handleFocus), this.listeners.add(this.inputElement, "blur", this.handleBlur), this.listeners.add(this.inputElement, "keydown", this.handleKeyDown), this.listeners.add(this.rightIconContainer, "click", this.handleRightIconClick), this.listeners.add(this.rightIconContainer, "keydown", this.handleRightIconKeyDown), this.listeners.add(this.leftSlotElement, "slotchange", this.handleSlotChange), this.listeners.add(this, "click", this.handleHostClick), this._defaultValue = this.getAttribute("value") || "", this.hasAttribute("value") && !this.inputElement.value && (this.inputElement.value = this._defaultValue), this.syncState(), this._checkTimer && clearTimeout(this._checkTimer), this._checkTimer = setTimeout(() => this.syncState(), 100);
225
- }
226
- disconnectedCallback() {
227
- this.listeners.cleanup(), this._checkTimer && clearTimeout(this._checkTimer), this._checkTimer = null;
228
- }
229
- attributeChangedCallback(t, e, r) {
230
- t === "value" && r !== this.inputElement.value && !this._focado && (this.inputElement.value = r || ""), this.syncState();
231
- }
232
- get value() {
233
- return this.inputElement ? this.inputElement.value : this.getAttribute("value") || "";
234
- }
235
- set value(t) {
236
- if (this.setAttribute("value", t), this.inputElement)
237
- try {
238
- this.inputElement.value = t;
239
- } catch {
240
- }
241
- this.syncState();
242
- }
243
- // === Ciclo de Vida Form-Associated Custom Elements (W3C FACE) ===
244
- formResetCallback() {
245
- var t;
246
- this.inputElement.value = this._defaultValue, (t = this.internals) == null || t.setFormValue(this._defaultValue), this.syncState();
247
- }
248
- formStateRestoreCallback(t, e) {
249
- typeof t == "string" && (this.value = t);
250
- }
251
- get name() {
252
- return this.getAttribute("name") || "";
253
- }
254
- set name(t) {
255
- this.setAttribute("name", t);
256
- }
257
- get type() {
258
- return this.getAttribute("tipo") || this.getAttribute("type") || "text";
259
- }
260
- get disabled() {
261
- return this.hasAttribute("disabled") || this._formDisabled;
262
- }
263
- set disabled(t) {
264
- t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
265
- }
266
- get minLength() {
267
- return c(this.getAttribute("minlength") ?? this.getAttribute("min-length")) ?? -1;
268
- }
269
- set minLength(t) {
270
- t >= 0 ? this.setAttribute("minlength", String(t)) : this.removeAttribute("minlength"), this.syncState();
271
- }
272
- get maxLength() {
273
- return c(this.getAttribute("maxlength") ?? this.getAttribute("max-length")) ?? -1;
274
- }
275
- set maxLength(t) {
276
- t >= 0 ? this.setAttribute("maxlength", String(t)) : this.removeAttribute("maxlength"), this.syncState();
277
- }
278
- get pattern() {
279
- return this.getAttribute("pattern") || "";
280
- }
281
- set pattern(t) {
282
- t ? this.setAttribute("pattern", t) : this.removeAttribute("pattern"), this.syncState();
283
- }
284
- atualizarValidade() {
285
- var l, h;
286
- const t = this.getAttribute("min"), e = this.getAttribute("max"), r = this.inputElement ? this.inputElement.value : "", n = this.getAttribute("value") || r, o = !!((h = (l = this.inputElement) == null ? void 0 : l.validity) != null && h.badInput), u = A({
287
- val: r,
288
- rawVal: n,
289
- badInput: o,
290
- disabled: this.disabled,
291
- required: this.required,
292
- tipo: this.type,
293
- minlength: this.minLength >= 0 ? this.minLength : null,
294
- maxlength: this.maxLength >= 0 ? this.maxLength : null,
295
- min: t !== null ? parseFloat(t) : null,
296
- max: e !== null ? parseFloat(e) : null,
297
- step: this.getAttribute("step"),
298
- pattern: this.getAttribute("pattern"),
299
- customError: this._customErrorMessage,
300
- mensagemValidacao: this.getAttribute("mensagem-validacao")
301
- });
302
- w(this.internals, u, this.inputElement);
303
- }
304
- alternarVisibilidadeSenha() {
305
- var r;
306
- if (!(this.getAttribute("tipo") === "password" || this._senhaVisivel)) return;
307
- this._senhaVisivel = !this._senhaVisivel, this.inputElement.type = this._senhaVisivel ? "text" : "password";
308
- const e = (r = this.shadowRoot) == null ? void 0 : r.querySelector('slot[name="icone-direita"]');
309
- e && e.assignedElements().forEach((o) => {
310
- var u, l;
311
- (((u = o.textContent) == null ? void 0 : u.trim()) === "👁️" || ((l = o.textContent) == null ? void 0 : l.trim()) === "🙈") && (o.textContent = this._senhaVisivel ? "🙈" : "👁️");
312
- }), this.dispatchEvent(
313
- new CustomEvent("ui-toggle-senha", {
314
- detail: { visivel: this._senhaVisivel },
315
- bubbles: !0,
316
- composed: !0
317
- })
318
- );
319
- }
320
- syncState() {
321
- this.leftSlotElement.assignedNodes().length > 0 || this.querySelector('[slot="icone-esquerda"]') !== null ? this.setAttribute("tem-icone-esquerda", "") : this.removeAttribute("tem-icone-esquerda"), _(this), I({
322
- labelElement: this.labelElement,
323
- inputElement: this.inputElement,
324
- labelText: this.getAttribute("label"),
325
- placeholderText: this.getAttribute("placeholder") || "",
326
- isFlutuante: this.hasAttribute("label-flutuante"),
327
- estaFocado: this._focado,
328
- obrigatorio: this.required
329
- }), this.sincronizarNomeAcessivel();
330
- const e = this.getAttribute("tipo") || this.getAttribute("type") || "text";
331
- if (!this._senhaVisivel)
332
- try {
333
- this.inputElement.type = e;
334
- } catch {
335
- this.inputElement.type = "text";
336
- }
337
- this.minLength >= 0 ? this.inputElement.minLength = this.minLength : this.inputElement.removeAttribute("minlength"), this.maxLength >= 0 ? this.inputElement.maxLength = this.maxLength : this.inputElement.removeAttribute("maxlength");
338
- const r = this.getAttribute("pattern");
339
- r !== null ? this.inputElement.pattern = r : this.inputElement.removeAttribute("pattern"), this.internals.setFormValue(this.inputElement.value);
340
- const n = this.hasAttribute("disabled") || this._formDisabled, o = this.hasAttribute("readonly");
341
- this.inputElement.disabled = n, this.inputElement.readOnly = o, n ? this.wrapperElement.classList.add("ui-campo-texto__wrapper--disabled") : this.wrapperElement.classList.remove("ui-campo-texto__wrapper--disabled");
342
- const u = e === "password" || this.hasAttribute("alternar-senha");
343
- L(this.rightIconContainer, u, this._senhaVisivel);
344
- const l = this.hasAttribute("erro") || this.hasAttribute("mensagem-erro");
345
- z(
346
- this.wrapperElement,
347
- this.inputElement,
348
- this.helperElement,
349
- l,
350
- this.getAttribute("mensagem-erro"),
351
- this.getAttribute("helper-text")
352
- ), this.helperElement.style.display === "none" ? this.inputElement.removeAttribute("aria-describedby") : this.inputElement.setAttribute("aria-describedby", this.helperElement.id), this.required ? this.inputElement.setAttribute("aria-required", "true") : this.inputElement.removeAttribute("aria-required"), this.atualizarValidade();
353
- }
354
- /**
355
- * Sem o atributo `label`, o input nativo herda o nome acessível de fora do Shadow DOM
356
- * (`aria-label` no host, `<label for>` ou `<label>` envolvente).
357
- */
358
- sincronizarNomeAcessivel() {
359
- const t = this.getAttribute("label") ? "" : E(this, this.internals);
360
- t ? this.inputElement.setAttribute("aria-label", t) : this.inputElement.removeAttribute("aria-label");
361
- }
362
- }
363
- class T extends d {
364
- }
365
- p("ui-campo-texto", d);
366
- p("ui-input", T);
367
- export {
368
- k as A,
369
- m as F,
370
- d as U,
371
- T as a,
372
- L as b,
373
- q as c,
374
- I as d,
375
- C as r,
376
- z as s
377
- };
@@ -1,20 +0,0 @@
1
- "use strict";var E=Object.defineProperty;var A=(t,i,e)=>i in t?E(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e;var s=(t,i,e)=>A(t,typeof i!="symbol"?i+"":i,e);const _=require("./listener-bag-D5omxZ9h.cjs"),g=require("./ssr-safe-CiHD1adl.cjs"),f=require("./opcoes-vdAUY5OI.cjs"),w=':host{display:block;width:100%;box-sizing:border-box}:host([hidden]){display:none}: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}@media (hover: hover){.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--clicavel:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px;border-color:var(--ui-cor-primaria, #00E08A)}@media (prefers-reduced-motion: reduce){.ui-card{transition:none}.ui-card--clicavel:hover,.ui-card--clicavel:active{transform:none}}.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}',k=["button","a","input","select","textarea","label","summary","ui-botao","ui-switch","ui-checkbox","ui-radio","ui-campo-texto","ui-segmented",'[contenteditable]:not([contenteditable="false"])','[role="button"]','[role="link"]','[role="checkbox"]','[role="switch"]','[role="menuitem"]'].join(", ");function C(t,i){if(typeof Element>"u"||!(t instanceof Element))return!1;const e=t.closest(k);return e!==null&&e!==i&&i.contains(e)}function S(t,i){return t.key!=="Enter"&&t.key!==" "||t.repeat||t.ctrlKey||t.altKey||t.metaKey?!1:t.target===i}function q(t,i,e){return Array.from(i.children).some(r=>e.includes(r.getAttribute("slot")??""))?!0:t?Array.from(t.querySelectorAll("slot")).filter(r=>e.includes(r.name)).some(r=>r.assignedNodes({flatten:!0}).some(o=>o.nodeType===1||o.nodeType===3&&(o.textContent??"").trim()!=="")):!1}const x=["plano","elevado","destaque"];class y extends g.SafeHTMLElement{constructor(){super();s(this,"cardElement");s(this,"listeners",new _.ListenerBag);s(this,"handleSlotChange",()=>{this.syncState()});s(this,"handleClick",e=>{this.disabled||!this.clicavel||e&&C(e.target,this)||this.emitirClique()});s(this,"handleKeyDown",e=>{!this.clicavel||this.disabled||!S(e,this.cardElement)||(e.preventDefault(),this.emitirClique())});const e=this.attachShadow({mode:"open"});e.innerHTML=`
2
- <style>${w}</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","aria-label"]}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(l=>this.listeners.add(l,"slotchange",this.handleSlotChange)),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,a,l){this.syncState()}focus(e){this.clicavel&&!this.disabled?this.cardElement.focus(e):super.focus(e)}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 b,m,p,v;const e=f.escolherOpcao(this.getAttribute("elevacao")||this.getAttribute("elevation"),x,"plano"),a=f.escolherOpcaoOpcional(this.getAttribute("variante")||this.getAttribute("variant"),x),l=this.clicavel,r=this.hasAttribute("compacto")||this.hasAttribute("compact"),o=this.disabled;if(this.cardElement.className="ui-card",this.cardElement.classList.add(`ui-card--${e}`),a&&this.cardElement.classList.add(`ui-card--${a}`),l){this.cardElement.classList.add("ui-card--clicavel"),this.cardElement.setAttribute("role","button"),this.cardElement.setAttribute("tabindex",o?"-1":"0");const c=(b=this.getAttribute("aria-label"))==null?void 0:b.trim();c?this.cardElement.setAttribute("aria-label",c):this.cardElement.removeAttribute("aria-label")}else this.cardElement.removeAttribute("role"),this.cardElement.removeAttribute("tabindex"),this.cardElement.removeAttribute("aria-label");o?this.cardElement.setAttribute("aria-disabled","true"):this.cardElement.removeAttribute("aria-disabled"),r&&this.cardElement.classList.add("ui-card--compacto"),o&&this.cardElement.classList.add("ui-card--disabled");const n=(m=this.shadowRoot)==null?void 0:m.querySelector(".ui-card__header"),u=(p=this.shadowRoot)==null?void 0:p.querySelector(".ui-card__footer"),h=(v=this.shadowRoot)==null?void 0:v.querySelector(".ui-card__media"),d=c=>q(this.shadowRoot,this,c);h&&(h.style.display=d(["midia","media"])?"block":"none"),n&&(n.style.display=d(["cabecalho","header"])?"flex":"none"),u&&(u.style.display=d(["rodape","footer"])?"flex":"none")}emitirClique(){const e={id:this.id||"sem-id"};this.dispatchEvent(new CustomEvent("ui-click",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-clique",{detail:{...e},bubbles:!0,composed:!0}))}}g.definirCustomElement("ui-card",y);exports.UICard=y;
@@ -1,20 +0,0 @@
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;
@@ -1,20 +0,0 @@
1
- "use strict";var E=Object.defineProperty;var A=(t,i,e)=>i in t?E(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e;var s=(t,i,e)=>A(t,typeof i!="symbol"?i+"":i,e);const _=require("./listener-bag-D5omxZ9h.cjs"),g=require("./ssr-safe-CiHD1adl.cjs"),f=require("./opcoes-vdAUY5OI.cjs"),w=':host{display:block;width:100%;box-sizing:border-box}:host([hidden]){display:none}: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}@media (hover: hover){.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--clicavel:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px;border-color:var(--ui-cor-primaria, #00E08A)}@media (prefers-reduced-motion: reduce){.ui-card{transition:none}.ui-card--clicavel:hover,.ui-card--clicavel:active{transform:none}}.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}:host(.squarecircle) .ui-card,:host(.squarecircles) .ui-card,:host(.ui-squarecircle) .ui-card,:host(.ui-squarecircles) .ui-card,:host([formato="squarecircle"]) .ui-card,:host([formato="squarecircles"]) .ui-card,:host([formato="squircle"]) .ui-card{border-radius:var(--ui-raio-lg, 12px)}',k=["button","a","input","select","textarea","label","summary","ui-botao","ui-switch","ui-checkbox","ui-radio","ui-campo-texto","ui-segmented",'[contenteditable]:not([contenteditable="false"])','[role="button"]','[role="link"]','[role="checkbox"]','[role="switch"]','[role="menuitem"]'].join(", ");function C(t,i){if(typeof Element>"u"||!(t instanceof Element))return!1;const e=t.closest(k);return e!==null&&e!==i&&i.contains(e)}function S(t,i){return t.key!=="Enter"&&t.key!==" "||t.repeat||t.ctrlKey||t.altKey||t.metaKey?!1:t.target===i}function q(t,i,e){return Array.from(i.children).some(r=>e.includes(r.getAttribute("slot")??""))?!0:t?Array.from(t.querySelectorAll("slot")).filter(r=>e.includes(r.name)).some(r=>r.assignedNodes({flatten:!0}).some(o=>o.nodeType===1||o.nodeType===3&&(o.textContent??"").trim()!=="")):!1}const x=["plano","elevado","destaque"];class y extends g.SafeHTMLElement{constructor(){super();s(this,"cardElement");s(this,"listeners",new _.ListenerBag);s(this,"handleSlotChange",()=>{this.syncState()});s(this,"handleClick",e=>{this.disabled||!this.clicavel||e&&C(e.target,this)||this.emitirClique()});s(this,"handleKeyDown",e=>{!this.clicavel||this.disabled||!S(e,this.cardElement)||(e.preventDefault(),this.emitirClique())});const e=this.attachShadow({mode:"open"});e.innerHTML=`
2
- <style>${w}</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","formato","clicavel","clickable","compacto","compact","disabled","aria-label"]}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(c=>this.listeners.add(c,"slotchange",this.handleSlotChange)),this.syncState()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,a,c){this.syncState()}focus(e){this.clicavel&&!this.disabled?this.cardElement.focus(e):super.focus(e)}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 b,m,p,v;const e=f.escolherOpcao(this.getAttribute("elevacao")||this.getAttribute("elevation"),x,"plano"),a=f.escolherOpcaoOpcional(this.getAttribute("variante")||this.getAttribute("variant"),x),c=this.clicavel,r=this.hasAttribute("compacto")||this.hasAttribute("compact"),o=this.disabled;if(this.cardElement.className="ui-card",this.cardElement.classList.add(`ui-card--${e}`),a&&this.cardElement.classList.add(`ui-card--${a}`),c){this.cardElement.classList.add("ui-card--clicavel"),this.cardElement.setAttribute("role","button"),this.cardElement.setAttribute("tabindex",o?"-1":"0");const l=(b=this.getAttribute("aria-label"))==null?void 0:b.trim();l?this.cardElement.setAttribute("aria-label",l):this.cardElement.removeAttribute("aria-label")}else this.cardElement.removeAttribute("role"),this.cardElement.removeAttribute("tabindex"),this.cardElement.removeAttribute("aria-label");o?this.cardElement.setAttribute("aria-disabled","true"):this.cardElement.removeAttribute("aria-disabled"),r&&this.cardElement.classList.add("ui-card--compacto"),o&&this.cardElement.classList.add("ui-card--disabled");const n=(m=this.shadowRoot)==null?void 0:m.querySelector(".ui-card__header"),u=(p=this.shadowRoot)==null?void 0:p.querySelector(".ui-card__footer"),h=(v=this.shadowRoot)==null?void 0:v.querySelector(".ui-card__media"),d=l=>q(this.shadowRoot,this,l);h&&(h.style.display=d(["midia","media"])?"block":"none"),n&&(n.style.display=d(["cabecalho","header"])?"flex":"none"),u&&(u.style.display=d(["rodape","footer"])?"flex":"none")}emitirClique(){const e={id:this.id||"sem-id"};this.dispatchEvent(new CustomEvent("ui-click",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("ui-clique",{detail:{...e},bubbles:!0,composed:!0}))}}g.definirCustomElement("ui-card",y);exports.UICard=y;
@@ -1,111 +0,0 @@
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
- };