@citizenplane/pimp 9.15.0 → 9.15.2

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/pimp.es.js CHANGED
@@ -28210,17 +28210,9 @@ const _M = { class: "cpToast__inner" }, SM = { class: "cpToast__content" }, IM =
28210
28210
  class: "cpToast__actions"
28211
28211
  }, kM = /* @__PURE__ */ pe({
28212
28212
  __name: "CpToast",
28213
- props: {
28214
- detail: { default: "" },
28215
- hideTimer: { type: Boolean, default: !1 },
28216
- primaryAction: { default: void 0 },
28217
- secondaryAction: { default: void 0 },
28218
- severity: {},
28219
- summary: {}
28220
- },
28221
28213
  setup(t) {
28222
- const e = t, n = (l) => !e.hideTimer && l !== void 0, o = (l) => `cpToast--is${wt(l)}`, i = (l) => {
28223
- switch (l) {
28214
+ const e = (a) => !a.hideTimer && a.life !== void 0, n = (a) => `cpToast--is${wt(a)}`, o = (a) => {
28215
+ switch (a) {
28224
28216
  case On.ERROR:
28225
28217
  return "alert-octagon";
28226
28218
  case On.INFO:
@@ -28232,8 +28224,8 @@ const _M = { class: "cpToast__inner" }, SM = { class: "cpToast__content" }, IM =
28232
28224
  default:
28233
28225
  return "intent";
28234
28226
  }
28235
- }, r = (l) => {
28236
- switch (l) {
28227
+ }, i = (a) => {
28228
+ switch (a) {
28237
28229
  case On.ERROR:
28238
28230
  return "red";
28239
28231
  case On.SUCCESS:
@@ -28243,72 +28235,72 @@ const _M = { class: "cpToast__inner" }, SM = { class: "cpToast__content" }, IM =
28243
28235
  default:
28244
28236
  return "purple";
28245
28237
  }
28246
- }, s = (l) => !!l.primaryAction || !!l.secondaryAction, a = (l) => ({ animationDuration: `${l}ms` });
28247
- return (l, d) => {
28248
- const u = ie("cp-icon"), c = ie("cp-button");
28238
+ }, r = (a) => !!a.primaryAction || !!a.secondaryAction, s = (a) => ({ animationDuration: `${a}ms` });
28239
+ return (a, l) => {
28240
+ const d = ie("cp-icon"), u = ie("cp-button");
28249
28241
  return f(), J(ke(Xu), { class: "cpToasts" }, {
28250
- container: q(({ message: h, closeCallback: p }) => [
28242
+ container: q(({ message: c, closeCallback: h }) => [
28251
28243
  v("div", {
28252
- class: ee(["cpToast", o(h.severity)])
28244
+ class: ee(["cpToast", n(c.severity)])
28253
28245
  }, [
28254
28246
  v("div", _M, [
28255
- G(u, {
28247
+ G(d, {
28256
28248
  class: "cpToast__icon",
28257
28249
  size: "16",
28258
- type: i(h.severity)
28250
+ type: o(c.severity)
28259
28251
  }, null, 8, ["type"]),
28260
28252
  v("div", SM, [
28261
- v("span", IM, z(h.summary), 1),
28262
- h.detail ? (f(), g("span", MM, z(h.detail), 1)) : E("", !0)
28253
+ v("span", IM, z(c.summary), 1),
28254
+ c.detail ? (f(), g("span", MM, z(c.detail), 1)) : E("", !0)
28263
28255
  ]),
28264
28256
  v("button", {
28265
28257
  class: "cpToast__close",
28266
28258
  type: "button",
28267
- onClick: p
28259
+ onClick: h
28268
28260
  }, [
28269
- G(u, {
28261
+ G(d, {
28270
28262
  class: "cpToast__icon cpToast__icon--isClose",
28271
28263
  size: "16",
28272
28264
  type: "x"
28273
28265
  })
28274
28266
  ], 8, LM)
28275
28267
  ]),
28276
- s(h) ? (f(), g("div", OM, [
28277
- h.primaryAction ? (f(), J(c, {
28268
+ r(c) ? (f(), g("div", OM, [
28269
+ c.primaryAction ? (f(), J(u, {
28278
28270
  key: 0,
28279
28271
  appearance: "primary",
28280
28272
  class: "cpToast__action",
28281
- color: r(h.severity),
28273
+ color: i(c.severity),
28282
28274
  "is-square": "",
28283
28275
  size: "sm",
28284
- onClick: h.primaryAction.onClick
28276
+ onClick: c.primaryAction.onClick
28285
28277
  }, {
28286
28278
  default: q(() => [
28287
- Te(z(h.primaryAction.label), 1)
28279
+ Te(z(c.primaryAction.label), 1)
28288
28280
  ]),
28289
28281
  _: 2
28290
28282
  }, 1032, ["color", "onClick"])) : E("", !0),
28291
- h.secondaryAction ? (f(), J(c, {
28283
+ c.secondaryAction ? (f(), J(u, {
28292
28284
  key: 1,
28293
28285
  appearance: "minimal",
28294
28286
  class: "cpToast__action",
28295
- color: r(h.severity),
28287
+ color: i(c.severity),
28296
28288
  "is-square": "",
28297
28289
  size: "sm",
28298
- onClick: h.secondaryAction.onClick
28290
+ onClick: c.secondaryAction.onClick
28299
28291
  }, {
28300
28292
  default: q(() => [
28301
- Te(z(h.secondaryAction.label), 1)
28293
+ Te(z(c.secondaryAction.label), 1)
28302
28294
  ]),
28303
28295
  _: 2
28304
28296
  }, 1032, ["color", "onClick"])) : E("", !0)
28305
28297
  ])) : E("", !0),
28306
- n(h.life) ? (f(), g("div", {
28298
+ e(c) ? (f(), g("div", {
28307
28299
  key: 1,
28308
28300
  "aria-hidden": "true",
28309
28301
  class: "cpToast__timer",
28310
28302
  role: "presentation",
28311
- style: $t(a(h.life))
28303
+ style: $t(s(c.life))
28312
28304
  }, null, 4)) : E("", !0)
28313
28305
  ], 2)
28314
28306
  ]),