pgo-ui 1.1.12 → 1.1.13

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.es.js CHANGED
@@ -4288,70 +4288,64 @@ const pt = (n, e) => {
4288
4288
  },
4289
4289
  emits: ["copy", "copy-success", "copy-error"],
4290
4290
  setup(n, { emit: e }) {
4291
- const t = n, s = e, a = B(!1), r = Re("snackbar", null), i = (c) => c && {
4292
- en: "eng-font",
4293
- // or whatever your English font is
4294
- dv: "faruma"
4295
- // Dhivehi font
4296
- // Add more languages as needed
4297
- }[c] || "";
4291
+ const t = n, s = e, a = B(!1), r = Re("snackbar", null);
4298
4292
  I(() => {
4299
4293
  const {
4300
- text: c,
4294
+ text: d,
4301
4295
  // showIcon,
4302
- showSuccessMessage: u,
4303
- successMessage: f,
4304
- successDuration: h,
4305
- ...g
4296
+ showSuccessMessage: c,
4297
+ successMessage: u,
4298
+ successDuration: f,
4299
+ ...h
4306
4300
  } = t;
4307
- return g;
4301
+ return h;
4308
4302
  });
4309
- const o = I(() => t.text || t.label || ""), l = (c) => {
4310
- c && c.stopPropagation && c.stopPropagation(), d();
4311
- }, d = async () => {
4312
- if (!(t.disabled || !o.value))
4303
+ const i = I(() => t.text || t.label || ""), o = (d) => {
4304
+ d && d.stopPropagation && d.stopPropagation(), l();
4305
+ }, l = async () => {
4306
+ if (!(t.disabled || !i.value))
4313
4307
  try {
4314
- if (await navigator.clipboard.writeText(o.value), a.value = !0, setTimeout(() => {
4308
+ if (await navigator.clipboard.writeText(i.value), a.value = !0, setTimeout(() => {
4315
4309
  a.value = !1;
4316
4310
  }, t.successDuration), t.showSuccessMessage && r) {
4317
- const c = t.successMessage || `Copied: ${o.value}`;
4311
+ const d = t.successMessage || `Copied: ${i.value}`;
4318
4312
  r.show({
4319
- message: c,
4313
+ message: d,
4320
4314
  variant: "success",
4321
4315
  duration: t.successDuration
4322
4316
  });
4323
4317
  } else
4324
4318
  console.log("No snackbar available or showSuccessMessage is false");
4325
- s("copy", o.value), s("copy-success", o.value);
4326
- } catch (c) {
4327
- console.error("Clipboard API failed:", c);
4319
+ s("copy", i.value), s("copy-success", i.value);
4320
+ } catch (d) {
4321
+ console.error("Clipboard API failed:", d);
4328
4322
  try {
4329
- const u = document.createElement("textarea");
4330
- u.value = o.value, u.style.position = "fixed", u.style.left = "-999999px", u.style.top = "-999999px", document.body.appendChild(u), u.focus(), u.select();
4331
- const f = document.execCommand("copy");
4332
- if (document.body.removeChild(u), f)
4323
+ const c = document.createElement("textarea");
4324
+ c.value = i.value, c.style.position = "fixed", c.style.left = "-999999px", c.style.top = "-999999px", document.body.appendChild(c), c.focus(), c.select();
4325
+ const u = document.execCommand("copy");
4326
+ if (document.body.removeChild(c), u)
4333
4327
  a.value = !0, setTimeout(() => {
4334
4328
  a.value = !1;
4335
- }, t.successDuration), s("copy-success", o.value);
4329
+ }, t.successDuration), s("copy-success", i.value);
4336
4330
  else
4337
4331
  throw new Error("execCommand failed");
4338
- } catch (u) {
4339
- console.error("Fallback copy also failed:", u), s("copy-error", u), r && r.show({
4332
+ } catch (c) {
4333
+ console.error("Fallback copy also failed:", c), s("copy-error", c), r && r.show({
4340
4334
  message: "Failed to copy text",
4341
4335
  variant: "error"
4342
4336
  });
4343
4337
  }
4344
4338
  }
4345
4339
  };
4346
- return (c, u) => {
4347
- const f = Ui("tooltip");
4340
+ return (d, c) => {
4341
+ const u = Ui("tooltip");
4348
4342
  return Ze((A(), M("div", {
4349
- class: q(["cursor-pointer hover:text-gray-800 font-normal ", i(n.lang)]),
4350
- onClick: l
4343
+ class: q(["cursor-pointer hover:text-gray-800 font-normal font-en"]),
4344
+ onClick: o
4351
4345
  }, [
4352
4346
  Se(ne(n.text), 1)
4353
- ], 2)), [
4354
- [f, { en: "Copy", dv: "ކޮޕީ" }]
4347
+ ])), [
4348
+ [u, { en: "Copy", dv: "ކޮޕީ" }]
4355
4349
  ]);
4356
4350
  };
4357
4351
  }
@@ -4859,7 +4853,7 @@ const pt = (n, e) => {
4859
4853
  return fe === "dv" ? "ދިވެހި" : (fe || "en").toUpperCase();
4860
4854
  });
4861
4855
  function ie(Y) {
4862
- typeof Z == "function" && Z(Y), window.location.reload(), G.value = !1;
4856
+ typeof Z == "function" && Z(Y), G.value = !1;
4863
4857
  }
4864
4858
  function ve() {
4865
4859
  G.value = !1, h.value = !1, H.value = !1;