@thibezer/ui-components-kit 2.24.1 → 2.24.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.
- package/CHANGELOG.md +61 -1
- package/dist/botao.cjs +12 -1
- package/dist/botao.js +162 -3
- package/dist/camadas.cjs +311 -1
- package/dist/camadas.js +3244 -148
- package/dist/campo-texto.cjs +16 -1
- package/dist/campo-texto.js +308 -7
- package/dist/canvas.cjs +22 -22
- package/dist/canvas.js +230 -233
- package/dist/card.cjs +20 -1
- package/dist/card.js +145 -2
- package/dist/components/ui-canvas-prancha/index.d.ts +1 -1
- package/dist/components/ui-canvas-prancha/prancha-teclado.d.ts +18 -0
- package/dist/components/ui-canvas-prancha/ui-canvas-prancha-base.d.ts +4 -0
- package/dist/components/ui-editor-prancha/editor-modos.d.ts +10 -0
- package/dist/components/ui-editor-prancha/editor-tipos.d.ts +4 -0
- package/dist/components/ui-editor-prancha/index.d.ts +1 -0
- package/dist/components/ui-editor-prancha/ui-editor-prancha.d.ts +39 -6
- package/dist/core.cjs +1 -1
- package/dist/core.js +44 -55
- package/dist/{cores-utils-BrdynxRd.js → cores-utils-DMyqWvZh.js} +2 -2
- package/dist/cores.cjs +32 -1
- package/dist/cores.js +300 -13
- package/dist/custom-elements.json +1712 -1205
- package/dist/data.cjs +28 -1
- package/dist/data.js +286 -99
- package/dist/{feature_caixa-2Sxv3tGa.js → feature_caixa-BVc5LenS.js} +42 -42
- package/dist/{feature_desenho-BVHivWIB.js → feature_desenho-CC8Mp5Gp.js} +2 -2
- package/dist/feedback.cjs +52 -1
- package/dist/feedback.js +655 -25
- package/dist/forms.cjs +66 -1
- package/dist/forms.js +1216 -39
- package/dist/{geometria-px-DUs5FgLE.js → geometria-px-DHMPUsxC.js} +47 -47
- package/dist/index.cjs +67 -1
- package/dist/index.js +1476 -274
- package/dist/kit-base-CGqj9aiD.cjs +2 -0
- package/dist/kit-base-_THn4w3u.js +1079 -0
- package/dist/mapa.cjs +5 -5
- package/dist/mapa.js +16 -17
- package/dist/modal.cjs +18 -1
- package/dist/modal.js +235 -29
- package/dist/motor.js +49 -49
- package/dist/prancha-nucleo.cjs +3 -1
- package/dist/prancha-nucleo.js +3120 -277
- package/dist/prancha.cjs +38 -1
- package/dist/prancha.js +3233 -228
- package/dist/register.cjs +1 -1
- package/dist/register.js +3 -20
- package/dist/seletor-mapa-base.cjs +13 -13
- package/dist/seletor-mapa-base.js +3 -5
- package/dist/tabela.cjs +142 -1
- package/dist/tabela.js +3773 -92
- package/dist/tipos-elementos.d.ts +5 -1
- package/dist/tipos-vue.d.ts +4 -1
- package/dist/tools.cjs +16 -1
- package/dist/tools.js +1564 -26
- package/dist/ui-seletor-cor-BGw8SBPm.cjs +83 -0
- package/dist/{ui-seletor-cor-Cd8jkzXG.js → ui-seletor-cor-B_twSm-V.js} +8 -9
- package/dist/utils-ClVgqVyJ.cjs +1 -0
- package/dist/utils-DrHoxxmf.js +83 -0
- package/package.json +43 -2
- package/dist/acessibilidade-CSzX-DkG.cjs +0 -1
- package/dist/acessibilidade-CUlSXc2X.js +0 -38
- package/dist/altura-controle-ukMRPckR.cjs +0 -1
- package/dist/altura-controle-vxQiXG4q.js +0 -62
- package/dist/alvo-digitavel-CzCvNVQ3.js +0 -23
- package/dist/alvo-digitavel-DbH0hYFf.cjs +0 -1
- package/dist/degrade-CIxvOTUv.cjs +0 -1
- package/dist/degrade-gDa5sW__.js +0 -119
- package/dist/feature_caixa-CnYPKVFS.cjs +0 -1
- package/dist/feature_caixa-DCs9ZeSk.js +0 -1038
- package/dist/feature_historico-BAIYk1Me.cjs +0 -3
- package/dist/feature_historico-C4h9y5fu.js +0 -3039
- package/dist/form-atalhos-7JTYvumA.cjs +0 -1
- package/dist/form-atalhos-DDTlpgaB.js +0 -203
- package/dist/form-erros-CwPz7Jr4.cjs +0 -1
- package/dist/form-erros-DT5HklfD.js +0 -184
- package/dist/form-submissao-C-SPRKgT.js +0 -61
- package/dist/form-submissao-DxKO5MHI.cjs +0 -1
- package/dist/form-validacao-BlQFxUVj.js +0 -104
- package/dist/form-validacao-DIeyQVH5.cjs +0 -1
- package/dist/geometria-px-DKrWq_XY.js +0 -639
- package/dist/leaflet-CEPcxGWV.cjs +0 -1
- package/dist/leaflet-DOq10gfg.js +0 -84
- package/dist/leaflet-loader-94z5VsdY.cjs +0 -2
- package/dist/leaflet-loader-Cjcdgj5R.js +0 -21
- package/dist/listener-bag-D5omxZ9h.cjs +0 -1
- package/dist/listener-bag-DQgv7OON.js +0 -34
- package/dist/motor-By2te6PZ.js +0 -1400
- package/dist/motor-CkMxd378.cjs +0 -1
- package/dist/opcoes-CupvWVIm.js +0 -24
- package/dist/opcoes-vdAUY5OI.cjs +0 -1
- package/dist/parts-CaoQiCfI.js +0 -7
- package/dist/parts-vQa2873h.cjs +0 -1
- package/dist/prancha-paleta-BZ-9QDgh.js +0 -5276
- package/dist/prancha-paleta-Bb24vP71.cjs +0 -17
- package/dist/ssr-safe-5cWfJP-s.js +0 -10
- package/dist/ssr-safe-CiHD1adl.cjs +0 -1
- package/dist/svg-seguro-ChVJ2L2z.js +0 -74
- package/dist/svg-seguro-J2RM1Ssf.cjs +0 -1
- package/dist/ui-badge-DE58YSBY.cjs +0 -28
- package/dist/ui-badge-KgmI3jOD.js +0 -201
- package/dist/ui-botao-Dz8YvmiA.cjs +0 -12
- package/dist/ui-botao-zLkcMMyP.js +0 -168
- package/dist/ui-bus-CUd99VJi.js +0 -177
- package/dist/ui-bus-XqBLlTYQ.cjs +0 -1
- package/dist/ui-camadas-DoHPnbQm.js +0 -3133
- package/dist/ui-camadas-Vx7wYD4D.cjs +0 -311
- package/dist/ui-campo-texto-Dliyt9qr.cjs +0 -16
- package/dist/ui-campo-texto-btevggO3.js +0 -379
- package/dist/ui-card-7IEYbCN0.js +0 -150
- package/dist/ui-card-Bx8EyzYY.cjs +0 -20
- package/dist/ui-card-C-EJoKnm.js +0 -150
- package/dist/ui-card-DFnRp9bl.js +0 -146
- package/dist/ui-card-DrWVJQKw.cjs +0 -20
- package/dist/ui-card-DsIjHMmG.cjs +0 -20
- package/dist/ui-controle-cores-B1w_Yl69.cjs +0 -32
- package/dist/ui-controle-cores-BRjMvmMn.js +0 -291
- package/dist/ui-controle-cores-BcH9k2Fa.js +0 -292
- package/dist/ui-controle-cores-CvSTP6gJ.cjs +0 -32
- package/dist/ui-editor-prancha-CIngI6yI.js +0 -2886
- package/dist/ui-editor-prancha-DorSe6sC.cjs +0 -31
- package/dist/ui-linha-2kY7TNUJ.cjs +0 -38
- package/dist/ui-linha-B4mBRm1x.cjs +0 -61
- package/dist/ui-linha-DTEIIww4.js +0 -1167
- package/dist/ui-linha-KFF86FW5.js +0 -752
- package/dist/ui-modal-BrXzVZ65.js +0 -216
- package/dist/ui-modal-lARKzEVZ.cjs +0 -18
- package/dist/ui-paleta-ferramentas-Bu6JaT0s.js +0 -1245
- package/dist/ui-paleta-ferramentas-D3Jhwt26.cjs +0 -21
- package/dist/ui-paleta-ferramentas-DebHYiwd.js +0 -1615
- package/dist/ui-paleta-ferramentas-Dgejtluh.js +0 -1423
- package/dist/ui-paleta-ferramentas-hzyo8wBt.cjs +0 -22
- package/dist/ui-paleta-ferramentas-jWuICjW8.cjs +0 -22
- package/dist/ui-seletor-cor-0RLjcME6.cjs +0 -83
- package/dist/ui-seletor-cor-CMuuW-Ym.cjs +0 -83
- package/dist/ui-seletor-cor-DFIQ1sin.js +0 -405
- package/dist/ui-skeleton-BLEV6h3k.js +0 -653
- package/dist/ui-skeleton-B_XTaGrX.cjs +0 -52
- package/dist/ui-switch-BXIDwC-Y.cjs +0 -66
- package/dist/ui-switch-Ctxk-jKS.js +0 -1212
- package/dist/ui-tabela-CXxqbwXv.cjs +0 -7
- package/dist/ui-tabela-Cd0vOwnT.js +0 -1459
- package/dist/ui-tabela-propriedades-C5cIF5ES.js +0 -3779
- package/dist/ui-tabela-propriedades-CJyo568n.js +0 -3517
- package/dist/ui-tabela-propriedades-D96Djx-q.cjs +0 -136
- package/dist/ui-tabela-propriedades-Wa34hfIr.cjs +0 -142
- package/dist/ui-tabela-propriedades-ahQhQauu.js +0 -2329
- package/dist/ui-tabela-propriedades-w9JWhjHy.cjs +0 -142
- package/dist/zero-js-triggers-CJT988bR.js +0 -83
- package/dist/zero-js-triggers-CgM9IIQB.cjs +0 -1
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
var S = Object.defineProperty;
|
|
2
|
-
var C = (e, o, t) => o in e ? S(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
|
|
3
|
-
var r = (e, o, t) => C(e, typeof o != "symbol" ? o + "" : o, t);
|
|
4
|
-
import { d as _, S as q } from "./ssr-safe-5cWfJP-s.js";
|
|
5
|
-
import { L as D } from "./listener-bag-DQgv7OON.js";
|
|
6
|
-
import { A as I, a as T } from "./degrade-gDa5sW__.js";
|
|
7
|
-
const z = ':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-modal__backdrop{display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:calc(var(--ui-z-modal, 1000) - 1);opacity:0;pointer-events:none;transition:opacity .25s ease}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{display:block;opacity:1;pointer-events:auto}.ui-modal__dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(.95);max-width:560px;width:90%;max-height:85vh;background:var(--ui-degrade-interno, var(--ui-modal-fundo, var(--ui-fundo-card, var(--ui-cor-fundo-card, #18181c))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-borda, 12px);box-shadow:var(--ui-sombra-lg, 0 12px 36px rgba(0, 0, 0, .6));z-index:var(--ui-z-modal, 1000);display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;overflow:hidden;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility 0s linear .2s;box-sizing:border-box;color:var(--ui-cor-texto, #e1e1e6)}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,-50%) scale(1);transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility 0s}@starting-style{:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:0;transform:translate(-50%,-50%) scale(.94)}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{opacity:0}}.ui-modal__handle{display:none;width:36px;height:4px;border-radius:2px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent);margin:6px auto 12px;flex-shrink:0}.ui-modal__header{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);gap:12px}.ui-modal__titulo{font-size:18px;font-weight:600;margin:0;color:var(--ui-cor-texto, #e1e1e6)}.ui-modal__close{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-size:16px;cursor:pointer;padding:4px 8px;border-radius:var(--ui-raio-sm, 4px);line-height:1;display:inline-flex;align-items:center;justify-content:center;transition:color .15s ease,background-color .15s ease;touch-action:manipulation;-webkit-tap-highlight-color:transparent}:host([bloquear-fechamento]) .ui-modal__close{display:none}.ui-modal__close svg,.ui-modal__close ::slotted(svg){shape-rendering:geometricPrecision}.ui-modal__close:hover{color:#fff;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.ui-modal__body{padding:20px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:1;box-sizing:border-box}.ui-modal__footer{padding:14px 20px;display:flex;align-items:center;justify-content:flex-end;gap:12px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);background:var(--ui-modal-rodape-fundo, var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15)))}@media (max-width: 640px){.ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}.ui-modal__close{min-width:44px;min-height:44px;font-size:18px}.ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{transform:translateY(0)!important}.ui-modal__handle{display:block!important}}:host([bottom-sheet]) .ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}:host([bottom-sheet]) .ui-modal__close{min-width:44px;min-height:44px;font-size:18px}:host([bottom-sheet]) .ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([bottom-sheet][aberto]) .ui-modal__dialog,:host([bottom-sheet][open]) .ui-modal__dialog{transform:translateY(0)!important}:host([bottom-sheet]) .ui-modal__handle{display:block!important}:host(.squarecircle) .ui-modal__painel,:host(.squarecircles) .ui-modal__painel,:host(.ui-squarecircle) .ui-modal__painel,:host(.ui-squarecircles) .ui-modal__painel,:host([formato="squarecircle"]) .ui-modal__painel,:host([formato="squarecircles"]) .ui-modal__painel,:host([formato="squircle"]) .ui-modal__painel{border-radius:var(--ui-raio-xl, 16px)}:host(.degrade),:host(.ui-degrade),:host(.gradiente),:host(.ui-gradiente),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])){--ui-fundo-card: var(--ui-gradiente-card)}';
|
|
8
|
-
function M(e) {
|
|
9
|
-
return e.tagName === "SCRIPT" || e.tagName === "STYLE";
|
|
10
|
-
}
|
|
11
|
-
function R(e) {
|
|
12
|
-
const o = /* @__PURE__ */ new Set();
|
|
13
|
-
if (typeof document > "u") return o;
|
|
14
|
-
const t = (a) => {
|
|
15
|
-
a === e || a.contains(e) || M(a) || a.inert || a.hasAttribute("inert") || (a.setAttribute("inert", ""), a.inert = !0, o.add(a));
|
|
16
|
-
};
|
|
17
|
-
let i = e;
|
|
18
|
-
for (; i && i !== document.body && i !== document.documentElement; ) {
|
|
19
|
-
const a = i.parentElement;
|
|
20
|
-
if (!a) break;
|
|
21
|
-
Array.from(a.children).forEach((l) => t(l)), i = a;
|
|
22
|
-
}
|
|
23
|
-
return document.body && Array.from(document.body.children).forEach((a) => t(a)), o;
|
|
24
|
-
}
|
|
25
|
-
function F(e) {
|
|
26
|
-
e.forEach((o) => {
|
|
27
|
-
o.removeAttribute("inert"), o.inert = !1;
|
|
28
|
-
}), e.clear();
|
|
29
|
-
}
|
|
30
|
-
const n = [];
|
|
31
|
-
let f = /* @__PURE__ */ new Set(), v = "";
|
|
32
|
-
function x() {
|
|
33
|
-
F(f);
|
|
34
|
-
const e = n[n.length - 1];
|
|
35
|
-
f = e ? R(e) : /* @__PURE__ */ new Set();
|
|
36
|
-
}
|
|
37
|
-
function L(e) {
|
|
38
|
-
const o = n.indexOf(e);
|
|
39
|
-
o >= 0 && n.splice(o, 1), n.length === 0 && (v = document.body.style.overflow, document.body.style.overflow = "hidden"), n.push(e), x();
|
|
40
|
-
}
|
|
41
|
-
function g(e) {
|
|
42
|
-
const o = n.indexOf(e);
|
|
43
|
-
o < 0 || (n.splice(o, 1), n.length === 0 && (document.body.style.overflow = v), x());
|
|
44
|
-
}
|
|
45
|
-
function N(e) {
|
|
46
|
-
return n[n.length - 1] === e;
|
|
47
|
-
}
|
|
48
|
-
const m = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), ui-campo-texto, ui-input, ui-botao, ui-botao-primario, ui-checkbox, ui-switch, ui-lista-flutuante, ui-radio, ui-select, ui-segmented';
|
|
49
|
-
function p() {
|
|
50
|
-
var o;
|
|
51
|
-
let e = document.activeElement;
|
|
52
|
-
for (; (o = e == null ? void 0 : e.shadowRoot) != null && o.activeElement; )
|
|
53
|
-
e = e.shadowRoot.activeElement;
|
|
54
|
-
return e;
|
|
55
|
-
}
|
|
56
|
-
function c(e, o) {
|
|
57
|
-
let t = o;
|
|
58
|
-
for (; t; ) {
|
|
59
|
-
if (t === e) return !0;
|
|
60
|
-
const i = t.getRootNode();
|
|
61
|
-
t = t.parentNode ?? (i instanceof ShadowRoot ? i.host : null);
|
|
62
|
-
}
|
|
63
|
-
return !1;
|
|
64
|
-
}
|
|
65
|
-
function y(e) {
|
|
66
|
-
return !e.hasAttribute("disabled") && e.getAttribute("aria-hidden") !== "true";
|
|
67
|
-
}
|
|
68
|
-
function w(e) {
|
|
69
|
-
const o = [];
|
|
70
|
-
return e.querySelectorAll("slot").forEach((t) => {
|
|
71
|
-
t.assignedElements({ flatten: !0 }).forEach((i) => {
|
|
72
|
-
i instanceof HTMLElement && (i.matches(m) && o.push(i), o.push(...Array.from(i.querySelectorAll(m))));
|
|
73
|
-
});
|
|
74
|
-
}), o.filter(y);
|
|
75
|
-
}
|
|
76
|
-
function P(e) {
|
|
77
|
-
return [...Array.from(e.querySelectorAll(m)).filter((t) => window.getComputedStyle(t).display !== "none" && y(t)), ...w(e)];
|
|
78
|
-
}
|
|
79
|
-
function O(e, o) {
|
|
80
|
-
const t = w(e), i = t.filter((a) => a.hasAttribute("autofocus"));
|
|
81
|
-
for (const a of [...i, ...t])
|
|
82
|
-
if (a.focus(), c(a, p())) return;
|
|
83
|
-
o.focus();
|
|
84
|
-
}
|
|
85
|
-
function G(e, o, t) {
|
|
86
|
-
const i = P(t);
|
|
87
|
-
if (i.length === 0) {
|
|
88
|
-
e.preventDefault();
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const a = i[0], l = i[i.length - 1], s = p(), d = !c(o, s), u = c(a, s), b = c(l, s);
|
|
92
|
-
e.shiftKey ? (u || d) && (e.preventDefault(), l.focus()) : (b || d) && (e.preventDefault(), a.focus());
|
|
93
|
-
}
|
|
94
|
-
class E extends q {
|
|
95
|
-
constructor() {
|
|
96
|
-
super();
|
|
97
|
-
r(this, "backdropElement");
|
|
98
|
-
r(this, "dialogElement");
|
|
99
|
-
r(this, "tituloElement");
|
|
100
|
-
r(this, "closeElement");
|
|
101
|
-
r(this, "ouvintes", new D());
|
|
102
|
-
r(this, "_elementoGatilho", null);
|
|
103
|
-
r(this, "_tituloId");
|
|
104
|
-
/** Estado já aplicado (pilha, inert, scroll, eventos); difere de `aberto` durante uma transição. */
|
|
105
|
-
r(this, "_estaAberto", !1);
|
|
106
|
-
r(this, "handleSlotChange", () => {
|
|
107
|
-
this.syncState();
|
|
108
|
-
});
|
|
109
|
-
r(this, "handleBackdropClick", (t) => {
|
|
110
|
-
t.stopPropagation(), this.fechar();
|
|
111
|
-
});
|
|
112
|
-
r(this, "handleCloseClick", (t) => {
|
|
113
|
-
t.stopPropagation(), this.fechar();
|
|
114
|
-
});
|
|
115
|
-
r(this, "handleKeyDown", (t) => {
|
|
116
|
-
this._estaAberto && N(this) && (t.key === "Escape" ? (this.fechar(), t.stopImmediatePropagation()) : t.key === "Tab" && G(t, this, this.shadowRoot));
|
|
117
|
-
});
|
|
118
|
-
this._tituloId = `ui-modal-title-${Math.random().toString(36).substring(2, 9)}`;
|
|
119
|
-
const t = this.attachShadow({ mode: "open" });
|
|
120
|
-
t.innerHTML = `
|
|
121
|
-
<style>${z}</style>
|
|
122
|
-
<div class="ui-modal__backdrop" part="fundo"></div>
|
|
123
|
-
<div class="ui-modal__dialog" part="painel" role="dialog" aria-modal="true" aria-labelledby="${this._tituloId}" tabindex="-1">
|
|
124
|
-
<div class="ui-modal__handle"></div>
|
|
125
|
-
<div class="ui-modal__header" part="cabecalho">
|
|
126
|
-
<h3 class="ui-modal__titulo" part="titulo" id="${this._tituloId}"></h3>
|
|
127
|
-
<button class="ui-modal__close" part="fechar" type="button" aria-label="Fechar modal" title="Fechar">✕</button>
|
|
128
|
-
</div>
|
|
129
|
-
<div class="ui-modal__body" part="corpo">
|
|
130
|
-
<slot></slot>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="ui-modal__footer" part="rodape">
|
|
133
|
-
<slot name="rodape"></slot>
|
|
134
|
-
<slot name="footer"></slot>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
`, this.backdropElement = t.querySelector(".ui-modal__backdrop"), this.dialogElement = t.querySelector(".ui-modal__dialog"), this.tituloElement = t.querySelector(".ui-modal__titulo"), this.closeElement = t.querySelector(".ui-modal__close");
|
|
138
|
-
}
|
|
139
|
-
static get observedAttributes() {
|
|
140
|
-
return [
|
|
141
|
-
"aberto",
|
|
142
|
-
"open",
|
|
143
|
-
"titulo",
|
|
144
|
-
"title",
|
|
145
|
-
"aria-label",
|
|
146
|
-
"aria-labelledby",
|
|
147
|
-
"rotulo",
|
|
148
|
-
"bottom-sheet",
|
|
149
|
-
"bloquear-fechamento",
|
|
150
|
-
...I
|
|
151
|
-
];
|
|
152
|
-
}
|
|
153
|
-
connectedCallback() {
|
|
154
|
-
this.ouvintes.cleanup(), this.ouvintes.add(this.backdropElement, "click", this.handleBackdropClick), this.ouvintes.add(this.closeElement, "click", this.handleCloseClick), this.ouvintes.add(window, "keydown", this.handleKeyDown), this.shadowRoot.querySelectorAll("slot").forEach((t) => {
|
|
155
|
-
this.ouvintes.add(t, "slotchange", this.handleSlotChange);
|
|
156
|
-
}), this.syncState();
|
|
157
|
-
}
|
|
158
|
-
disconnectedCallback() {
|
|
159
|
-
this.ouvintes.cleanup(), this._estaAberto && (this._estaAberto = !1, g(this));
|
|
160
|
-
}
|
|
161
|
-
attributeChangedCallback(t, i, a) {
|
|
162
|
-
this.syncState();
|
|
163
|
-
}
|
|
164
|
-
get aberto() {
|
|
165
|
-
return this.hasAttribute("aberto") || this.hasAttribute("open");
|
|
166
|
-
}
|
|
167
|
-
set aberto(t) {
|
|
168
|
-
t ? this.setAttribute("aberto", "") : (this.removeAttribute("aberto"), this.removeAttribute("open"));
|
|
169
|
-
}
|
|
170
|
-
abrir() {
|
|
171
|
-
this.aberto = !0;
|
|
172
|
-
}
|
|
173
|
-
/** Fecha o modal, exceto com `bloquear-fechamento` (remova o atributo ou use `aberto = false` para forçar). */
|
|
174
|
-
fechar() {
|
|
175
|
-
this.hasAttribute("bloquear-fechamento") || (this.aberto = !1);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Abrir/fechar pelo método, pela propriedade ou pelo atributo (`aberto`/`open`, comum em
|
|
179
|
-
* React/Vue) passa sempre por aqui: mesmos eventos, mesmo foco e mesma camada de inert.
|
|
180
|
-
*/
|
|
181
|
-
aoAbrir() {
|
|
182
|
-
this._estaAberto = !0;
|
|
183
|
-
const t = p();
|
|
184
|
-
this._elementoGatilho = t && t !== document.body && !this.contains(t) ? t : null, L(this), this.dispatchEvent(new CustomEvent("ui-abrir", { bubbles: !0, composed: !0 })), setTimeout(() => {
|
|
185
|
-
this._estaAberto && O(this.shadowRoot, this.dialogElement);
|
|
186
|
-
}, 0);
|
|
187
|
-
}
|
|
188
|
-
aoFechar() {
|
|
189
|
-
this._estaAberto = !1, g(this), this.dispatchEvent(new CustomEvent("ui-fechar", { bubbles: !0, composed: !0 }));
|
|
190
|
-
const t = this._elementoGatilho;
|
|
191
|
-
this._elementoGatilho = null;
|
|
192
|
-
const i = document.activeElement, a = !i || i === document.body || i === this || this.contains(i);
|
|
193
|
-
t != null && t.isConnected && a && t.focus();
|
|
194
|
-
}
|
|
195
|
-
syncState() {
|
|
196
|
-
var d, u;
|
|
197
|
-
const t = this.aberto, i = this.getAttribute("titulo") || this.getAttribute("title") || "", a = (d = this.shadowRoot) == null ? void 0 : d.querySelector(".ui-modal__footer");
|
|
198
|
-
this.dialogElement.setAttribute("aria-hidden", String(!t)), T(this, this.dialogElement);
|
|
199
|
-
const l = this.getAttribute("aria-label") || this.getAttribute("rotulo"), s = this.getAttribute("aria-labelledby");
|
|
200
|
-
if (l ? (this.dialogElement.setAttribute("aria-label", l), this.dialogElement.removeAttribute("aria-labelledby")) : s ? (this.dialogElement.setAttribute("aria-labelledby", s), this.dialogElement.removeAttribute("aria-label")) : i ? (this.tituloElement.textContent = i, this.tituloElement.style.display = "block", this.dialogElement.setAttribute("aria-labelledby", this._tituloId), this.dialogElement.removeAttribute("aria-label")) : (this.tituloElement.style.display = "none", this.dialogElement.removeAttribute("aria-labelledby"), this.dialogElement.setAttribute("aria-label", "Diálogo modal")), a) {
|
|
201
|
-
const A = Array.from(((u = this.shadowRoot) == null ? void 0 : u.querySelectorAll('slot[name="rodape"], slot[name="footer"]')) || []).some((k) => k.assignedNodes({ flatten: !0 }).some((h) => h.nodeType === Node.ELEMENT_NODE || h.textContent && h.textContent.trim() !== "")) || this.querySelector('[slot="rodape"], [slot="footer"]') !== null;
|
|
202
|
-
a.style.display = A ? "flex" : "none";
|
|
203
|
-
}
|
|
204
|
-
this.isConnected && t !== this._estaAberto && (t ? this.aoAbrir() : this.aoFechar());
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
class U extends E {
|
|
208
|
-
}
|
|
209
|
-
_("ui-modal", E);
|
|
210
|
-
_("ui-dialog", U);
|
|
211
|
-
export {
|
|
212
|
-
U,
|
|
213
|
-
E as a,
|
|
214
|
-
R as b,
|
|
215
|
-
F as r
|
|
216
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty;var M=(e,o,t)=>o in e?D(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var r=(e,o,t)=>M(e,typeof o!="symbol"?o+"":o,t);const p=require("./ssr-safe-CiHD1adl.cjs"),T=require("./listener-bag-D5omxZ9h.cjs"),_=require("./degrade-CIxvOTUv.cjs"),z=':host{display:block;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}.ui-modal__backdrop{display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:calc(var(--ui-z-modal, 1000) - 1);opacity:0;pointer-events:none;transition:opacity .25s ease}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{display:block;opacity:1;pointer-events:auto}.ui-modal__dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(.95);max-width:560px;width:90%;max-height:85vh;background:var(--ui-degrade-interno, var(--ui-modal-fundo, var(--ui-fundo-card, var(--ui-cor-fundo-card, #18181c))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-borda, 12px);box-shadow:var(--ui-sombra-lg, 0 12px 36px rgba(0, 0, 0, .6));z-index:var(--ui-z-modal, 1000);display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;overflow:hidden;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility 0s linear .2s;box-sizing:border-box;color:var(--ui-cor-texto, #e1e1e6)}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,-50%) scale(1);transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .2s ease,visibility 0s}@starting-style{:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{opacity:0;transform:translate(-50%,-50%) scale(.94)}:host([aberto]) .ui-modal__backdrop,:host([open]) .ui-modal__backdrop{opacity:0}}.ui-modal__handle{display:none;width:36px;height:4px;border-radius:2px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent);margin:6px auto 12px;flex-shrink:0}.ui-modal__header{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);gap:12px}.ui-modal__titulo{font-size:18px;font-weight:600;margin:0;color:var(--ui-cor-texto, #e1e1e6)}.ui-modal__close{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);font-size:16px;cursor:pointer;padding:4px 8px;border-radius:var(--ui-raio-sm, 4px);line-height:1;display:inline-flex;align-items:center;justify-content:center;transition:color .15s ease,background-color .15s ease;touch-action:manipulation;-webkit-tap-highlight-color:transparent}:host([bloquear-fechamento]) .ui-modal__close{display:none}.ui-modal__close svg,.ui-modal__close ::slotted(svg){shape-rendering:geometricPrecision}.ui-modal__close:hover{color:#fff;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.ui-modal__body{padding:20px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:1;box-sizing:border-box}.ui-modal__footer{padding:14px 20px;display:flex;align-items:center;justify-content:flex-end;gap:12px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);background:var(--ui-modal-rodape-fundo, var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15)))}@media (max-width: 640px){.ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}.ui-modal__close{min-width:44px;min-height:44px;font-size:18px}.ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([aberto]) .ui-modal__dialog,:host([open]) .ui-modal__dialog{transform:translateY(0)!important}.ui-modal__handle{display:block!important}}:host([bottom-sheet]) .ui-modal__dialog{top:auto!important;bottom:0!important;left:0!important;transform:translateY(100%)!important;width:100vw!important;max-width:100vw!important;border-radius:var(--ui-raio-xl, 16px) var(--ui-raio-xl, 16px) 0 0!important;max-height:85vh!important;max-height:85dvh!important;border-bottom:none!important;box-shadow:0 -8px 32px #000000b3!important}:host([bottom-sheet]) .ui-modal__close{min-width:44px;min-height:44px;font-size:18px}:host([bottom-sheet]) .ui-modal__footer{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}:host([bottom-sheet][aberto]) .ui-modal__dialog,:host([bottom-sheet][open]) .ui-modal__dialog{transform:translateY(0)!important}:host([bottom-sheet]) .ui-modal__handle{display:block!important}:host(.squarecircle) .ui-modal__painel,:host(.squarecircles) .ui-modal__painel,:host(.ui-squarecircle) .ui-modal__painel,:host(.ui-squarecircles) .ui-modal__painel,:host([formato="squarecircle"]) .ui-modal__painel,:host([formato="squarecircles"]) .ui-modal__painel,:host([formato="squircle"]) .ui-modal__painel{border-radius:var(--ui-raio-xl, 16px)}:host(.degrade),:host(.ui-degrade),:host(.gradiente),:host(.ui-gradiente),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])){--ui-fundo-card: var(--ui-gradiente-card)}';function R(e){return e.tagName==="SCRIPT"||e.tagName==="STYLE"}function y(e){const o=new Set;if(typeof document>"u")return o;const t=a=>{a===e||a.contains(e)||R(a)||a.inert||a.hasAttribute("inert")||(a.setAttribute("inert",""),a.inert=!0,o.add(a))};let i=e;for(;i&&i!==document.body&&i!==document.documentElement;){const a=i.parentElement;if(!a)break;Array.from(a.children).forEach(l=>t(l)),i=a}return document.body&&Array.from(document.body.children).forEach(a=>t(a)),o}function w(e){e.forEach(o=>{o.removeAttribute("inert"),o.inert=!1}),e.clear()}const n=[];let v=new Set,E="";function A(){w(v);const e=n[n.length-1];v=e?y(e):new Set}function F(e){const o=n.indexOf(e);o>=0&&n.splice(o,1),n.length===0&&(E=document.body.style.overflow,document.body.style.overflow="hidden"),n.push(e),A()}function x(e){const o=n.indexOf(e);o<0||(n.splice(o,1),n.length===0&&(document.body.style.overflow=E),A())}function L(e){return n[n.length-1]===e}const m='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), ui-campo-texto, ui-input, ui-botao, ui-botao-primario, ui-checkbox, ui-switch, ui-lista-flutuante, ui-radio, ui-select, ui-segmented';function b(){var o;let e=document.activeElement;for(;(o=e==null?void 0:e.shadowRoot)!=null&&o.activeElement;)e=e.shadowRoot.activeElement;return e}function c(e,o){let t=o;for(;t;){if(t===e)return!0;const i=t.getRootNode();t=t.parentNode??(i instanceof ShadowRoot?i.host:null)}return!1}function k(e){return!e.hasAttribute("disabled")&&e.getAttribute("aria-hidden")!=="true"}function S(e){const o=[];return e.querySelectorAll("slot").forEach(t=>{t.assignedElements({flatten:!0}).forEach(i=>{i instanceof HTMLElement&&(i.matches(m)&&o.push(i),o.push(...Array.from(i.querySelectorAll(m))))})}),o.filter(k)}function N(e){return[...Array.from(e.querySelectorAll(m)).filter(t=>window.getComputedStyle(t).display!=="none"&&k(t)),...S(e)]}function P(e,o){const t=S(e),i=t.filter(a=>a.hasAttribute("autofocus"));for(const a of[...i,...t])if(a.focus(),c(a,b()))return;o.focus()}function O(e,o,t){const i=N(t);if(i.length===0){e.preventDefault();return}const a=i[0],l=i[i.length-1],s=b(),d=!c(o,s),u=c(a,s),g=c(l,s);e.shiftKey?(u||d)&&(e.preventDefault(),l.focus()):(g||d)&&(e.preventDefault(),a.focus())}class f extends p.SafeHTMLElement{constructor(){super();r(this,"backdropElement");r(this,"dialogElement");r(this,"tituloElement");r(this,"closeElement");r(this,"ouvintes",new T.ListenerBag);r(this,"_elementoGatilho",null);r(this,"_tituloId");r(this,"_estaAberto",!1);r(this,"handleSlotChange",()=>{this.syncState()});r(this,"handleBackdropClick",t=>{t.stopPropagation(),this.fechar()});r(this,"handleCloseClick",t=>{t.stopPropagation(),this.fechar()});r(this,"handleKeyDown",t=>{this._estaAberto&&L(this)&&(t.key==="Escape"?(this.fechar(),t.stopImmediatePropagation()):t.key==="Tab"&&O(t,this,this.shadowRoot))});this._tituloId=`ui-modal-title-${Math.random().toString(36).substring(2,9)}`;const t=this.attachShadow({mode:"open"});t.innerHTML=`
|
|
2
|
-
<style>${z}</style>
|
|
3
|
-
<div class="ui-modal__backdrop" part="fundo"></div>
|
|
4
|
-
<div class="ui-modal__dialog" part="painel" role="dialog" aria-modal="true" aria-labelledby="${this._tituloId}" tabindex="-1">
|
|
5
|
-
<div class="ui-modal__handle"></div>
|
|
6
|
-
<div class="ui-modal__header" part="cabecalho">
|
|
7
|
-
<h3 class="ui-modal__titulo" part="titulo" id="${this._tituloId}"></h3>
|
|
8
|
-
<button class="ui-modal__close" part="fechar" type="button" aria-label="Fechar modal" title="Fechar">✕</button>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="ui-modal__body" part="corpo">
|
|
11
|
-
<slot></slot>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="ui-modal__footer" part="rodape">
|
|
14
|
-
<slot name="rodape"></slot>
|
|
15
|
-
<slot name="footer"></slot>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
`,this.backdropElement=t.querySelector(".ui-modal__backdrop"),this.dialogElement=t.querySelector(".ui-modal__dialog"),this.tituloElement=t.querySelector(".ui-modal__titulo"),this.closeElement=t.querySelector(".ui-modal__close")}static get observedAttributes(){return["aberto","open","titulo","title","aria-label","aria-labelledby","rotulo","bottom-sheet","bloquear-fechamento",..._.ATRIBUTOS_DEGRADE]}connectedCallback(){this.ouvintes.cleanup(),this.ouvintes.add(this.backdropElement,"click",this.handleBackdropClick),this.ouvintes.add(this.closeElement,"click",this.handleCloseClick),this.ouvintes.add(window,"keydown",this.handleKeyDown),this.shadowRoot.querySelectorAll("slot").forEach(t=>{this.ouvintes.add(t,"slotchange",this.handleSlotChange)}),this.syncState()}disconnectedCallback(){this.ouvintes.cleanup(),this._estaAberto&&(this._estaAberto=!1,x(this))}attributeChangedCallback(t,i,a){this.syncState()}get aberto(){return this.hasAttribute("aberto")||this.hasAttribute("open")}set aberto(t){t?this.setAttribute("aberto",""):(this.removeAttribute("aberto"),this.removeAttribute("open"))}abrir(){this.aberto=!0}fechar(){this.hasAttribute("bloquear-fechamento")||(this.aberto=!1)}aoAbrir(){this._estaAberto=!0;const t=b();this._elementoGatilho=t&&t!==document.body&&!this.contains(t)?t:null,F(this),this.dispatchEvent(new CustomEvent("ui-abrir",{bubbles:!0,composed:!0})),setTimeout(()=>{this._estaAberto&&P(this.shadowRoot,this.dialogElement)},0)}aoFechar(){this._estaAberto=!1,x(this),this.dispatchEvent(new CustomEvent("ui-fechar",{bubbles:!0,composed:!0}));const t=this._elementoGatilho;this._elementoGatilho=null;const i=document.activeElement,a=!i||i===document.body||i===this||this.contains(i);t!=null&&t.isConnected&&a&&t.focus()}syncState(){var d,u;const t=this.aberto,i=this.getAttribute("titulo")||this.getAttribute("title")||"",a=(d=this.shadowRoot)==null?void 0:d.querySelector(".ui-modal__footer");this.dialogElement.setAttribute("aria-hidden",String(!t)),_.aplicarDegradeNoElemento(this,this.dialogElement);const l=this.getAttribute("aria-label")||this.getAttribute("rotulo"),s=this.getAttribute("aria-labelledby");if(l?(this.dialogElement.setAttribute("aria-label",l),this.dialogElement.removeAttribute("aria-labelledby")):s?(this.dialogElement.setAttribute("aria-labelledby",s),this.dialogElement.removeAttribute("aria-label")):i?(this.tituloElement.textContent=i,this.tituloElement.style.display="block",this.dialogElement.setAttribute("aria-labelledby",this._tituloId),this.dialogElement.removeAttribute("aria-label")):(this.tituloElement.style.display="none",this.dialogElement.removeAttribute("aria-labelledby"),this.dialogElement.setAttribute("aria-label","Diálogo modal")),a){const q=Array.from(((u=this.shadowRoot)==null?void 0:u.querySelectorAll('slot[name="rodape"], slot[name="footer"]'))||[]).some(I=>I.assignedNodes({flatten:!0}).some(h=>h.nodeType===Node.ELEMENT_NODE||h.textContent&&h.textContent.trim()!==""))||this.querySelector('[slot="rodape"], [slot="footer"]')!==null;a.style.display=q?"flex":"none"}this.isConnected&&t!==this._estaAberto&&(t?this.aoAbrir():this.aoFechar())}}class C extends f{}p.definirCustomElement("ui-modal",f);p.definirCustomElement("ui-dialog",C);exports.UIDialog=C;exports.UIModal=f;exports.aplicarInertForaDoModal=y;exports.removerInertForaDoModal=w;
|