1110 lines
36 KiB
JavaScript
1110 lines
36 KiB
JavaScript
import { defineComponent as R, createBlock as H, openBlock as k, mergeProps as F, withCtx as D, renderSlot as W, computed as E, ref as C, createElementBlock as G, createCommentVNode as pe, createSlots as ke, createVNode as $, createTextVNode as Q, toDisplayString as $e, Fragment as de, renderList as fe, resolveComponent as te, createElementVNode as ae } from "vue";
|
|
import { VBtn as Ee } from "vuetify/components/VBtn";
|
|
import { VBadge as Ce } from "vuetify/components/VBadge";
|
|
import { VCheckbox as Ie } from "vuetify/components/VCheckbox";
|
|
import { VIcon as Oe } from "vuetify/components/VIcon";
|
|
import { VRadio as Te } from "vuetify/components/VRadio";
|
|
import { VRadioGroup as Ue } from "vuetify/components/VRadioGroup";
|
|
import { VSelect as Ye } from "vuetify/components/VSelect";
|
|
import { VTextField as ye } from "vuetify/components/VTextField";
|
|
import { VTextarea as He } from "vuetify/components/VTextarea";
|
|
import { VCard as ve, VCardTitle as ge, VCardText as he, VCardActions as be } from "vuetify/components/VCard";
|
|
import { VContainer as Ae } from "vuetify/components/VGrid";
|
|
const Pe = R({
|
|
name: "EliBotao",
|
|
inheritAttrs: !1,
|
|
props: {
|
|
color: {
|
|
type: String,
|
|
default: "primary"
|
|
},
|
|
variant: {
|
|
type: String,
|
|
default: "elevated"
|
|
},
|
|
size: {
|
|
type: String,
|
|
default: "default"
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
default: !1
|
|
},
|
|
loading: {
|
|
type: Boolean,
|
|
default: !1
|
|
}
|
|
}
|
|
}), J = (e, t) => {
|
|
const c = e.__vccOpts || e;
|
|
for (const [y, v] of t)
|
|
c[y] = v;
|
|
return c;
|
|
};
|
|
function je(e, t, c, y, v, w) {
|
|
return k(), H(Ee, F({
|
|
color: e.color,
|
|
variant: e.variant,
|
|
size: e.size,
|
|
disabled: e.disabled,
|
|
loading: e.loading
|
|
}, e.$attrs, { class: "text-none pt-1" }), {
|
|
default: D(() => [
|
|
W(e.$slots, "default")
|
|
]),
|
|
_: 3
|
|
}, 16, ["color", "variant", "size", "disabled", "loading"]);
|
|
}
|
|
const Ve = /* @__PURE__ */ J(Pe, [["render", je]]), me = {
|
|
suave: "4px",
|
|
pill: "10px"
|
|
}, Ne = R({
|
|
name: "EliBadge",
|
|
inheritAttrs: !1,
|
|
props: {
|
|
color: {
|
|
type: String,
|
|
default: "primary"
|
|
},
|
|
location: {
|
|
type: String,
|
|
default: "top right"
|
|
},
|
|
offsetX: {
|
|
type: String,
|
|
default: "0"
|
|
},
|
|
offsetY: {
|
|
type: String,
|
|
default: "0"
|
|
},
|
|
dot: {
|
|
type: Boolean,
|
|
default: !1
|
|
},
|
|
visible: {
|
|
type: Boolean,
|
|
default: !0
|
|
},
|
|
badge: {
|
|
type: [String, Number],
|
|
default: void 0
|
|
},
|
|
/** 🔥 NOVO: controla só o radius */
|
|
radius: {
|
|
type: String,
|
|
default: "suave"
|
|
}
|
|
},
|
|
setup(e) {
|
|
const t = E(() => e.radius in me ? me[e.radius] : e.radius), c = E(() => e.dot || e.badge !== void 0 ? e.visible : !1), y = E(() => ({
|
|
"--eli-badge-radius": t.value
|
|
}));
|
|
return { showBadge: c, badgeStyle: y };
|
|
}
|
|
});
|
|
function Fe(e, t, c, y, v, w) {
|
|
return e.showBadge ? (k(), H(Ce, F({
|
|
key: 0,
|
|
color: e.color
|
|
}, e.$attrs, {
|
|
location: e.location,
|
|
"offset-x": e.offsetX,
|
|
"offset-y": e.offsetY,
|
|
dot: e.dot,
|
|
content: e.badge,
|
|
style: e.badgeStyle
|
|
}), {
|
|
default: D(() => [
|
|
W(e.$slots, "default", {}, void 0, !0)
|
|
]),
|
|
_: 3
|
|
}, 16, ["color", "location", "offset-x", "offset-y", "dot", "content", "style"])) : W(e.$slots, "default", { key: 1 }, void 0, !0);
|
|
}
|
|
const le = /* @__PURE__ */ J(Ne, [["render", Fe], ["__scopeId", "data-v-de2fbf2f"]]);
|
|
function Le(e) {
|
|
return e.replace(/\D+/g, "");
|
|
}
|
|
function ze(e) {
|
|
const t = Le(e);
|
|
return t.length <= 11 ? t.replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d)/, "$1.$2").replace(/(\d{3})(\d{1,2})$/, "$1-$2").slice(0, 14) : t.replace(/^(\d{2})(\d)/, "$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3").replace(/\.(\d{3})(\d)/, ".$1/$2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 18);
|
|
}
|
|
function We(e) {
|
|
return e.replace(/\D+/g, "");
|
|
}
|
|
function Re(e) {
|
|
const t = We(e);
|
|
return t ? t.length <= 10 ? t.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{4})(\d)/, "$1-$2").slice(0, 14) : t.replace(/^(\d{2})(\d)/, "($1) $2").replace(/(\d{5})(\d)/, "$1-$2").slice(0, 15) : "";
|
|
}
|
|
function se(e) {
|
|
return e.replace(/\D+/g, "");
|
|
}
|
|
function Je(e) {
|
|
const t = e.replace(/[^\d,]/g, ""), c = t.split(",");
|
|
return c.length > 2 ? c[0] + "," + c.slice(1).join("") : t;
|
|
}
|
|
function qe(e) {
|
|
const t = se(e);
|
|
return t ? (parseInt(t, 10) / 100).toFixed(2).replace(".", ",").replace(/\B(?=(\d{3})+(?!\d))/g, ".") : "";
|
|
}
|
|
function Ze(e) {
|
|
const t = se(e).slice(0, 8);
|
|
return t.length <= 5 ? t : t.replace(/^(\d{5})(\d{1,3})$/, "$1-$2");
|
|
}
|
|
const Xe = R({
|
|
name: "EliInput",
|
|
inheritAttrs: !1,
|
|
props: {
|
|
/**
|
|
* Aceita valor simples (text-like) ou lista de valores (checkbox/select multiple).
|
|
* O componente não converte tipos automaticamente: mantém o que receber.
|
|
*/
|
|
modelValue: {
|
|
type: [String, Number, Boolean, Array],
|
|
default: ""
|
|
},
|
|
type: { type: String, default: "text" },
|
|
label: String,
|
|
placeholder: String,
|
|
disabled: Boolean,
|
|
error: Boolean,
|
|
errorMessages: {
|
|
type: [String, Array],
|
|
default: () => []
|
|
},
|
|
hint: String,
|
|
persistentHint: Boolean,
|
|
rows: { type: Number, default: 4 },
|
|
/**
|
|
* Para select/radio/checkbox.
|
|
* Aceita lista já normalizada ({ label, value }) ou valores primitivos.
|
|
*/
|
|
options: {
|
|
type: Array,
|
|
default: () => []
|
|
},
|
|
clearable: Boolean,
|
|
variant: { type: String, default: "outlined" },
|
|
density: { type: String, default: "comfortable" },
|
|
color: { type: String, default: "primary" },
|
|
row: Boolean,
|
|
showPasswordToggle: Boolean,
|
|
multiple: Boolean,
|
|
chips: Boolean
|
|
},
|
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
setup(e, { emit: t, attrs: c }) {
|
|
const y = C(!1), v = C(!1), w = E({
|
|
get: () => e.modelValue,
|
|
set: (g) => {
|
|
t("update:modelValue", g), t("change", g);
|
|
}
|
|
}), d = E(
|
|
() => [
|
|
"text",
|
|
"password",
|
|
"email",
|
|
"search",
|
|
"url",
|
|
"telefone",
|
|
"cpfCnpj",
|
|
"numericoInteiro",
|
|
"numericoDecimal",
|
|
"numericoMoeda",
|
|
"cep"
|
|
].includes(e.type)
|
|
), f = E(
|
|
() => e.type === "password" ? v.value ? "text" : "password" : "text"
|
|
), I = E(() => {
|
|
if (e.type === "telefone") return "tel";
|
|
if (e.type.startsWith("numerico")) return "numeric";
|
|
}), l = E(
|
|
() => e.error ? "error" : y.value ? e.color : void 0
|
|
);
|
|
function Y(g) {
|
|
const T = g.target;
|
|
let h = T.value;
|
|
switch (e.type) {
|
|
case "numericoInteiro":
|
|
h = se(h);
|
|
break;
|
|
case "numericoDecimal":
|
|
h = Je(h);
|
|
break;
|
|
case "numericoMoeda":
|
|
h = qe(h);
|
|
break;
|
|
case "telefone":
|
|
h = Re(h);
|
|
break;
|
|
case "cpfCnpj":
|
|
h = ze(h);
|
|
break;
|
|
case "cep":
|
|
h = Ze(h);
|
|
break;
|
|
}
|
|
T.value = h, t("update:modelValue", h), t("change", h);
|
|
}
|
|
function V() {
|
|
v.value = !v.value;
|
|
}
|
|
const L = E(() => (e.options || []).map((g) => {
|
|
if (g && typeof g == "object" && "value" in g) {
|
|
const h = g.value;
|
|
return {
|
|
label: g.label ?? String(h),
|
|
value: h,
|
|
disabled: g.disabled
|
|
};
|
|
}
|
|
const T = g;
|
|
return { label: String(T), value: T };
|
|
}));
|
|
return {
|
|
attrs: c,
|
|
value: w,
|
|
isTextLike: d,
|
|
inputHtmlType: f,
|
|
inputMode: I,
|
|
internalColor: l,
|
|
showPassword: v,
|
|
togglePassword: V,
|
|
onInput: Y,
|
|
onFocus: () => t("focus"),
|
|
onBlur: () => t("blur"),
|
|
computedItems: L
|
|
};
|
|
}
|
|
}), Ge = { class: "eli-input" }, Qe = {
|
|
key: 4,
|
|
class: "checkbox-group"
|
|
};
|
|
function Ke(e, t, c, y, v, w) {
|
|
return k(), G("div", Ge, [
|
|
e.isTextLike ? (k(), H(ye, F({
|
|
key: 0,
|
|
modelValue: e.value,
|
|
"onUpdate:modelValue": t[0] || (t[0] = (d) => e.value = d),
|
|
type: e.inputHtmlType,
|
|
label: e.label,
|
|
placeholder: e.placeholder,
|
|
disabled: e.disabled,
|
|
clearable: e.clearable && e.type !== "password",
|
|
error: e.error,
|
|
"error-messages": e.errorMessages,
|
|
hint: e.hint,
|
|
"persistent-hint": e.persistentHint,
|
|
density: e.density,
|
|
variant: e.variant,
|
|
color: e.internalColor,
|
|
inputmode: e.inputMode
|
|
}, e.attrs, {
|
|
onFocus: e.onFocus,
|
|
onBlur: e.onBlur,
|
|
onInput: e.onInput
|
|
}), ke({ _: 2 }, [
|
|
e.type === "password" && e.showPasswordToggle ? {
|
|
name: "append-inner",
|
|
fn: D(() => [
|
|
$(Oe, {
|
|
class: "cursor-pointer",
|
|
onClick: e.togglePassword
|
|
}, {
|
|
default: D(() => [
|
|
Q($e(e.showPassword ? "mdi-eye-off" : "mdi-eye"), 1)
|
|
]),
|
|
_: 1
|
|
}, 8, ["onClick"])
|
|
]),
|
|
key: "0"
|
|
} : void 0
|
|
]), 1040, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "color", "inputmode", "onFocus", "onBlur", "onInput"])) : e.type === "textarea" ? (k(), H(He, F({
|
|
key: 1,
|
|
modelValue: e.value,
|
|
"onUpdate:modelValue": t[1] || (t[1] = (d) => e.value = d),
|
|
label: e.label,
|
|
rows: e.rows,
|
|
density: e.density,
|
|
variant: e.variant
|
|
}, e.attrs), null, 16, ["modelValue", "label", "rows", "density", "variant"])) : e.type === "select" ? (k(), H(Ye, F({
|
|
key: 2,
|
|
modelValue: e.value,
|
|
"onUpdate:modelValue": t[2] || (t[2] = (d) => e.value = d),
|
|
items: e.computedItems,
|
|
label: e.label,
|
|
placeholder: e.placeholder,
|
|
multiple: e.multiple,
|
|
chips: e.chips,
|
|
clearable: e.clearable,
|
|
disabled: e.disabled,
|
|
density: e.density,
|
|
variant: e.variant,
|
|
"item-title": "label",
|
|
"item-value": "value",
|
|
error: e.error,
|
|
"error-messages": e.errorMessages
|
|
}, e.attrs, {
|
|
onFocus: e.onFocus,
|
|
onBlur: e.onBlur
|
|
}), null, 16, ["modelValue", "items", "label", "placeholder", "multiple", "chips", "clearable", "disabled", "density", "variant", "error", "error-messages", "onFocus", "onBlur"])) : e.type === "radio" ? (k(), H(Ue, {
|
|
key: 3,
|
|
modelValue: e.value,
|
|
"onUpdate:modelValue": t[3] || (t[3] = (d) => e.value = d),
|
|
row: e.row
|
|
}, {
|
|
default: D(() => [
|
|
(k(!0), G(de, null, fe(e.computedItems, (d) => (k(), H(Te, {
|
|
key: String(d.value),
|
|
label: d.label,
|
|
value: d.value
|
|
}, null, 8, ["label", "value"]))), 128))
|
|
]),
|
|
_: 1
|
|
}, 8, ["modelValue", "row"])) : e.type === "checkbox" ? (k(), G("div", Qe, [
|
|
(k(!0), G(de, null, fe(e.computedItems, (d) => (k(), H(Ie, {
|
|
key: String(d.value),
|
|
modelValue: e.value,
|
|
"onUpdate:modelValue": t[4] || (t[4] = (f) => e.value = f),
|
|
label: d.label,
|
|
value: d.value,
|
|
density: e.density
|
|
}, null, 8, ["modelValue", "label", "value", "density"]))), 128))
|
|
])) : pe("", !0)
|
|
]);
|
|
}
|
|
const Se = /* @__PURE__ */ J(Xe, [["render", Ke], ["__scopeId", "data-v-2f57f5c8"]]), _e = R({
|
|
name: "EliOlaMundo",
|
|
components: {
|
|
EliBotao: Ve,
|
|
EliBadge: le,
|
|
EliInput: Se
|
|
},
|
|
setup() {
|
|
const e = C(""), t = C([]), c = C(""), y = C(""), v = C(""), w = C(""), d = C(""), f = C(""), I = C(""), l = C(""), Y = C(""), V = C(null), L = C([]);
|
|
return {
|
|
nome: e,
|
|
email: f,
|
|
documento: Y,
|
|
estado: t,
|
|
telefone: y,
|
|
mensagem: I,
|
|
senha: l,
|
|
cor: V,
|
|
habilidades: L,
|
|
idade: v,
|
|
altura: w,
|
|
cep: c,
|
|
valor: d
|
|
};
|
|
}
|
|
}), xe = { class: "grid-example" };
|
|
function et(e, t, c, y, v, w) {
|
|
const d = te("EliBadge"), f = te("EliInput"), I = te("EliBotao");
|
|
return k(), H(Ae, null, {
|
|
default: D(() => [
|
|
$(ve, {
|
|
class: "mx-auto",
|
|
max_width: "400"
|
|
}, {
|
|
default: D(() => [
|
|
$(ge, null, {
|
|
default: D(() => [
|
|
$(d, {
|
|
badge: "Novo",
|
|
"offset-x": "-15",
|
|
location: "right center"
|
|
}, {
|
|
default: D(() => [...t[14] || (t[14] = [
|
|
Q(" Olá Mundo! ", -1)
|
|
])]),
|
|
_: 1
|
|
})
|
|
]),
|
|
_: 1
|
|
}),
|
|
$(he, null, {
|
|
default: D(() => [
|
|
t[15] || (t[15] = Q(" Este é um componente de exemplo integrado com Vuetify. ", -1)),
|
|
ae("div", xe, [
|
|
$(f, {
|
|
modelValue: e.nome,
|
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.nome = l),
|
|
label: "Nome",
|
|
placeholder: "Digite o nome",
|
|
density: "compact"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.idade,
|
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => e.idade = l),
|
|
type: "numericoInteiro",
|
|
label: "Idade",
|
|
density: "default"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.altura,
|
|
"onUpdate:modelValue": t[2] || (t[2] = (l) => e.altura = l),
|
|
type: "numericoDecimal",
|
|
label: "Altura",
|
|
density: "comfortable"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.valor,
|
|
"onUpdate:modelValue": t[3] || (t[3] = (l) => e.valor = l),
|
|
type: "numericoMoeda",
|
|
label: "Valor"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.telefone,
|
|
"onUpdate:modelValue": t[4] || (t[4] = (l) => e.telefone = l),
|
|
type: "telefone",
|
|
label: "Telefone"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.cep,
|
|
"onUpdate:modelValue": t[5] || (t[5] = (l) => e.cep = l),
|
|
type: "cep",
|
|
label: "CEP",
|
|
placeholder: "00000-000"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
type: "select",
|
|
label: "Estado",
|
|
options: [
|
|
{ label: "São Paulo", value: "SP" },
|
|
{ label: "Rio de Janeiro", value: "RJ" }
|
|
],
|
|
modelValue: e.estado,
|
|
"onUpdate:modelValue": t[6] || (t[6] = (l) => e.estado = l),
|
|
multiple: ""
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.documento,
|
|
"onUpdate:modelValue": t[7] || (t[7] = (l) => e.documento = l),
|
|
type: "cpfCnpj",
|
|
label: "CPF / CNPJ"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.email,
|
|
"onUpdate:modelValue": t[8] || (t[8] = (l) => e.email = l),
|
|
label: "Email",
|
|
placeholder: "email@exemplo.com"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.senha,
|
|
"onUpdate:modelValue": t[9] || (t[9] = (l) => e.senha = l),
|
|
label: "Senha",
|
|
type: "password",
|
|
showPasswordToggle: !0,
|
|
placeholder: "Digite sua senha"
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
type: "textarea",
|
|
modelValue: e.mensagem,
|
|
"onUpdate:modelValue": t[10] || (t[10] = (l) => e.mensagem = l),
|
|
label: "Mensagem",
|
|
rows: 5
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
type: "radio",
|
|
modelValue: e.cor,
|
|
"onUpdate:modelValue": t[11] || (t[11] = (l) => e.cor = l),
|
|
label: "Cor favorita",
|
|
options: [
|
|
{ label: "Azul", value: "azul" },
|
|
{ label: "Verde", value: "verde" }
|
|
]
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
type: "checkbox",
|
|
modelValue: e.habilidades,
|
|
"onUpdate:modelValue": t[12] || (t[12] = (l) => e.habilidades = l),
|
|
options: [
|
|
{ label: "Vue", value: "vue" },
|
|
{ label: "React", value: "react" }
|
|
]
|
|
}, null, 8, ["modelValue"]),
|
|
$(f, {
|
|
modelValue: e.nome,
|
|
"onUpdate:modelValue": t[13] || (t[13] = (l) => e.nome = l),
|
|
label: "Nome",
|
|
error: !0,
|
|
"error-messages": ["Obrigatório"]
|
|
}, null, 8, ["modelValue"])
|
|
])
|
|
]),
|
|
_: 1
|
|
}),
|
|
$(be, null, {
|
|
default: D(() => [
|
|
$(I, {
|
|
color: "primary",
|
|
variant: "elevated",
|
|
block: ""
|
|
}, {
|
|
default: D(() => [...t[16] || (t[16] = [
|
|
Q(" Botão Vuetify ", -1)
|
|
])]),
|
|
_: 1
|
|
})
|
|
]),
|
|
_: 1
|
|
})
|
|
]),
|
|
_: 1
|
|
})
|
|
]),
|
|
_: 1
|
|
});
|
|
}
|
|
const tt = /* @__PURE__ */ J(_e, [["render", et]]), at = R({
|
|
name: "EliCartao",
|
|
components: { EliBadge: le },
|
|
inheritAttrs: !1,
|
|
props: {
|
|
/** Título de fallback caso o slot `titulo` não seja usado. */
|
|
titulo: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
/**
|
|
* Status semântico do cartão.
|
|
* Usado para cor/label e para permitir filtros por status.
|
|
*/
|
|
status: {
|
|
type: String,
|
|
required: !0
|
|
},
|
|
/** Variante visual do v-card (Vuetify). */
|
|
variant: {
|
|
type: String,
|
|
default: "outlined"
|
|
}
|
|
},
|
|
emits: {
|
|
/** Emit opcional para padronizar clique no cartão. */
|
|
clicar: (e) => !0
|
|
},
|
|
setup(e, { emit: t }) {
|
|
const c = E(() => e.status), y = E(() => {
|
|
switch (e.status) {
|
|
case "novo":
|
|
return "primary";
|
|
case "rascunho":
|
|
return "secondary";
|
|
case "vendido":
|
|
return "success";
|
|
case "cancelado":
|
|
return "error";
|
|
}
|
|
}), v = E(() => `eli-cartao--${e.status}`);
|
|
function w() {
|
|
t("clicar", e.status);
|
|
}
|
|
return {
|
|
rotuloStatus: c,
|
|
corStatus: y,
|
|
classeStatus: v,
|
|
onClick: w
|
|
};
|
|
}
|
|
}), rt = { class: "eli-cartao__titulo-texto" }, nt = { class: "eli-cartao__status" };
|
|
function ot(e, t, c, y, v, w) {
|
|
const d = te("EliBadge");
|
|
return k(), H(ve, F({
|
|
class: ["eli-cartao", e.classeStatus],
|
|
variant: e.variant
|
|
}, e.$attrs), {
|
|
default: D(() => [
|
|
$(ge, { class: "eli-cartao__titulo" }, {
|
|
default: D(() => [
|
|
ae("div", rt, [
|
|
W(e.$slots, "titulo", {}, () => [
|
|
Q($e(e.titulo), 1)
|
|
], !0)
|
|
]),
|
|
ae("div", nt, [
|
|
$(d, {
|
|
badge: e.rotuloStatus,
|
|
radius: "pill",
|
|
color: e.corStatus
|
|
}, {
|
|
default: D(() => [...t[0] || (t[0] = [
|
|
ae("span", null, null, -1)
|
|
])]),
|
|
_: 1
|
|
}, 8, ["badge", "color"])
|
|
])
|
|
]),
|
|
_: 3
|
|
}),
|
|
$(he, { class: "eli-cartao__conteudo" }, {
|
|
default: D(() => [
|
|
W(e.$slots, "default", {}, void 0, !0)
|
|
]),
|
|
_: 3
|
|
}),
|
|
e.$slots.acoes ? (k(), H(be, {
|
|
key: 0,
|
|
class: "eli-cartao__acoes"
|
|
}, {
|
|
default: D(() => [
|
|
W(e.$slots, "acoes", {}, void 0, !0)
|
|
]),
|
|
_: 3
|
|
})) : pe("", !0)
|
|
]),
|
|
_: 3
|
|
}, 16, ["variant", "class"]);
|
|
}
|
|
const lt = /* @__PURE__ */ J(at, [["render", ot], ["__scopeId", "data-v-6c492bd9"]]);
|
|
function st(e) {
|
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
}
|
|
var re = { exports: {} }, it = re.exports, ce;
|
|
function ut() {
|
|
return ce || (ce = 1, (function(e, t) {
|
|
(function(c, y) {
|
|
e.exports = y();
|
|
})(it, (function() {
|
|
var c = 1e3, y = 6e4, v = 36e5, w = "millisecond", d = "second", f = "minute", I = "hour", l = "day", Y = "week", V = "month", L = "quarter", g = "year", T = "date", h = "Invalid Date", Me = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, we = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, De = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
|
|
var n = ["th", "st", "nd", "rd"], a = s % 100;
|
|
return "[" + s + (n[(a - 20) % 10] || n[a] || n[0]) + "]";
|
|
} }, ne = function(s, n, a) {
|
|
var o = String(s);
|
|
return !o || o.length >= n ? s : "" + Array(n + 1 - o.length).join(a) + s;
|
|
}, Be = { s: ne, z: function(s) {
|
|
var n = -s.utcOffset(), a = Math.abs(n), o = Math.floor(a / 60), r = a % 60;
|
|
return (n <= 0 ? "+" : "-") + ne(o, 2, "0") + ":" + ne(r, 2, "0");
|
|
}, m: function s(n, a) {
|
|
if (n.date() < a.date()) return -s(a, n);
|
|
var o = 12 * (a.year() - n.year()) + (a.month() - n.month()), r = n.clone().add(o, V), i = a - r < 0, u = n.clone().add(o + (i ? -1 : 1), V);
|
|
return +(-(o + (a - r) / (i ? r - u : u - r)) || 0);
|
|
}, a: function(s) {
|
|
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
}, p: function(s) {
|
|
return { M: V, y: g, w: Y, d: l, D: T, h: I, m: f, s: d, ms: w, Q: L }[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
}, u: function(s) {
|
|
return s === void 0;
|
|
} }, q = "en", P = {};
|
|
P[q] = De;
|
|
var ie = "$isDayjsObject", oe = function(s) {
|
|
return s instanceof _ || !(!s || !s[ie]);
|
|
}, K = function s(n, a, o) {
|
|
var r;
|
|
if (!n) return q;
|
|
if (typeof n == "string") {
|
|
var i = n.toLowerCase();
|
|
P[i] && (r = i), a && (P[i] = a, r = i);
|
|
var u = n.split("-");
|
|
if (!r && u.length > 1) return s(u[0]);
|
|
} else {
|
|
var p = n.name;
|
|
P[p] = n, r = p;
|
|
}
|
|
return !o && r && (q = r), r || !o && q;
|
|
}, S = function(s, n) {
|
|
if (oe(s)) return s.clone();
|
|
var a = typeof n == "object" ? n : {};
|
|
return a.date = s, a.args = arguments, new _(a);
|
|
}, m = Be;
|
|
m.l = K, m.i = oe, m.w = function(s, n) {
|
|
return S(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
|
};
|
|
var _ = (function() {
|
|
function s(a) {
|
|
this.$L = K(a.locale, null, !0), this.parse(a), this.$x = this.$x || a.x || {}, this[ie] = !0;
|
|
}
|
|
var n = s.prototype;
|
|
return n.parse = function(a) {
|
|
this.$d = (function(o) {
|
|
var r = o.date, i = o.utc;
|
|
if (r === null) return /* @__PURE__ */ new Date(NaN);
|
|
if (m.u(r)) return /* @__PURE__ */ new Date();
|
|
if (r instanceof Date) return new Date(r);
|
|
if (typeof r == "string" && !/Z$/i.test(r)) {
|
|
var u = r.match(Me);
|
|
if (u) {
|
|
var p = u[2] - 1 || 0, b = (u[7] || "0").substring(0, 3);
|
|
return i ? new Date(Date.UTC(u[1], p, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, b)) : new Date(u[1], p, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, b);
|
|
}
|
|
}
|
|
return new Date(r);
|
|
})(a), this.init();
|
|
}, n.init = function() {
|
|
var a = this.$d;
|
|
this.$y = a.getFullYear(), this.$M = a.getMonth(), this.$D = a.getDate(), this.$W = a.getDay(), this.$H = a.getHours(), this.$m = a.getMinutes(), this.$s = a.getSeconds(), this.$ms = a.getMilliseconds();
|
|
}, n.$utils = function() {
|
|
return m;
|
|
}, n.isValid = function() {
|
|
return this.$d.toString() !== h;
|
|
}, n.isSame = function(a, o) {
|
|
var r = S(a);
|
|
return this.startOf(o) <= r && r <= this.endOf(o);
|
|
}, n.isAfter = function(a, o) {
|
|
return S(a) < this.startOf(o);
|
|
}, n.isBefore = function(a, o) {
|
|
return this.endOf(o) < S(a);
|
|
}, n.$g = function(a, o, r) {
|
|
return m.u(a) ? this[o] : this.set(r, a);
|
|
}, n.unix = function() {
|
|
return Math.floor(this.valueOf() / 1e3);
|
|
}, n.valueOf = function() {
|
|
return this.$d.getTime();
|
|
}, n.startOf = function(a, o) {
|
|
var r = this, i = !!m.u(o) || o, u = m.p(a), p = function(N, O) {
|
|
var A = m.w(r.$u ? Date.UTC(r.$y, O, N) : new Date(r.$y, O, N), r);
|
|
return i ? A : A.endOf(l);
|
|
}, b = function(N, O) {
|
|
return m.w(r.toDate()[N].apply(r.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), r);
|
|
}, M = this.$W, B = this.$M, U = this.$D, z = "set" + (this.$u ? "UTC" : "");
|
|
switch (u) {
|
|
case g:
|
|
return i ? p(1, 0) : p(31, 11);
|
|
case V:
|
|
return i ? p(1, B) : p(0, B + 1);
|
|
case Y:
|
|
var j = this.$locale().weekStart || 0, Z = (M < j ? M + 7 : M) - j;
|
|
return p(i ? U - Z : U + (6 - Z), B);
|
|
case l:
|
|
case T:
|
|
return b(z + "Hours", 0);
|
|
case I:
|
|
return b(z + "Minutes", 1);
|
|
case f:
|
|
return b(z + "Seconds", 2);
|
|
case d:
|
|
return b(z + "Milliseconds", 3);
|
|
default:
|
|
return this.clone();
|
|
}
|
|
}, n.endOf = function(a) {
|
|
return this.startOf(a, !1);
|
|
}, n.$set = function(a, o) {
|
|
var r, i = m.p(a), u = "set" + (this.$u ? "UTC" : ""), p = (r = {}, r[l] = u + "Date", r[T] = u + "Date", r[V] = u + "Month", r[g] = u + "FullYear", r[I] = u + "Hours", r[f] = u + "Minutes", r[d] = u + "Seconds", r[w] = u + "Milliseconds", r)[i], b = i === l ? this.$D + (o - this.$W) : o;
|
|
if (i === V || i === g) {
|
|
var M = this.clone().set(T, 1);
|
|
M.$d[p](b), M.init(), this.$d = M.set(T, Math.min(this.$D, M.daysInMonth())).$d;
|
|
} else p && this.$d[p](b);
|
|
return this.init(), this;
|
|
}, n.set = function(a, o) {
|
|
return this.clone().$set(a, o);
|
|
}, n.get = function(a) {
|
|
return this[m.p(a)]();
|
|
}, n.add = function(a, o) {
|
|
var r, i = this;
|
|
a = Number(a);
|
|
var u = m.p(o), p = function(B) {
|
|
var U = S(i);
|
|
return m.w(U.date(U.date() + Math.round(B * a)), i);
|
|
};
|
|
if (u === V) return this.set(V, this.$M + a);
|
|
if (u === g) return this.set(g, this.$y + a);
|
|
if (u === l) return p(1);
|
|
if (u === Y) return p(7);
|
|
var b = (r = {}, r[f] = y, r[I] = v, r[d] = c, r)[u] || 1, M = this.$d.getTime() + a * b;
|
|
return m.w(M, this);
|
|
}, n.subtract = function(a, o) {
|
|
return this.add(-1 * a, o);
|
|
}, n.format = function(a) {
|
|
var o = this, r = this.$locale();
|
|
if (!this.isValid()) return r.invalidDate || h;
|
|
var i = a || "YYYY-MM-DDTHH:mm:ssZ", u = m.z(this), p = this.$H, b = this.$m, M = this.$M, B = r.weekdays, U = r.months, z = r.meridiem, j = function(O, A, X, x) {
|
|
return O && (O[A] || O(o, i)) || X[A].slice(0, x);
|
|
}, Z = function(O) {
|
|
return m.s(p % 12 || 12, O, "0");
|
|
}, N = z || function(O, A, X) {
|
|
var x = O < 12 ? "AM" : "PM";
|
|
return X ? x.toLowerCase() : x;
|
|
};
|
|
return i.replace(we, (function(O, A) {
|
|
return A || (function(X) {
|
|
switch (X) {
|
|
case "YY":
|
|
return String(o.$y).slice(-2);
|
|
case "YYYY":
|
|
return m.s(o.$y, 4, "0");
|
|
case "M":
|
|
return M + 1;
|
|
case "MM":
|
|
return m.s(M + 1, 2, "0");
|
|
case "MMM":
|
|
return j(r.monthsShort, M, U, 3);
|
|
case "MMMM":
|
|
return j(U, M);
|
|
case "D":
|
|
return o.$D;
|
|
case "DD":
|
|
return m.s(o.$D, 2, "0");
|
|
case "d":
|
|
return String(o.$W);
|
|
case "dd":
|
|
return j(r.weekdaysMin, o.$W, B, 2);
|
|
case "ddd":
|
|
return j(r.weekdaysShort, o.$W, B, 3);
|
|
case "dddd":
|
|
return B[o.$W];
|
|
case "H":
|
|
return String(p);
|
|
case "HH":
|
|
return m.s(p, 2, "0");
|
|
case "h":
|
|
return Z(1);
|
|
case "hh":
|
|
return Z(2);
|
|
case "a":
|
|
return N(p, b, !0);
|
|
case "A":
|
|
return N(p, b, !1);
|
|
case "m":
|
|
return String(b);
|
|
case "mm":
|
|
return m.s(b, 2, "0");
|
|
case "s":
|
|
return String(o.$s);
|
|
case "ss":
|
|
return m.s(o.$s, 2, "0");
|
|
case "SSS":
|
|
return m.s(o.$ms, 3, "0");
|
|
case "Z":
|
|
return u;
|
|
}
|
|
return null;
|
|
})(O) || u.replace(":", "");
|
|
}));
|
|
}, n.utcOffset = function() {
|
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
}, n.diff = function(a, o, r) {
|
|
var i, u = this, p = m.p(o), b = S(a), M = (b.utcOffset() - this.utcOffset()) * y, B = this - b, U = function() {
|
|
return m.m(u, b);
|
|
};
|
|
switch (p) {
|
|
case g:
|
|
i = U() / 12;
|
|
break;
|
|
case V:
|
|
i = U();
|
|
break;
|
|
case L:
|
|
i = U() / 3;
|
|
break;
|
|
case Y:
|
|
i = (B - M) / 6048e5;
|
|
break;
|
|
case l:
|
|
i = (B - M) / 864e5;
|
|
break;
|
|
case I:
|
|
i = B / v;
|
|
break;
|
|
case f:
|
|
i = B / y;
|
|
break;
|
|
case d:
|
|
i = B / c;
|
|
break;
|
|
default:
|
|
i = B;
|
|
}
|
|
return r ? i : m.a(i);
|
|
}, n.daysInMonth = function() {
|
|
return this.endOf(V).$D;
|
|
}, n.$locale = function() {
|
|
return P[this.$L];
|
|
}, n.locale = function(a, o) {
|
|
if (!a) return this.$L;
|
|
var r = this.clone(), i = K(a, o, !0);
|
|
return i && (r.$L = i), r;
|
|
}, n.clone = function() {
|
|
return m.w(this.$d, this);
|
|
}, n.toDate = function() {
|
|
return new Date(this.valueOf());
|
|
}, n.toJSON = function() {
|
|
return this.isValid() ? this.toISOString() : null;
|
|
}, n.toISOString = function() {
|
|
return this.$d.toISOString();
|
|
}, n.toString = function() {
|
|
return this.$d.toUTCString();
|
|
}, s;
|
|
})(), ue = _.prototype;
|
|
return S.prototype = ue, [["$ms", w], ["$s", d], ["$m", f], ["$H", I], ["$W", l], ["$M", V], ["$y", g], ["$D", T]].forEach((function(s) {
|
|
ue[s[1]] = function(n) {
|
|
return this.$g(n, s[0], s[1]);
|
|
};
|
|
})), S.extend = function(s, n) {
|
|
return s.$i || (s(n, _, S), s.$i = !0), S;
|
|
}, S.locale = K, S.isDayjs = oe, S.unix = function(s) {
|
|
return S(1e3 * s);
|
|
}, S.en = P[q], S.Ls = P, S.p = {}, S;
|
|
}));
|
|
})(re)), re.exports;
|
|
}
|
|
var dt = ut();
|
|
const ee = /* @__PURE__ */ st(dt), ft = R({
|
|
name: "EliDataHora",
|
|
inheritAttrs: !1,
|
|
props: {
|
|
/**
|
|
* Valor em ISO 8601:
|
|
* - com offset (ex.: `2026-01-09T13:15:00-03:00`)
|
|
* - ou UTC absoluto (ex.: `2026-01-09T16:15:00Z`)
|
|
*/
|
|
modelValue: {
|
|
type: String,
|
|
default: null
|
|
},
|
|
/**
|
|
* Define o tipo de entrada.
|
|
* - `dataHora`: usa `datetime-local`
|
|
* - `data`: usa `date`
|
|
*/
|
|
modo: {
|
|
type: String,
|
|
default: "dataHora"
|
|
},
|
|
/** Rótulo exibido no v-text-field (Vuetify). */
|
|
rotulo: {
|
|
type: String,
|
|
default: "Data e hora"
|
|
},
|
|
/** Placeholder do input. */
|
|
placeholder: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
/** Desabilita a interação. */
|
|
desabilitado: {
|
|
type: Boolean,
|
|
default: !1
|
|
},
|
|
/** Se true, mostra ícone para limpar o valor (Vuetify clearable). */
|
|
limpavel: {
|
|
type: Boolean,
|
|
default: !1
|
|
},
|
|
/** Estado de erro (visual). */
|
|
erro: {
|
|
type: Boolean,
|
|
default: !1
|
|
},
|
|
/** Mensagens de erro. */
|
|
mensagensErro: {
|
|
type: [String, Array],
|
|
default: () => []
|
|
},
|
|
/** Texto de apoio. */
|
|
dica: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
/** Mantém a dica sempre visível. */
|
|
dicaPersistente: {
|
|
type: Boolean,
|
|
default: !1
|
|
},
|
|
/** Densidade do campo (Vuetify). */
|
|
densidade: {
|
|
type: String,
|
|
default: "comfortable"
|
|
},
|
|
/** Variante do v-text-field (Vuetify). */
|
|
variante: {
|
|
type: String,
|
|
default: "outlined"
|
|
},
|
|
/**
|
|
* Valor mínimo permitido.
|
|
* ISO 8601 (offset ou `Z`).
|
|
*/
|
|
min: {
|
|
// ISO 8601 (offset ou Z)
|
|
type: String,
|
|
default: void 0
|
|
},
|
|
/**
|
|
* Valor máximo permitido.
|
|
* ISO 8601 (offset ou `Z`).
|
|
*/
|
|
max: {
|
|
// ISO 8601 (offset ou Z)
|
|
type: String,
|
|
default: void 0
|
|
}
|
|
},
|
|
emits: {
|
|
/** v-model padrão. */
|
|
"update:modelValue": (e) => !0,
|
|
/** Alias para consumidores que querem um evento semântico. */
|
|
alterar: (e) => !0,
|
|
foco: () => !0,
|
|
desfoco: () => !0
|
|
},
|
|
setup(e, { emit: t, attrs: c }) {
|
|
const y = E(
|
|
() => e.modo === "data" ? "date" : "datetime-local"
|
|
);
|
|
function v(l) {
|
|
return e.modo === "data" ? ee(l).format("YYYY-MM-DD") : ee(l).format("YYYY-MM-DDTHH:mm");
|
|
}
|
|
function w(l) {
|
|
return e.modo === "data" ? ee(`${l}T00:00`).format() : ee(l).format();
|
|
}
|
|
const d = E({
|
|
get: () => e.modelValue ? v(e.modelValue) : "",
|
|
set: (l) => {
|
|
const Y = l && l.length > 0 ? l : null;
|
|
if (!Y) {
|
|
t("update:modelValue", null), t("alterar", null);
|
|
return;
|
|
}
|
|
const V = w(Y);
|
|
t("update:modelValue", V), t("alterar", V);
|
|
}
|
|
}), f = E(() => {
|
|
if (e.min)
|
|
return v(e.min);
|
|
}), I = E(() => {
|
|
if (e.max)
|
|
return v(e.max);
|
|
});
|
|
return { attrs: c, valor: d, emit: t, minLocal: f, maxLocal: I, tipoInput: y };
|
|
}
|
|
}), mt = { class: "eli-data-hora" };
|
|
function ct(e, t, c, y, v, w) {
|
|
return k(), G("div", mt, [
|
|
$(ye, F({
|
|
modelValue: e.valor,
|
|
"onUpdate:modelValue": t[0] || (t[0] = (d) => e.valor = d),
|
|
type: e.tipoInput,
|
|
label: e.rotulo,
|
|
placeholder: e.placeholder,
|
|
disabled: e.desabilitado,
|
|
clearable: e.limpavel,
|
|
error: e.erro,
|
|
"error-messages": e.mensagensErro,
|
|
hint: e.dica,
|
|
"persistent-hint": e.dicaPersistente,
|
|
density: e.densidade,
|
|
variant: e.variante,
|
|
min: e.minLocal,
|
|
max: e.maxLocal
|
|
}, e.attrs, {
|
|
onFocus: t[1] || (t[1] = (d) => e.emit("foco")),
|
|
onBlur: t[2] || (t[2] = (d) => e.emit("desfoco"))
|
|
}), null, 16, ["modelValue", "type", "label", "placeholder", "disabled", "clearable", "error", "error-messages", "hint", "persistent-hint", "density", "variant", "min", "max"])
|
|
]);
|
|
}
|
|
const pt = /* @__PURE__ */ J(ft, [["render", ct], ["__scopeId", "data-v-523063f3"]]), kt = {
|
|
install(e) {
|
|
e.component("EliOlaMundo", tt), e.component("EliBotao", Ve), e.component("EliBadge", le), e.component("EliInput", Se), e.component("EliCartao", lt), e.component("EliDataHora", pt);
|
|
}
|
|
};
|
|
export {
|
|
le as EliBadge,
|
|
Ve as EliBotao,
|
|
lt as EliCartao,
|
|
pt as EliDataHora,
|
|
Se as EliInput,
|
|
tt as EliOlaMundo,
|
|
kt as default
|
|
};
|