quasar-ui-danx 0.5.3 → 0.5.4
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/danx.es.js
CHANGED
|
@@ -14282,49 +14282,57 @@ const T3 = {
|
|
|
14282
14282
|
contentClass: { default: "" }
|
|
14283
14283
|
},
|
|
14284
14284
|
emits: ["update:model-value", "change"],
|
|
14285
|
-
setup(t, {
|
|
14286
|
-
const
|
|
14285
|
+
setup(t, { expose: e, emit: n }) {
|
|
14286
|
+
const r = n, s = t, o = F(s.modelValue), i = F(), l = F(null), a = F("0"), u = F("0"), c = F(!1);
|
|
14287
14287
|
We(() => {
|
|
14288
|
-
var
|
|
14289
|
-
|
|
14290
|
-
}), de(() =>
|
|
14291
|
-
!
|
|
14288
|
+
var h, p;
|
|
14289
|
+
l.value && (a.value = ((h = l.value) == null ? void 0 : h.offsetWidth) + "px", u.value = ((p = l.value) == null ? void 0 : p.offsetHeight) + "px");
|
|
14290
|
+
}), de(() => s.modelValue, (h) => {
|
|
14291
|
+
!c.value && i.value && (i.value.innerText = h, o.value = h);
|
|
14292
14292
|
}), We(() => {
|
|
14293
|
-
|
|
14293
|
+
i.value.innerText = o.value;
|
|
14294
14294
|
});
|
|
14295
|
-
const
|
|
14296
|
-
|
|
14297
|
-
},
|
|
14298
|
-
function
|
|
14299
|
-
|
|
14300
|
-
}
|
|
14301
|
-
const
|
|
14302
|
-
...
|
|
14303
|
-
`hover:bg-${
|
|
14304
|
-
`hover:text-${
|
|
14305
|
-
`hover:outline-${
|
|
14295
|
+
const d = wr(() => {
|
|
14296
|
+
r("update:model-value", o.value), r("change", o.value);
|
|
14297
|
+
}, s.debounceDelay);
|
|
14298
|
+
function f(h) {
|
|
14299
|
+
o.value = h.target.innerText, d();
|
|
14300
|
+
}
|
|
14301
|
+
const _ = O(() => [
|
|
14302
|
+
...s.readonly ? [] : [
|
|
14303
|
+
`hover:bg-${s.color} focus:bg-${s.color}`,
|
|
14304
|
+
`hover:text-${s.textColor} focus:text-${s.textColor}`,
|
|
14305
|
+
`hover:outline-${s.color} focus:outline-${s.color}`,
|
|
14306
14306
|
"focus:outline-4 hover:outline-4",
|
|
14307
|
-
|
|
14307
|
+
s.contentClass || ""
|
|
14308
14308
|
],
|
|
14309
|
-
|
|
14309
|
+
o.value ? "" : "!bg-none"
|
|
14310
14310
|
]);
|
|
14311
|
-
|
|
14311
|
+
function m(h = !1) {
|
|
14312
|
+
if (i.value && !s.readonly && (i.value.focus(), h && o.value)) {
|
|
14313
|
+
const p = document.createRange();
|
|
14314
|
+
p.selectNodeContents(i.value);
|
|
14315
|
+
const b = window.getSelection();
|
|
14316
|
+
b == null || b.removeAllRanges(), b == null || b.addRange(p);
|
|
14317
|
+
}
|
|
14318
|
+
}
|
|
14319
|
+
return e({ focus: m }), (h, p) => (g(), x("div", k8, [
|
|
14312
14320
|
T("div", {
|
|
14313
14321
|
ref_key: "textDiv",
|
|
14314
|
-
ref:
|
|
14315
|
-
contenteditable:
|
|
14316
|
-
class: V(["relative inline-block transition duration-300 outline-none outline-offset-0 border-none rounded-sm z-10 min-w-10 min-h-10",
|
|
14317
|
-
style: qt({ minWidth:
|
|
14318
|
-
onInput:
|
|
14319
|
-
onFocusin:
|
|
14320
|
-
onFocusout:
|
|
14322
|
+
ref: i,
|
|
14323
|
+
contenteditable: h.readonly ? "false" : "true",
|
|
14324
|
+
class: V(["relative inline-block transition duration-300 outline-none outline-offset-0 border-none rounded-sm z-10 min-w-10 min-h-10", _.value]),
|
|
14325
|
+
style: qt({ minWidth: a.value, minHeight: u.value }),
|
|
14326
|
+
onInput: f,
|
|
14327
|
+
onFocusin: p[0] || (p[0] = (b) => c.value = !0),
|
|
14328
|
+
onFocusout: p[1] || (p[1] = (b) => c.value = !1)
|
|
14321
14329
|
}, null, 46, C8),
|
|
14322
|
-
!
|
|
14330
|
+
!o.value && h.placeholder && !c.value && !h.readonly ? (g(), x("div", {
|
|
14323
14331
|
key: 0,
|
|
14324
14332
|
ref_key: "placeholderDiv",
|
|
14325
|
-
ref:
|
|
14333
|
+
ref: l,
|
|
14326
14334
|
class: "text-gray-600 absolute-top-left whitespace-nowrap z-1 pointer-events-none"
|
|
14327
|
-
}, R(
|
|
14335
|
+
}, R(h.placeholder), 513)) : L("", !0)
|
|
14328
14336
|
]));
|
|
14329
14337
|
}
|
|
14330
14338
|
}), T8 = ["contenteditable"], E8 = { key: 0 }, I8 = /* @__PURE__ */ re({
|
|
@@ -35211,7 +35219,7 @@ function cF(t, e = "") {
|
|
|
35211
35219
|
function z1(t, e = "") {
|
|
35212
35220
|
return Object.entries(t).map(([n, r]) => typeof r == "object" ? z1(r, `${e}${n}-`) : `--${e}${n}: ${r}`).join(";");
|
|
35213
35221
|
}
|
|
35214
|
-
const LL = "0.5.
|
|
35222
|
+
const LL = "0.5.3", OL = {
|
|
35215
35223
|
version: LL
|
|
35216
35224
|
}, { version: FL } = OL;
|
|
35217
35225
|
function dF() {
|