quail-ui 0.2.13 → 0.2.15

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { openBlock as n, createElementBlock as s, createElementVNode as o, createStaticVNode as s1, defineComponent as Z, ref as B, watch as G, onMounted as h1, withDirectives as e1, vModelText as l1, computed as Y, createBlock as j, Transition as u1, withCtx as C1, normalizeStyle as x1, withModifiers as f1, toDisplayString as D, renderSlot as d1, createCommentVNode as U, getCurrentInstance as L1, resolveComponent as R, normalizeClass as E, unref as t1, resolveDynamicComponent as n1, Fragment as w1, renderList as p1, vModelCheckbox as H1, pushScopeId as V1, popScopeId as y1, createVNode as o1 } from "vue";
1
+ import { openBlock as n, createElementBlock as s, createElementVNode as o, createStaticVNode as s1, defineComponent as Z, ref as B, watch as G, onMounted as h1, withDirectives as e1, vModelText as l1, computed as A, createBlock as D, Transition as u1, withCtx as C1, normalizeStyle as x1, withModifiers as f1, toDisplayString as S, renderSlot as d1, createCommentVNode as U, getCurrentInstance as L1, resolveComponent as R, normalizeClass as E, unref as t1, resolveDynamicComponent as n1, Fragment as w1, renderList as p1, vModelCheckbox as H1, pushScopeId as V1, popScopeId as y1, createVNode as o1 } from "vue";
2
2
  const r = (t, e) => {
3
3
  const d = t.__vccOpts || t;
4
4
  for (const [_, h] of e)
@@ -1231,7 +1231,7 @@ var v1 = { exports: {} };
1231
1231
  (function(d, _) {
1232
1232
  t.exports = _();
1233
1233
  })(U9, function() {
1234
- var d = 1e3, _ = 6e4, h = 36e5, v = "millisecond", g = "second", u = "minute", M = "hour", f = "day", $ = "week", x = "month", z = "quarter", Q = "year", O = "date", a1 = "Invalid Date", $1 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m1 = /\[([^\]]+)]|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, M1 = { 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(C) {
1234
+ var d = 1e3, _ = 6e4, h = 36e5, v = "millisecond", g = "second", u = "minute", M = "hour", f = "day", $ = "week", x = "month", b = "quarter", Q = "year", Y = "date", a1 = "Invalid Date", $1 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m1 = /\[([^\]]+)]|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, M1 = { 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(C) {
1235
1235
  var l = ["th", "st", "nd", "rd"], i = C % 100;
1236
1236
  return "[" + C + (l[(i - 20) % 10] || l[i] || l[0]) + "]";
1237
1237
  } }, r1 = function(C, l, i) {
@@ -1248,11 +1248,11 @@ var v1 = { exports: {} };
1248
1248
  }, a: function(C) {
1249
1249
  return C < 0 ? Math.ceil(C) || 0 : Math.floor(C);
1250
1250
  }, p: function(C) {
1251
- return { M: x, y: Q, w: $, d: f, D: O, h: M, m: u, s: g, ms: v, Q: z }[C] || String(C || "").toLowerCase().replace(/s$/, "");
1251
+ return { M: x, y: Q, w: $, d: f, D: Y, h: M, m: u, s: g, ms: v, Q: b }[C] || String(C || "").toLowerCase().replace(/s$/, "");
1252
1252
  }, u: function(C) {
1253
1253
  return C === void 0;
1254
- } }, W = "en", P = {};
1255
- P[W] = M1;
1254
+ } }, W = "en", O = {};
1255
+ O[W] = M1;
1256
1256
  var i1 = function(C) {
1257
1257
  return C instanceof K;
1258
1258
  }, J = function C(l, i, a) {
@@ -1261,13 +1261,13 @@ var v1 = { exports: {} };
1261
1261
  return W;
1262
1262
  if (typeof l == "string") {
1263
1263
  var w = l.toLowerCase();
1264
- P[w] && (c = w), i && (P[w] = i, c = w);
1264
+ O[w] && (c = w), i && (O[w] = i, c = w);
1265
1265
  var p = l.split("-");
1266
1266
  if (!c && p.length > 1)
1267
1267
  return C(p[0]);
1268
1268
  } else {
1269
1269
  var k = l.name;
1270
- P[k] = l, c = k;
1270
+ O[k] = l, c = k;
1271
1271
  }
1272
1272
  return !a && c && (W = c), c || !a && W;
1273
1273
  }, H = function(C, l) {
@@ -1323,11 +1323,11 @@ var v1 = { exports: {} };
1323
1323
  }, l.valueOf = function() {
1324
1324
  return this.$d.getTime();
1325
1325
  }, l.startOf = function(i, a) {
1326
- var c = this, w = !!m.u(a) || a, p = m.p(i), k = function(A, b) {
1327
- var S = m.w(c.$u ? Date.UTC(c.$y, b, A) : new Date(c.$y, b, A), c);
1328
- return w ? S : S.endOf(f);
1329
- }, L = function(A, b) {
1330
- return m.w(c.toDate()[A].apply(c.toDate("s"), (w ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(b)), c);
1326
+ var c = this, w = !!m.u(a) || a, p = m.p(i), k = function(T, z) {
1327
+ var j = m.w(c.$u ? Date.UTC(c.$y, z, T) : new Date(c.$y, z, T), c);
1328
+ return w ? j : j.endOf(f);
1329
+ }, L = function(T, z) {
1330
+ return m.w(c.toDate()[T].apply(c.toDate("s"), (w ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(z)), c);
1331
1331
  }, V = this.$W, y = this.$M, I = this.$D, F = "set" + (this.$u ? "UTC" : "");
1332
1332
  switch (p) {
1333
1333
  case Q:
@@ -1335,10 +1335,10 @@ var v1 = { exports: {} };
1335
1335
  case x:
1336
1336
  return w ? k(1, y) : k(0, y + 1);
1337
1337
  case $:
1338
- var T = this.$locale().weekStart || 0, q = (V < T ? V + 7 : V) - T;
1338
+ var P = this.$locale().weekStart || 0, q = (V < P ? V + 7 : V) - P;
1339
1339
  return k(w ? I - q : I + (6 - q), y);
1340
1340
  case f:
1341
- case O:
1341
+ case Y:
1342
1342
  return L(F + "Hours", 0);
1343
1343
  case M:
1344
1344
  return L(F + "Minutes", 1);
@@ -1352,10 +1352,10 @@ var v1 = { exports: {} };
1352
1352
  }, l.endOf = function(i) {
1353
1353
  return this.startOf(i, !1);
1354
1354
  }, l.$set = function(i, a) {
1355
- var c, w = m.p(i), p = "set" + (this.$u ? "UTC" : ""), k = (c = {}, c[f] = p + "Date", c[O] = p + "Date", c[x] = p + "Month", c[Q] = p + "FullYear", c[M] = p + "Hours", c[u] = p + "Minutes", c[g] = p + "Seconds", c[v] = p + "Milliseconds", c)[w], L = w === f ? this.$D + (a - this.$W) : a;
1355
+ var c, w = m.p(i), p = "set" + (this.$u ? "UTC" : ""), k = (c = {}, c[f] = p + "Date", c[Y] = p + "Date", c[x] = p + "Month", c[Q] = p + "FullYear", c[M] = p + "Hours", c[u] = p + "Minutes", c[g] = p + "Seconds", c[v] = p + "Milliseconds", c)[w], L = w === f ? this.$D + (a - this.$W) : a;
1356
1356
  if (w === x || w === Q) {
1357
- var V = this.clone().set(O, 1);
1358
- V.$d[k](L), V.init(), this.$d = V.set(O, Math.min(this.$D, V.daysInMonth())).$d;
1357
+ var V = this.clone().set(Y, 1);
1358
+ V.$d[k](L), V.init(), this.$d = V.set(Y, Math.min(this.$D, V.daysInMonth())).$d;
1359
1359
  } else
1360
1360
  k && this.$d[k](L);
1361
1361
  return this.init(), this;
@@ -1386,16 +1386,16 @@ var v1 = { exports: {} };
1386
1386
  var a = this, c = this.$locale();
1387
1387
  if (!this.isValid())
1388
1388
  return c.invalidDate || a1;
1389
- var w = i || "YYYY-MM-DDTHH:mm:ssZ", p = m.z(this), k = this.$H, L = this.$m, V = this.$M, y = c.weekdays, I = c.months, F = c.meridiem, T = function(b, S, N, X) {
1390
- return b && (b[S] || b(a, w)) || N[S].slice(0, X);
1391
- }, q = function(b) {
1392
- return m.s(k % 12 || 12, b, "0");
1393
- }, A = F || function(b, S, N) {
1394
- var X = b < 12 ? "AM" : "PM";
1389
+ var w = i || "YYYY-MM-DDTHH:mm:ssZ", p = m.z(this), k = this.$H, L = this.$m, V = this.$M, y = c.weekdays, I = c.months, F = c.meridiem, P = function(z, j, N, X) {
1390
+ return z && (z[j] || z(a, w)) || N[j].slice(0, X);
1391
+ }, q = function(z) {
1392
+ return m.s(k % 12 || 12, z, "0");
1393
+ }, T = F || function(z, j, N) {
1394
+ var X = z < 12 ? "AM" : "PM";
1395
1395
  return N ? X.toLowerCase() : X;
1396
1396
  };
1397
- return w.replace(m1, function(b, S) {
1398
- return S || function(N) {
1397
+ return w.replace(m1, function(z, j) {
1398
+ return j || function(N) {
1399
1399
  switch (N) {
1400
1400
  case "YY":
1401
1401
  return String(a.$y).slice(-2);
@@ -1406,9 +1406,9 @@ var v1 = { exports: {} };
1406
1406
  case "MM":
1407
1407
  return m.s(V + 1, 2, "0");
1408
1408
  case "MMM":
1409
- return T(c.monthsShort, V, I, 3);
1409
+ return P(c.monthsShort, V, I, 3);
1410
1410
  case "MMMM":
1411
- return T(I, V);
1411
+ return P(I, V);
1412
1412
  case "D":
1413
1413
  return a.$D;
1414
1414
  case "DD":
@@ -1416,9 +1416,9 @@ var v1 = { exports: {} };
1416
1416
  case "d":
1417
1417
  return String(a.$W);
1418
1418
  case "dd":
1419
- return T(c.weekdaysMin, a.$W, y, 2);
1419
+ return P(c.weekdaysMin, a.$W, y, 2);
1420
1420
  case "ddd":
1421
- return T(c.weekdaysShort, a.$W, y, 3);
1421
+ return P(c.weekdaysShort, a.$W, y, 3);
1422
1422
  case "dddd":
1423
1423
  return y[a.$W];
1424
1424
  case "H":
@@ -1430,9 +1430,9 @@ var v1 = { exports: {} };
1430
1430
  case "hh":
1431
1431
  return q(2);
1432
1432
  case "a":
1433
- return A(k, L, !0);
1433
+ return T(k, L, !0);
1434
1434
  case "A":
1435
- return A(k, L, !1);
1435
+ return T(k, L, !1);
1436
1436
  case "m":
1437
1437
  return String(L);
1438
1438
  case "mm":
@@ -1447,7 +1447,7 @@ var v1 = { exports: {} };
1447
1447
  return p;
1448
1448
  }
1449
1449
  return null;
1450
- }(b) || p.replace(":", "");
1450
+ }(z) || p.replace(":", "");
1451
1451
  });
1452
1452
  }, l.utcOffset = function() {
1453
1453
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
@@ -1462,7 +1462,7 @@ var v1 = { exports: {} };
1462
1462
  case x:
1463
1463
  w = I();
1464
1464
  break;
1465
- case z:
1465
+ case b:
1466
1466
  w = I() / 3;
1467
1467
  break;
1468
1468
  case $:
@@ -1487,7 +1487,7 @@ var v1 = { exports: {} };
1487
1487
  }, l.daysInMonth = function() {
1488
1488
  return this.endOf(x).$D;
1489
1489
  }, l.$locale = function() {
1490
- return P[this.$L];
1490
+ return O[this.$L];
1491
1491
  }, l.locale = function(i, a) {
1492
1492
  if (!i)
1493
1493
  return this.$L;
@@ -1505,7 +1505,7 @@ var v1 = { exports: {} };
1505
1505
  return this.$d.toUTCString();
1506
1506
  }, C;
1507
1507
  }(), _1 = K.prototype;
1508
- return H.prototype = _1, [["$ms", v], ["$s", g], ["$m", u], ["$H", M], ["$W", f], ["$M", x], ["$y", Q], ["$D", O]].forEach(function(C) {
1508
+ return H.prototype = _1, [["$ms", v], ["$s", g], ["$m", u], ["$H", M], ["$W", f], ["$M", x], ["$y", Q], ["$D", Y]].forEach(function(C) {
1509
1509
  _1[C[1]] = function(l) {
1510
1510
  return this.$g(l, C[0], C[1]);
1511
1511
  };
@@ -1513,7 +1513,7 @@ var v1 = { exports: {} };
1513
1513
  return C.$i || (C(l, K, H), C.$i = !0), H;
1514
1514
  }, H.locale = J, H.isDayjs = i1, H.unix = function(C) {
1515
1515
  return H(1e3 * C);
1516
- }, H.en = P[W], H.Ls = P, H.p = {}, H;
1516
+ }, H.en = O[W], H.Ls = O, H.p = {}, H;
1517
1517
  });
1518
1518
  })(v1);
1519
1519
  var W9 = v1.exports;
@@ -1592,7 +1592,7 @@ const J9 = /* @__PURE__ */ r(G9, [["__scopeId", "data-v-f79d855e"]]), K9 = ["onC
1592
1592
  },
1593
1593
  emits: ["update:modelValue", "close"],
1594
1594
  setup(t, { emit: e }) {
1595
- const d = t, _ = B(d.modelValue), h = Y(() => {
1595
+ const d = t, _ = B(d.modelValue), h = A(() => {
1596
1596
  const u = document.body.clientWidth < 720 ? "100%" : d.width, M = d.height;
1597
1597
  return {
1598
1598
  width: u,
@@ -1610,7 +1610,7 @@ const J9 = /* @__PURE__ */ r(G9, [["__scopeId", "data-v-f79d855e"]]), K9 = ["onC
1610
1610
  }
1611
1611
  function g() {
1612
1612
  }
1613
- return (u, M) => (n(), j(u1, null, {
1613
+ return (u, M) => (n(), D(u1, null, {
1614
1614
  default: C1(() => [
1615
1615
  _.value ? (n(), s("div", {
1616
1616
  key: 0,
@@ -1623,7 +1623,7 @@ const J9 = /* @__PURE__ */ r(G9, [["__scopeId", "data-v-f79d855e"]]), K9 = ["onC
1623
1623
  onClick: f1(g, ["stop"])
1624
1624
  }, [
1625
1625
  o("div", X9, [
1626
- t.title ? (n(), s("div", t5, D(t.title), 1)) : d1(u.$slots, "header", { key: 1 }, void 0, !0)
1626
+ t.title ? (n(), s("div", t5, S(t.title), 1)) : d1(u.$slots, "header", { key: 1 }, void 0, !0)
1627
1627
  ]),
1628
1628
  o("div", e5, [
1629
1629
  d1(u.$slots, "default", {}, void 0, !0)
@@ -1671,23 +1671,23 @@ const o5 = /* @__PURE__ */ r(n5, [["__scopeId", "data-v-cd14d61a"]]), s5 = ["hre
1671
1671
  href: t.link,
1672
1672
  target: "_blank"
1673
1673
  }, [
1674
- t.icon && t1(e) ? (n(), j(n1(t1(e)[t.icon]), {
1674
+ t.icon && t1(e) ? (n(), D(n1(t1(e)[t.icon]), {
1675
1675
  key: 0,
1676
1676
  class: "icon"
1677
- })) : (n(), j(v, {
1677
+ })) : (n(), D(v, {
1678
1678
  key: 1,
1679
1679
  class: "icon"
1680
1680
  })),
1681
- o("div", r5, D(t.text), 1)
1681
+ o("div", r5, S(t.text), 1)
1682
1682
  ], 8, s5)) : (n(), s("div", i5, [
1683
- t.icon && t1(e) ? (n(), j(n1(t1(e)[t.icon]), {
1683
+ t.icon && t1(e) ? (n(), D(n1(t1(e)[t.icon]), {
1684
1684
  key: 0,
1685
1685
  class: "icon"
1686
- })) : (n(), j(v, {
1686
+ })) : (n(), D(v, {
1687
1687
  key: 1,
1688
1688
  class: "icon"
1689
1689
  })),
1690
- o("div", c5, D(t.text), 1)
1690
+ o("div", c5, S(t.text), 1)
1691
1691
  ]))
1692
1692
  ], 2);
1693
1693
  };
@@ -1742,13 +1742,13 @@ const f5 = /* @__PURE__ */ r(a5, [["render", C5], ["__scopeId", "data-v-f4d8a4f4
1742
1742
  class: "menu-image",
1743
1743
  src: u.image,
1744
1744
  alt: u.title
1745
- }, null, 8, $5)) : u.icon ? (n(), j(n1(u.icon), {
1745
+ }, null, 8, $5)) : u.icon ? (n(), D(n1(u.icon), {
1746
1746
  key: 1,
1747
1747
  class: "menu-icon mr-1"
1748
1748
  })) : U("", !0),
1749
1749
  o("div", m5, [
1750
- o("div", M5, D(u.title), 1),
1751
- u.subtitle ? (n(), s("div", k5, D(u.subtitle), 1)) : U("", !0)
1750
+ o("div", M5, S(u.title), 1),
1751
+ u.subtitle ? (n(), s("div", k5, S(u.subtitle), 1)) : U("", !0)
1752
1752
  ])
1753
1753
  ]))
1754
1754
  ], 10, p5))), 128))
@@ -1816,18 +1816,18 @@ const z5 = /* @__PURE__ */ r(b5, [["__scopeId", "data-v-f5802762"]]), I5 = ["pla
1816
1816
  },
1817
1817
  emits: ["submit"],
1818
1818
  setup(t, { emit: e }) {
1819
- const d = t, _ = B(d.defaultText), h = Y(() => {
1819
+ const d = t, _ = B(d.defaultText), h = A(() => {
1820
1820
  var $;
1821
1821
  return d.loading || (($ = _.value) == null ? void 0 : $.trim()).length === 0 ? !1 : d.type === "email" ? v.value : d.type === "code" ? g.value : !0;
1822
- }), v = Y(() => {
1822
+ }), v = A(() => {
1823
1823
  var $;
1824
1824
  const f = ($ = _.value) == null ? void 0 : $.trim();
1825
1825
  return !d.disabled && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f);
1826
- }), g = Y(() => {
1826
+ }), g = A(() => {
1827
1827
  var $;
1828
1828
  const f = ($ = _.value) == null ? void 0 : $.trim();
1829
1829
  return /^\d{6}$/.test(f);
1830
- }), u = Y(() => d.loading ? "Loading..." : d.actionLabel), M = () => {
1830
+ }), u = A(() => d.loading ? "Loading..." : d.actionLabel), M = () => {
1831
1831
  h.value && e("submit", { text: _.value });
1832
1832
  };
1833
1833
  return (f, $) => (n(), s("div", {
@@ -1848,7 +1848,7 @@ const z5 = /* @__PURE__ */ r(b5, [["__scopeId", "data-v-f5802762"]]), I5 = ["pla
1848
1848
  disabled: !h.value,
1849
1849
  onClick: M
1850
1850
  }, [
1851
- o("div", B5, D(u.value), 1)
1851
+ o("div", B5, S(u.value), 1)
1852
1852
  ], 8, Q5)
1853
1853
  ])
1854
1854
  ], 2));
@@ -1892,7 +1892,7 @@ const D5 = { class: "dropdown-menu" }, Z5 = { class: "dropdown-menu-inner narrow
1892
1892
  },
1893
1893
  emits: ["change"],
1894
1894
  setup(t, { emit: e }) {
1895
- const d = t, _ = B(!1), h = B(null), v = B(null), g = Y(() => {
1895
+ const d = t, _ = B(!1), h = B(null), v = B(null), g = A(() => {
1896
1896
  const f = [];
1897
1897
  return _.value && f.push("expanded"), d.variant === "outlined" && f.push("frame"), f.join(" ");
1898
1898
  });
@@ -1915,7 +1915,7 @@ const D5 = { class: "dropdown-menu" }, Z5 = { class: "dropdown-menu-inner narrow
1915
1915
  f.key === "quailui_global_popup_trigger" && f.newValue && (_.value = !1);
1916
1916
  });
1917
1917
  }), (f, $) => {
1918
- const x = R("QIconChevronDown"), z = R("QMenu");
1918
+ const x = R("QIconChevronDown"), b = R("QMenu");
1919
1919
  return n(), s("div", D5, [
1920
1920
  o("div", Z5, [
1921
1921
  o("div", {
@@ -1928,11 +1928,11 @@ const D5 = { class: "dropdown-menu" }, Z5 = { class: "dropdown-menu-inner narrow
1928
1928
  class: "menu-image",
1929
1929
  src: h.value.image,
1930
1930
  alt: h.value.title
1931
- }, null, 8, T5)) : h.value.icon ? (n(), j(n1(h.value.icon), {
1931
+ }, null, 8, T5)) : h.value.icon ? (n(), D(n1(h.value.icon), {
1932
1932
  key: 1,
1933
1933
  class: "icon menu-icon"
1934
1934
  })) : U("", !0),
1935
- o("div", A5, D(h.value ? h.value.title : d.placeholder || "Select ..."), 1)
1935
+ o("div", A5, S(h.value ? h.value.title : d.placeholder || "Select ..."), 1)
1936
1936
  ])) : U("", !0),
1937
1937
  d1(f.$slots, "default", {}, void 0, !0),
1938
1938
  o1(x, { class: "icon chevron-icon" })
@@ -1943,7 +1943,7 @@ const D5 = { class: "dropdown-menu" }, Z5 = { class: "dropdown-menu-inner narrow
1943
1943
  }, [
1944
1944
  o1(u1, null, {
1945
1945
  default: C1(() => [
1946
- _.value ? (n(), j(z, {
1946
+ _.value ? (n(), D(b, {
1947
1947
  key: 0,
1948
1948
  items: t.items,
1949
1949
  onAction: M
@@ -1957,7 +1957,13 @@ const D5 = { class: "dropdown-menu" }, Z5 = { class: "dropdown-menu-inner narrow
1957
1957
  };
1958
1958
  }
1959
1959
  });
1960
- const F5 = /* @__PURE__ */ r(Y5, [["__scopeId", "data-v-493ecc5d"]]), U5 = { class: "pagination" }, E5 = ["disabled"], W5 = { class: "page-indicators" }, q5 = { class: "page-indicator" }, N5 = ["disabled", "onClick"], R5 = ["disabled"], G5 = /* @__PURE__ */ Z({
1960
+ const F5 = /* @__PURE__ */ r(Y5, [["__scopeId", "data-v-e8a215bd"]]), U5 = { class: "pagination" }, E5 = ["disabled"], W5 = {
1961
+ key: 0,
1962
+ class: "page-indicators"
1963
+ }, q5 = { class: "page-indicator" }, N5 = ["disabled", "onClick"], R5 = {
1964
+ key: 1,
1965
+ class: "page-indicator-simple"
1966
+ }, G5 = { class: "" }, J5 = ["disabled"], K5 = /* @__PURE__ */ Z({
1961
1967
  __name: "QPagination",
1962
1968
  props: {
1963
1969
  modelValue: {
@@ -1979,20 +1985,21 @@ const F5 = /* @__PURE__ */ r(Y5, [["__scopeId", "data-v-493ecc5d"]]), U5 = { cla
1979
1985
  },
1980
1986
  emits: ["change:next", "change:prev", "change:goto", "update:modelValue"],
1981
1987
  setup(t, { emit: e }) {
1982
- const d = t, _ = Y(() => {
1988
+ const d = t, _ = A(() => {
1983
1989
  let M = 6;
1984
1990
  const f = [];
1985
- if (d.totalPage < M)
1986
- for (let $ = 1; $ <= d.totalPage; $++)
1987
- f.push({ label: $ });
1988
- else {
1989
- f.push({ label: 1 });
1990
- let $ = h.value - 2, x = h.value + 2;
1991
- $ < 2 && ($ = 2, x = $ + M - 2), x > d.totalPage - 1 && (x = d.totalPage - 1, $ = x - M + 2), $ > 2 && f.push({ label: "…", disabled: !0 });
1992
- for (let z = $; z <= x; z++)
1993
- f.push({ label: z });
1994
- x < d.totalPage - 1 && f.push({ label: "…", disabled: !0 }), f.push({ label: d.totalPage });
1995
- }
1991
+ if (d.totalPage !== 0)
1992
+ if (d.totalPage < M)
1993
+ for (let $ = 1; $ <= d.totalPage; $++)
1994
+ f.push({ label: $ });
1995
+ else {
1996
+ f.push({ label: 1 });
1997
+ let $ = h.value - 2, x = h.value + 2;
1998
+ $ < 2 && ($ = 2, x = $ + M - 2), x > d.totalPage - 1 && (x = d.totalPage - 1, $ = x - M + 2), $ > 2 && f.push({ label: "…", disabled: !0 });
1999
+ for (let b = $; b <= x; b++)
2000
+ f.push({ label: b });
2001
+ x < d.totalPage - 1 && f.push({ label: "…", disabled: !0 }), f.push({ label: d.totalPage });
2002
+ }
1996
2003
  return f;
1997
2004
  }), h = B(d.modelValue);
1998
2005
  G(() => d.modelValue, (M) => {
@@ -2011,33 +2018,35 @@ const F5 = /* @__PURE__ */ r(Y5, [["__scopeId", "data-v-493ecc5d"]]), U5 = { cla
2011
2018
  const $ = R("QIconArrowLeft"), x = R("QIconArrowRight");
2012
2019
  return n(), s("div", U5, [
2013
2020
  o("button", {
2014
- class: "prev button outlined icon",
2021
+ class: "prev button sm outlined icon",
2015
2022
  onClick: v,
2016
2023
  disabled: !d.hasPrev
2017
2024
  }, [
2018
2025
  o1($, { class: "icon" })
2019
2026
  ], 8, E5),
2020
- o("div", W5, [
2021
- (n(!0), s(w1, null, p1(_.value, (z, Q) => (n(), s("div", q5, [
2027
+ t.totalPage !== 0 ? (n(), s("div", W5, [
2028
+ (n(!0), s(w1, null, p1(_.value, (b) => (n(), s("div", q5, [
2022
2029
  o("button", {
2023
- class: E(["page-indicator button plain", Q === h.value - 1 ? "active" : ""]),
2024
- disabled: z.disabled,
2025
- onClick: (O) => u(Q + 1, z)
2026
- }, D(z.label), 11, N5)
2030
+ class: E(["page-indicator button sm plain", b.label === h.value ? "active" : ""]),
2031
+ disabled: b.disabled,
2032
+ onClick: (Q) => u(b.label, b)
2033
+ }, S(b.label), 11, N5)
2027
2034
  ]))), 256))
2028
- ]),
2035
+ ])) : (n(), s("div", R5, [
2036
+ o("div", G5, S(t.modelValue), 1)
2037
+ ])),
2029
2038
  o("button", {
2030
- class: "next button outlined icon",
2039
+ class: "next button sm outlined icon",
2031
2040
  onClick: g,
2032
2041
  disabled: !d.hasNext
2033
2042
  }, [
2034
2043
  o1(x, { class: "icon" })
2035
- ], 8, R5)
2044
+ ], 8, J5)
2036
2045
  ]);
2037
2046
  };
2038
2047
  }
2039
2048
  });
2040
- const J5 = /* @__PURE__ */ r(G5, [["__scopeId", "data-v-b55d0a5e"]]), K5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2049
+ const X5 = /* @__PURE__ */ r(K5, [["__scopeId", "data-v-a325335a"]]), t7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2041
2050
  __proto__: null,
2042
2051
  QDatetimePicker: J9,
2043
2052
  QDialog: o5,
@@ -2045,16 +2054,16 @@ const J5 = /* @__PURE__ */ r(G5, [["__scopeId", "data-v-b55d0a5e"]]), K5 = /* @_
2045
2054
  QFence: d5,
2046
2055
  QLoading: f5,
2047
2056
  QMenu: L5,
2048
- QPagination: J5,
2057
+ QPagination: X5,
2049
2058
  QSwitch: z5,
2050
2059
  QTextFieldWithButton: j5
2051
2060
  }, Symbol.toStringTag, { value: "Module" }));
2052
- const t7 = {
2061
+ const n7 = {
2053
2062
  install(t, e) {
2054
2063
  e != null && e.debug && console.log("options", e);
2055
2064
  for (const [d, _] of Object.entries(F9))
2056
2065
  e != null && e.debug && console.log("[quail-ui] register icon component", d, _), t.component(d, _);
2057
- for (const [d, _] of Object.entries(K5))
2066
+ for (const [d, _] of Object.entries(t7))
2058
2067
  e != null && e.debug && console.log("[quail-ui] register cpmmon component", d, _), t.component(d, _);
2059
2068
  document.body.addEventListener("click", (d) => {
2060
2069
  g1();
@@ -2062,8 +2071,8 @@ const t7 = {
2062
2071
  }
2063
2072
  };
2064
2073
  export {
2065
- K5 as Common,
2074
+ t7 as Common,
2066
2075
  F9 as Icons,
2067
- t7 as QuailUI
2076
+ n7 as QuailUI
2068
2077
  };
2069
2078
  //# sourceMappingURL=index.js.map