@citizenplane/pimp 18.25.0 → 18.25.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CpMenu.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpMenu.vue"],"names":[],"mappings":"AA+DA;AAwTA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAajD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,KAAK,CAAA;AAE7C,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,CAAC,EAAE,eAAe,CAAA;CAC5B;AA4YD,QAAA,IAAI,OAAO,IAAU,EAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAuB,QAAQ,IAAY,CAAE;AACjI,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAShD,QAAA,MAAM,UAAU;kBA5VK,KAAK;;oBAmBH,KAAK;;;;;;;;WAxFlB,MAAM;eAMF,eAAe;WAFnB,QAAQ,EAAE;iBAHJ,MAAM;wBAEC,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A;CAAE,CAAC;AAShD,QAAA,MAAM,UAAU;kBAtXK,KAAK;;oBAmBH,KAAK;;;;;;;;WAzFlB,MAAM;eAMF,eAAe;WAFnB,QAAQ,EAAE;iBAHJ,MAAM;wBAEC,OAAO;qBAEV,OAAO;6EA4bzB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
package/dist/pimp.es.js CHANGED
@@ -30335,14 +30335,14 @@ var II = ["id"], LI = ["role"], RI = /* @__PURE__ */ h({
30335
30335
  },
30336
30336
  emits: ["hide", "show"],
30337
30337
  setup(e, { expose: t, emit: n }) {
30338
- let r = e, i = n, o = N(null), d = N(), f = N(null), p = N(!1), h = z(), g = Zu(Xu.TABLET), _ = a(() => g.value && !r.forcePopover), v = a(() => r.items?.length), y = a(() => v.value ? "menu" : "dialog"), b = a(() => ({
30338
+ let r = e, i = n, o = N(null), d = N(), f = N(null), p = N(!1), h = se(null), g = z(), _ = Zu(Xu.TABLET), v = a(() => _.value && !r.forcePopover), y = a(() => r.items?.length), b = a(() => y.value ? "menu" : "dialog"), x = a(() => ({
30339
30339
  root: { class: ["cpMenu__menu", r.class] },
30340
30340
  content: { class: "cpMenu__menuContent" },
30341
30341
  transition: {
30342
30342
  name: "scale-elastic",
30343
30343
  duration: 100
30344
30344
  }
30345
- })), x = a(() => ({ "cpMenu__drawerOverlay--isOpen": p.value })), S = {
30345
+ })), S = a(() => ({ "cpMenu__drawerOverlay--isOpen": p.value })), C = {
30346
30346
  root: { class: [
30347
30347
  "cpMenu__drawer",
30348
30348
  { "cpMenu__drawer--isFullHeight": r.isFullHeightDrawer },
@@ -30354,68 +30354,78 @@ var II = ["id"], LI = ["role"], RI = /* @__PURE__ */ h({
30354
30354
  name: "drawer",
30355
30355
  duration: 300
30356
30356
  }
30357
- }, C = a(() => r.placement === "end"), E = (e) => {
30358
- _.value ? p.value = !0 : d.value?.show(e, o.value), i("show");
30359
- }, D = () => {
30360
- _.value ? p.value = !1 : d.value?.hide(), i("hide");
30357
+ }, E = a(() => r.placement === "end"), D = (e) => {
30358
+ v.value ? p.value = !0 : d.value?.show(e, o.value), i("show");
30361
30359
  }, O = () => {
30362
- r.keepOpenOnClick || D();
30363
- }, k = (e) => {
30364
- _.value ? p.value = !p.value : d.value?.toggle(e, o.value);
30365
- }, A = () => {
30360
+ v.value ? p.value = !1 : d.value?.hide(), i("hide");
30361
+ }, k = () => {
30362
+ r.keepOpenOnClick || O();
30363
+ }, A = (e) => {
30364
+ v.value ? p.value = !p.value : d.value?.toggle(e, o.value);
30365
+ }, j = () => {
30366
30366
  if (!o.value) return;
30367
30367
  let [e] = AM(o.value);
30368
30368
  e?.focus();
30369
- }, j = () => {
30370
- w(() => (f.value?.$el)?.focus());
30371
30369
  }, ee = () => {
30372
- p.value = !1, A(), i("hide");
30370
+ w(() => (f.value?.$el)?.focus());
30373
30371
  }, te = () => {
30374
- if (!d.value) return;
30372
+ p.value = !1, h.value = null, j(), i("hide");
30373
+ }, ne = () => {
30374
+ if (!d.value) return null;
30375
30375
  let { container: e, target: t } = d.value;
30376
- if (!e || !t) return;
30377
- let n = t.offsetWidth, r = e.offsetWidth;
30378
- e.style.marginLeft = `${(r - n) * -1}px`;
30379
- }, ne = async () => {
30380
- p.value = !0, C.value && te(), i("show");
30376
+ return !e || !t ? null : {
30377
+ popoverElement: e,
30378
+ triggerElement: t
30379
+ };
30380
+ }, re = (e) => (e.offsetParent?.getBoundingClientRect().left ?? 0) + e.offsetLeft + e.offsetWidth, ie = () => {
30381
+ let e = ne();
30382
+ if (!e) return;
30383
+ let { popoverElement: t, triggerElement: n } = e;
30384
+ t.style.marginLeft = "";
30385
+ let r = re(t) - n.getBoundingClientRect().right;
30386
+ r && (t.style.marginLeft = `${r * -1}px`);
30387
+ };
30388
+ qu(h, ie);
30389
+ let P = async () => {
30390
+ p.value = !0, i("show"), E.value && (await w(), ie(), h.value = ne()?.popoverElement ?? null);
30381
30391
  };
30382
30392
  return t({
30383
- show: E,
30384
- hide: D,
30385
- toggle: k
30393
+ show: D,
30394
+ hide: O,
30395
+ toggle: A
30386
30396
  }), (t, n) => (M(), l("div", zI, [
30387
- _.value ? (M(), l("div", {
30397
+ v.value ? (M(), l("div", {
30388
30398
  key: 0,
30389
- class: T(["cpMenu__drawerOverlay", x.value])
30399
+ class: T(["cpMenu__drawerOverlay", S.value])
30390
30400
  }, null, 2)) : c("", !0),
30391
30401
  u("div", BI, [u("div", {
30392
30402
  ref_key: "trigger",
30393
30403
  ref: o,
30394
- "aria-controls": R(h),
30404
+ "aria-controls": R(g),
30395
30405
  "aria-expanded": p.value,
30396
- "aria-haspopup": y.value,
30406
+ "aria-haspopup": b.value,
30397
30407
  class: "cpMenu__trigger",
30398
- onClick: k
30399
- }, [F(t.$slots, "trigger")], 8, VI), _.value ? c("", !0) : (M(), s(R(NI), {
30408
+ onClick: A
30409
+ }, [F(t.$slots, "trigger")], 8, VI), v.value ? c("", !0) : (M(), s(R(NI), {
30400
30410
  key: 0,
30401
30411
  ref_key: "popover",
30402
30412
  ref: d,
30403
30413
  "close-on-escape": "",
30404
30414
  dismissable: "",
30405
- pt: b.value,
30406
- onHide: ee,
30407
- onShow: ne
30415
+ pt: x.value,
30416
+ onHide: te,
30417
+ onShow: P
30408
30418
  }, {
30409
- default: V(() => [v.value ? (M(), s(RI, {
30419
+ default: V(() => [y.value ? (M(), s(RI, {
30410
30420
  key: 0,
30411
- id: R(h),
30421
+ id: R(g),
30412
30422
  items: e.items,
30413
- onAsyncComplete: O,
30414
- onClick: O
30423
+ onAsyncComplete: k,
30424
+ onClick: k
30415
30425
  }, null, 8, ["id", "items"])) : F(t.$slots, "default", { key: 1 })]),
30416
30426
  _: 3
30417
30427
  }, 8, ["pt"]))]),
30418
- _.value ? (M(), s(R(bI), {
30428
+ v.value ? (M(), s(R(bI), {
30419
30429
  key: 1,
30420
30430
  visible: p.value,
30421
30431
  "onUpdate:visible": n[0] ||= (e) => p.value = e,
@@ -30424,10 +30434,10 @@ var II = ["id"], LI = ["role"], RI = /* @__PURE__ */ h({
30424
30434
  "close-on-escape": "",
30425
30435
  dismissable: "",
30426
30436
  position: "bottom",
30427
- pt: S,
30437
+ pt: C,
30428
30438
  "show-close-icon": !1,
30429
- onAfterShow: j,
30430
- onHide: ee
30439
+ onAfterShow: ee,
30440
+ onHide: te
30431
30441
  }, {
30432
30442
  default: V(() => [u("div", HI, [u("div", UI, [F(t.$slots, "title")]), m(fk, {
30433
30443
  ref_key: "closeButton",
@@ -30437,16 +30447,16 @@ var II = ["id"], LI = ["role"], RI = /* @__PURE__ */ h({
30437
30447
  color: "neutral",
30438
30448
  "is-square": "",
30439
30449
  size: "md",
30440
- onClick: D
30450
+ onClick: O
30441
30451
  }, {
30442
30452
  "leading-icon": V(() => [m(xD, { type: "x" })]),
30443
30453
  _: 1
30444
- }, 512)]), v.value ? (M(), s(RI, {
30454
+ }, 512)]), y.value ? (M(), s(RI, {
30445
30455
  key: 0,
30446
- id: R(h),
30456
+ id: R(g),
30447
30457
  items: e.items,
30448
- onAsyncComplete: O,
30449
- onClick: O
30458
+ onAsyncComplete: k,
30459
+ onClick: k
30450
30460
  }, null, 8, ["id", "items"])) : F(t.$slots, "default", { key: 1 })]),
30451
30461
  _: 3
30452
30462
  }, 8, ["visible"])) : c("", !0)