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, { emit: e }) {
14286
- const n = e, r = t, s = F(r.modelValue), o = F(), i = F(null), l = F("0"), a = F("0"), u = F(!1);
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 _, m;
14289
- i.value && (l.value = ((_ = i.value) == null ? void 0 : _.offsetWidth) + "px", a.value = ((m = i.value) == null ? void 0 : m.offsetHeight) + "px");
14290
- }), de(() => r.modelValue, (_) => {
14291
- !u.value && o.value && (o.value.innerText = _, s.value = _);
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
- o.value.innerText = s.value;
14293
+ i.value.innerText = o.value;
14294
14294
  });
14295
- const c = wr(() => {
14296
- n("update:model-value", s.value), n("change", s.value);
14297
- }, r.debounceDelay);
14298
- function d(_) {
14299
- s.value = _.target.innerText, c();
14300
- }
14301
- const f = O(() => [
14302
- ...r.readonly ? [] : [
14303
- `hover:bg-${r.color} focus:bg-${r.color}`,
14304
- `hover:text-${r.textColor} focus:text-${r.textColor}`,
14305
- `hover:outline-${r.color} focus:outline-${r.color}`,
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
- r.contentClass || ""
14307
+ s.contentClass || ""
14308
14308
  ],
14309
- s.value ? "" : "!bg-none"
14309
+ o.value ? "" : "!bg-none"
14310
14310
  ]);
14311
- return (_, m) => (g(), x("div", k8, [
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: o,
14315
- contenteditable: _.readonly ? "false" : "true",
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", f.value]),
14317
- style: qt({ minWidth: l.value, minHeight: a.value }),
14318
- onInput: d,
14319
- onFocusin: m[0] || (m[0] = (h) => u.value = !0),
14320
- onFocusout: m[1] || (m[1] = (h) => u.value = !1)
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
- !s.value && _.placeholder && !u.value && !_.readonly ? (g(), x("div", {
14330
+ !o.value && h.placeholder && !c.value && !h.readonly ? (g(), x("div", {
14323
14331
  key: 0,
14324
14332
  ref_key: "placeholderDiv",
14325
- ref: i,
14333
+ ref: l,
14326
14334
  class: "text-gray-600 absolute-top-left whitespace-nowrap z-1 pointer-events-none"
14327
- }, R(_.placeholder), 513)) : L("", !0)
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.2", OL = {
35222
+ const LL = "0.5.3", OL = {
35215
35223
  version: LL
35216
35224
  }, { version: FL } = OL;
35217
35225
  function dF() {