@hotelinking/ui 5.39.6 → 5.39.8
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/dist/ui.es.js +6 -6
- package/dist/ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -2198,19 +2198,19 @@ const On = { class: "py-1" }, Mn = ["onClick"], Dn = { key: 1, class: "animate-p
|
|
|
2198
2198
|
return e(), a("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m0-3-3-3m0 0-3 3m3-3v11.25m6-2.25h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75" })]);
|
|
2199
2199
|
} }, loading: { type: Boolean, default: true } }, emits: ["filesUploaded"], setup(t2, { emit: l2 }) {
|
|
2200
2200
|
let r2 = s(null);
|
|
2201
|
-
const d2 = l2, c2 = (e2) => {
|
|
2202
|
-
d2("filesUploaded",
|
|
2203
|
-
}, p2 = (e2) => {
|
|
2204
|
-
d2("filesUploaded", e2.target.files), g2(e2.target.files);
|
|
2201
|
+
const d2 = l2, c2 = t2, p2 = (e2) => {
|
|
2202
|
+
f2(e2.dataTransfer.files), d2("filesUploaded", { id: c2.id, files: e2.dataTransfer.files });
|
|
2205
2203
|
}, g2 = (e2) => {
|
|
2204
|
+
f2(e2.target.files), d2("filesUploaded", { id: c2.id, files: e2.target.files });
|
|
2205
|
+
}, f2 = (e2) => {
|
|
2206
2206
|
r2.value = null;
|
|
2207
|
-
let t3 =
|
|
2207
|
+
let t3 = 1;
|
|
2208
2208
|
Object.values(e2).forEach((l3) => {
|
|
2209
2209
|
t3++, r2.value += l3.name, t3 >= 1 && t3 < e2.length && (r2.value += ", ");
|
|
2210
2210
|
});
|
|
2211
2211
|
};
|
|
2212
2212
|
return (l3, s2) => t2.loading ? (e(), a("div", Qn, ea)) : (e(), a("div", Vn, [i("div", Hn, [t2.label ? (e(), a("label", Yn, _(t2.label), 1)) : R("", true), t2.optional ? (e(), a("span", qn, _(t2.optional), 1)) : R("", true)]), i("div", { class: n([[{ "mt-1": t2.label }, { "border-gray-300 hover:border-gray-400": !t2.error }, { "border-red-300 hover:border-red-400": t2.error }], "dropArea flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6"]), onDragover: s2[0] || (s2[0] = F(() => {
|
|
2213
|
-
}, ["prevent"])), onDrop: F(
|
|
2213
|
+
}, ["prevent"])), onDrop: F(p2, ["prevent"]) }, [i("div", Un, [o(J, { icon: t2.icon, size: "massive", color: "gray", "aria-hidden": "true", class: "mb-4", loading: t2.loading }, null, 8, ["icon", "loading"]), i("div", Wn, [i("label", { for: t2.id, class: "relative cursor-pointer rounded-md font-medium text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 hover:text-indigo-500" }, [i("span", null, _(t2.placeholder), 1), i("input", { id: t2.id, name: t2.name, type: "file", class: "sr-only", accept: t2.accept, multiple: "", onChange: g2 }, null, 40, Jn)], 8, Kn), i("p", Gn, _(t2.dragAndDrop), 1)]), i("p", Zn, _(t2.fileTypesAndSizes), 1), B(i("p", { class: "font-bold text-xs uppercase block p-2 bg-gray-200 rounded" }, _(u(r2)), 513), [[L, null !== u(r2)]])])], 34), B(i("p", Xn, [o(J, { icon: u(Sn), color: "red", class: "mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), I(_(t2.error), 1)], 512), [[L, t2.error]])]));
|
|
2214
2214
|
} }), na = { class: "relative mt-1" }, aa = { key: 1, class: "animate-pulse px-4 py-2.5 bg-gray-200 rounded-md flex justify-between items-center w-full" }, oa = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1), ra = { name: "uiSelect" }, ia = Object.assign(ra, { props: { items: { type: Array, required: true }, label: String, error: String, color: String, select: Object, loading: { type: Boolean, default: true }, disabled: { type: Boolean, default: false } }, emits: ["selectChanged"], setup(l2, { emit: r2 }) {
|
|
2215
2215
|
const c2 = s(""), p2 = r2, g2 = l2, f2 = d(() => "" === c2.value ? g2.items : g2.items.filter((e2) => e2.name.toLowerCase().includes(c2.value.toLowerCase()))), m2 = d(() => g2.select);
|
|
2216
2216
|
return (r3, s2) => l2.loading ? (e(), a("div", aa, [oa, o(u(mn), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-300 dark:text-gray-400" })])) : (e(), t(u(Bt), { key: 0, modelValue: m2.value, "onUpdate:modelValue": [s2[1] || (s2[1] = (e2) => m2.value = e2), s2[2] || (s2[2] = (e2) => p2("selectChanged", e2))], disabled: l2.disabled, as: "div" }, { default: T(() => [o(u(At), { class: "block text-sm font-medium" }, { default: T(() => [I(_(l2.label), 1)]), _: 1 }), i("div", na, [o(u(Ft), { "display-value": (e2) => e2 == null ? void 0 : e2.name, class: n([{ "border-gray-300": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "border-red-400": "danger" === l2.color, "border-yellow-400": "warning" === l2.color, "border-green-400": "success" === l2.color, "bg-gray-100": l2.disabled, "bg-white": !l2.disabled, "text-black": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "text-gray-300": l2.disabled, "text-red-400": "danger" === l2.color, "text-yellow-400": "warning" === l2.color, "text-green-400": "success" === l2.color }, "w-full rounded-md border py-2 pl-3 pr-10 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm"]), onChange: s2[0] || (s2[0] = (e2) => c2.value = e2.target.value) }, null, 8, ["display-value", "class"]), o(u(Lt), { class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none" }, { default: T(() => [o(u(mn), { "aria-hidden": "true", class: "h-5 w-5 text-gray-400" })]), _: 1 }), f2.value.length > 0 ? (e(), t(u(Nt), { key: 0, class: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" }, { default: T(() => [(e(true), a(k, null, P(f2.value, (l3) => (e(), t(u(zt), { key: l3.id, value: l3, as: "template" }, { default: T(({ active: t2, selected: r4 }) => [i("li", { class: n(["relative cursor-default select-none py-2 pl-3 pr-9", t2 ? "bg-indigo-600 text-white" : "text-gray-900"]) }, [i("span", { class: n(["block truncate", r4 && "font-semibold"]) }, _(l3.name), 3), r4 ? (e(), a("span", { key: 0, class: n(["absolute inset-y-0 right-0 flex items-center pr-4", t2 ? "text-white" : "text-indigo-600"]) }, [o(u(cn), { "aria-hidden": "true", class: "h-5 w-5", loading: true })], 2)) : R("", true)], 2)]), _: 2 }, 1032, ["value"]))), 128))]), _: 1 })) : R("", true)]), B(i("p", { class: n([{ "text-gray-400": "danger" !== l2.color || "warning" !== l2.color || "success" !== l2.color, "text-red-400": "danger" === l2.color, "text-yellow-400": "warning" === l2.color, "text-green-400": "success" === l2.color }, "mt-2 text-xs flex flex-row items-center"]) }, _(l2.error), 3), [[L, l2.error]])]), _: 1 }, 8, ["modelValue", "disabled"]));
|