@citizenplane/pimp 14.1.5 → 15.0.0

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
@@ -2905,7 +2905,7 @@ var kt = Gu(), Ku = Object.defineProperty, Yu = Object.defineProperties, qu = Ob
2905
2905
  for (var i in t) Jl.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
2906
2906
  if (t != null && bi) for (var i of bi(t)) e.indexOf(i) < 0 && Xl.call(t, i) && (n[i] = t[i]);
2907
2907
  return n;
2908
- }, Ju = Ei(), Ee = Ju, pn = /{([^}]*)}/g, Ql = /(\d+\s+[\+\-\*\/]\s+\d+)/g, e2 = /var\([^)]+\)/g;
2908
+ }, Ju = Ei(), De = Ju, pn = /{([^}]*)}/g, Ql = /(\d+\s+[\+\-\*\/]\s+\d+)/g, e2 = /var\([^)]+\)/g;
2909
2909
  function Os(t) {
2910
2910
  return Ye(t) ? t.replace(/[A-Z]/g, (e, n) => n === 0 ? e : "." + e.toLowerCase()).toLowerCase() : t;
2911
2911
  }
@@ -3150,15 +3150,15 @@ var st = { regex: { rules: { class: { pattern: /^\.([a-zA-Z][\w-]*)$/, resolve(t
3150
3150
  }, getTheme() {
3151
3151
  return this.theme;
3152
3152
  }, setTheme(t) {
3153
- this.update({ theme: t }), Ee.emit("theme:change", t);
3153
+ this.update({ theme: t }), De.emit("theme:change", t);
3154
3154
  }, getPreset() {
3155
3155
  return this.preset;
3156
3156
  }, setPreset(t) {
3157
- this._theme = po(ut({}, this.theme), { preset: t }), this._tokens = st.createTokens(t, this.defaults), this.clearLoadedStyleNames(), Ee.emit("preset:change", t), Ee.emit("theme:change", this.theme);
3157
+ this._theme = po(ut({}, this.theme), { preset: t }), this._tokens = st.createTokens(t, this.defaults), this.clearLoadedStyleNames(), De.emit("preset:change", t), De.emit("theme:change", this.theme);
3158
3158
  }, getOptions() {
3159
3159
  return this.options;
3160
3160
  }, setOptions(t) {
3161
- this._theme = po(ut({}, this.theme), { options: t }), this.clearLoadedStyleNames(), Ee.emit("options:change", t), Ee.emit("theme:change", this.theme);
3161
+ this._theme = po(ut({}, this.theme), { options: t }), this.clearLoadedStyleNames(), De.emit("options:change", t), De.emit("theme:change", this.theme);
3162
3162
  }, getLayerNames() {
3163
3163
  return [...this._layerNames];
3164
3164
  }, setLayerNames(t) {
@@ -3199,7 +3199,7 @@ var st = { regex: { rules: { class: { pattern: /^\.([a-zA-Z][\w-]*)$/, resolve(t
3199
3199
  }, onStyleUpdated(t) {
3200
3200
  this._loadingStyles.add(t);
3201
3201
  }, onStyleLoaded(t, { name: e }) {
3202
- this._loadingStyles.size && (this._loadingStyles.delete(e), Ee.emit(`theme:${e}:load`, t), !this._loadingStyles.size && Ee.emit("theme:load"));
3202
+ this._loadingStyles.size && (this._loadingStyles.delete(e), De.emit(`theme:${e}:load`, t), !this._loadingStyles.size && De.emit("theme:load"));
3203
3203
  } }, He = {
3204
3204
  STARTS_WITH: "startsWith",
3205
3205
  CONTAINS: "contains",
@@ -3803,7 +3803,7 @@ function I3(t, e) {
3803
3803
  }
3804
3804
  var w1 = [];
3805
3805
  function M3() {
3806
- Ee.clear(), w1.forEach(function(t) {
3806
+ De.clear(), w1.forEach(function(t) {
3807
3807
  return t?.();
3808
3808
  }), w1 = [];
3809
3809
  }
@@ -3825,7 +3825,7 @@ function L3(t, e) {
3825
3825
  }, $), C), $e.setLoadedStyleName("common");
3826
3826
  }
3827
3827
  };
3828
- Ee.on("theme:change", function(l) {
3828
+ De.on("theme:change", function(l) {
3829
3829
  n.value || (t.config.globalProperties.$primevue.config.theme = l, n.value = !0);
3830
3830
  });
3831
3831
  var o = Le(e.config, function(l, d) {
@@ -18478,13 +18478,13 @@ const Zr = /* @__PURE__ */ I(zg, [["render", sC]]), aC = { class: "cpAccordion"
18478
18478
  }) => {
18479
18479
  let o = "";
18480
18480
  return t && (o = L.fromISO(t).toFormat(n, { locale: i })), e && (o += " - " + L.fromISO(e).toFormat(n, { locale: i })), o;
18481
- }, De = (t) => typeof t != "string" ? "" : t.charAt(0).toUpperCase() + t.slice(1), gC = /* @__PURE__ */ ie({
18481
+ }, Ee = (t) => typeof t != "string" ? "" : t.charAt(0).toUpperCase() + t.slice(1), gC = /* @__PURE__ */ ie({
18482
18482
  __name: "CpAccordionGroup",
18483
18483
  props: {
18484
18484
  variant: { default: "minimal" }
18485
18485
  },
18486
18486
  setup(t) {
18487
- const e = t, n = x(() => ({ [`cpAccordionGroup--is${De(e.variant)}`]: !0 }));
18487
+ const e = t, n = x(() => ({ [`cpAccordionGroup--is${Ee(e.variant)}`]: !0 }));
18488
18488
  return (i, o) => (h(), y("div", {
18489
18489
  class: Y(["cpAccordionGroup", n.value])
18490
18490
  }, [
@@ -18568,64 +18568,63 @@ const Zr = /* @__PURE__ */ I(zg, [["render", sC]]), aC = { class: "cpAccordion"
18568
18568
  ], 2)) : M("", !0);
18569
18569
  };
18570
18570
  }
18571
- }), IC = { class: "cpBadge__label" }, MC = ["disabled"], LC = /* @__PURE__ */ ie({
18571
+ }), IC = {
18572
+ key: 0,
18573
+ class: "cpBadge__label"
18574
+ }, MC = ["disabled"], LC = /* @__PURE__ */ ie({
18572
18575
  __name: "CpBadge",
18573
18576
  props: {
18574
- color: { default: "gray" },
18575
- isClearable: { type: Boolean },
18576
- isDashed: { type: Boolean },
18577
- isDisabled: { type: Boolean },
18578
- isSolid: { type: Boolean },
18577
+ color: { default: "neutral" },
18578
+ disabled: { type: Boolean },
18579
+ hasClose: { type: Boolean },
18579
18580
  isSquare: { type: Boolean },
18580
- isStroked: { type: Boolean },
18581
18581
  label: { default: "" },
18582
18582
  leadingIcon: { default: "" },
18583
18583
  size: { default: "md" },
18584
+ style: { default: "outline" },
18584
18585
  trailingIcon: { default: "" }
18585
18586
  },
18586
18587
  emits: ["onClear"],
18587
18588
  setup(t, { emit: e }) {
18588
18589
  const n = t, i = e, o = x(() => [
18589
18590
  `cpBadge--${n.size}`,
18590
- `cpBadge--is${De(n.color)}`,
18591
- { "cpBadge--isStroked": n.isStroked },
18591
+ `cpBadge--is${Ee(n.color)}`,
18592
+ `cpBadge--is${Ee(n.style)}`,
18592
18593
  { "cpBadge--isSquare": n.isSquare },
18593
- { "cpBadge--isDashed": n.isDashed },
18594
- { "cpBadge--isDisabled": n.isDisabled },
18595
- { "cpBadge--isSolid": n.isSolid }
18596
- ]), r = () => i("onClear");
18597
- return (s, a) => {
18598
- const l = J("cp-icon");
18594
+ { "cpBadge--isDisabled": n.disabled }
18595
+ ]);
18596
+ return (r, s) => {
18597
+ const a = J("cp-icon");
18599
18598
  return h(), y("div", {
18600
18599
  class: Y(["cpBadge", o.value])
18601
18600
  }, [
18602
- N(s.$slots, "leading-icon", {}, () => [
18603
- t.leadingIcon ? (h(), U(l, {
18601
+ N(r.$slots, "leading-icon", {}, () => [
18602
+ t.leadingIcon ? (h(), U(a, {
18604
18603
  key: 0,
18605
18604
  class: "cpBadge__icon",
18606
18605
  type: t.leadingIcon
18607
18606
  }, null, 8, ["type"])) : M("", !0)
18608
18607
  ]),
18609
- v("span", IC, [
18610
- N(s.$slots, "default", {}, () => [
18608
+ t.label ? (h(), y("span", IC, [
18609
+ N(r.$slots, "default", {}, () => [
18611
18610
  xe(E(t.label), 1)
18612
18611
  ])
18613
- ]),
18614
- t.isClearable ? M("", !0) : N(s.$slots, "trailing-icon", { key: 0 }, () => [
18615
- t.trailingIcon ? (h(), U(l, {
18612
+ ])) : M("", !0),
18613
+ t.hasClose ? M("", !0) : N(r.$slots, "trailing-icon", { key: 1 }, () => [
18614
+ t.trailingIcon ? (h(), U(a, {
18616
18615
  key: 0,
18617
18616
  class: "cpBadge__icon",
18618
18617
  type: t.trailingIcon
18619
18618
  }, null, 8, ["type"])) : M("", !0)
18620
18619
  ]),
18621
- t.isClearable ? (h(), y("button", {
18622
- key: 1,
18620
+ t.hasClose ? (h(), y("button", {
18621
+ key: 2,
18623
18622
  class: "cpBadge__clear",
18624
- disabled: t.isDisabled,
18623
+ disabled: t.disabled,
18625
18624
  type: "button",
18626
- onClick: r
18625
+ onClick: s[0] || (s[0] = (l) => i("onClear"))
18627
18626
  }, [
18628
- W(l, {
18627
+ W(a, {
18629
18628
  class: "cpBadge__clearIcon",
18630
18629
  type: "x"
18631
18630
  })
@@ -18823,7 +18822,7 @@ const _1 = {
18823
18822
  size: { default: "sm" }
18824
18823
  },
18825
18824
  setup(t) {
18826
- const e = t, n = x(() => `${e.duration}ms`), i = x(() => [`cpLoader--is${De(e.color)}`, `cpLoader--${e.size}`]);
18825
+ const e = t, n = x(() => `${e.duration}ms`), i = x(() => [`cpLoader--is${Ee(e.color)}`, `cpLoader--${e.size}`]);
18827
18826
  return (o, r) => (h(), y("svg", {
18828
18827
  id: "loader-1",
18829
18828
  class: Y(["cpLoader", i.value]),
@@ -18881,7 +18880,7 @@ const _1 = {
18881
18880
  type: { default: "button" }
18882
18881
  },
18883
18882
  setup(t) {
18884
- const e = t, n = Vt(), { trigger: i } = Wr(), o = x(() => De(e.appearance)), r = x(() => De(e.color)), s = x(() => !!n.default), a = x(() => !!n["leading-icon"]), l = x(() => !!n["trailing-icon"]), d = x(() => e.disabled || e.isLoading), u = x(() => [
18883
+ const e = t, n = Vt(), { trigger: i } = Wr(), o = x(() => Ee(e.appearance)), r = x(() => Ee(e.color)), s = x(() => !!n.default), a = x(() => !!n["leading-icon"]), l = x(() => !!n["trailing-icon"]), d = x(() => e.disabled || e.isLoading), u = x(() => [
18885
18884
  `cpButton--is${o.value}`,
18886
18885
  `cpButton--${e.size}`,
18887
18886
  {
@@ -19018,7 +19017,7 @@ const _1 = {
19018
19017
  }),
19019
19018
  emits: /* @__PURE__ */ wt(["update:modelValue"], ["update:modelValue"]),
19020
19019
  setup(t, { emit: e }) {
19021
- const n = t, i = e, o = hl(), { ["class"]: r, id: s, ...a } = o, l = q(s || Ie()), d = Ie(), u = Ie(), c = x(() => `${d} ${u}`), p = Vt(), f = x(() => De(n.label)), m = P1(t, "modelValue", {
19020
+ const n = t, i = e, o = hl(), { ["class"]: r, id: s, ...a } = o, l = q(s || Ie()), d = Ie(), u = Ie(), c = x(() => `${d} ${u}`), p = Vt(), f = x(() => Ee(n.label)), m = P1(t, "modelValue", {
19022
19021
  set(oe) {
19023
19022
  return ee(oe), oe;
19024
19023
  }
@@ -19320,7 +19319,7 @@ const _1 = {
19320
19319
  },
19321
19320
  { immediate: !0 }
19322
19321
  );
19323
- const s = x(() => Array.isArray(n.modelValue) ? n.modelValue.includes(n.checkboxValue) : n.modelValue), a = x(() => De(n.color)), l = x(() => n.indeterminate ? "minus" : "check"), d = Vt(), u = x(() => !!d.default), c = x(() => !u.value && !n.checkboxLabel), p = x(() => [
19322
+ const s = x(() => Array.isArray(n.modelValue) ? n.modelValue.includes(n.checkboxValue) : n.modelValue), a = x(() => Ee(n.color)), l = x(() => n.indeterminate ? "minus" : "check"), d = Vt(), u = x(() => !!d.default), c = x(() => !u.value && !n.checkboxLabel), p = x(() => [
19324
19323
  {
19325
19324
  "cpCheckbox--isEmpty": c.value,
19326
19325
  "cpCheckbox--isDisabled": n.isDisabled,
@@ -19550,14 +19549,14 @@ var qt = {
19550
19549
  isUnstyled: {
19551
19550
  immediate: !0,
19552
19551
  handler: function(e) {
19553
- Ee.off("theme:change", this._loadCoreStyles), e || (this._loadCoreStyles(), this._themeChangeListener(this._loadCoreStyles));
19552
+ De.off("theme:change", this._loadCoreStyles), e || (this._loadCoreStyles(), this._themeChangeListener(this._loadCoreStyles));
19554
19553
  }
19555
19554
  },
19556
19555
  dt: {
19557
19556
  immediate: !0,
19558
19557
  handler: function(e, n) {
19559
19558
  var i = this;
19560
- Ee.off("theme:change", this._themeScopedListener), e ? (this._loadScopedThemeStyles(e), this._themeScopedListener = function() {
19559
+ De.off("theme:change", this._themeScopedListener), e ? (this._loadScopedThemeStyles(e), this._themeScopedListener = function() {
19561
19560
  return i._loadScopedThemeStyles(e);
19562
19561
  }, this._themeChangeListener(this._themeScopedListener)) : this._unloadScopedThemeStyles();
19563
19562
  }
@@ -19671,10 +19670,10 @@ var qt = {
19671
19670
  _themeChangeListener: function() {
19672
19671
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function() {
19673
19672
  };
19674
- zt.clearLoadedStyleNames(), Ee.on("theme:change", e);
19673
+ zt.clearLoadedStyleNames(), De.on("theme:change", e);
19675
19674
  },
19676
19675
  _removeThemeListeners: function() {
19677
- Ee.off("theme:change", this._loadCoreStyles), Ee.off("theme:change", this._load), Ee.off("theme:change", this._themeScopedListener);
19676
+ De.off("theme:change", this._loadCoreStyles), De.off("theme:change", this._load), De.off("theme:change", this._themeScopedListener);
19678
19677
  },
19679
19678
  _getHostInstance: function(e) {
19680
19679
  return e ? this.$options.hostName ? e.$.type.name === this.$options.hostName ? e : this._getHostInstance(e.$parentInstance) : e.$parentInstance : void 0;
@@ -20379,11 +20378,11 @@ var ae = {
20379
20378
  _themeChangeListener: function() {
20380
20379
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function() {
20381
20380
  };
20382
- zt.clearLoadedStyleNames(), Ee.on("theme:change", e);
20381
+ zt.clearLoadedStyleNames(), De.on("theme:change", e);
20383
20382
  },
20384
20383
  _removeThemeListeners: function() {
20385
20384
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
20386
- Ee.off("theme:change", e.$loadStyles), e.$loadStyles = void 0;
20385
+ De.off("theme:change", e.$loadStyles), e.$loadStyles = void 0;
20387
20386
  },
20388
20387
  _hook: function(e, n, i, o, r, s) {
20389
20388
  var a, l, d = "on".concat(Au(n)), u = ae._getConfig(o, r), c = i?.$instance, p = ae._usePT(c, ae._getPT(o == null || (a = o.value) === null || a === void 0 ? void 0 : a.pt, e), ae._getOptionValue, "hooks.".concat(d)), f = ae._useDefaultPT(c, u == null || (l = u.pt) === null || l === void 0 || (l = l.directives) === null || l === void 0 ? void 0 : l[e], ae._getOptionValue, "hooks.".concat(d)), m = {
@@ -21581,12 +21580,12 @@ const hb = { class: "cpMenuItem" }, fb = ["disabled"], mb = {
21581
21580
  },
21582
21581
  emits: ["update:modelValue", "onValidation"],
21583
21582
  setup(t, { emit: e }) {
21584
- const n = t, i = e, o = (te) => L.fromISO(n.modelValue).invalid ? "" : L.fromISO(n.modelValue)[te], r = q(o("day")), s = q(o("month")), a = q(o("year")), l = x(() => De(n.label)), d = Ie(), u = x(() => g.value.year), c = x(() => C.value.year), p = x(() => L.fromObject({
21583
+ const n = t, i = e, o = (te) => L.fromISO(n.modelValue).invalid ? "" : L.fromISO(n.modelValue)[te], r = q(o("day")), s = q(o("month")), a = q(o("year")), l = x(() => Ee(n.label)), d = Ie(), u = x(() => g.value.year), c = x(() => C.value.year), p = x(() => L.fromObject({
21585
21584
  year: a.value && a.value.length <= 4 ? Number(a.value) : L.now().year,
21586
21585
  month: s.value ? Number(s.value) : L.now().month,
21587
21586
  day: 1
21588
21587
  }).daysInMonth), f = x(() => vt.months("long", { locale: n.locale }).map((G, re) => ({
21589
- label: De(G),
21588
+ label: Ee(G),
21590
21589
  value: re + 1
21591
21590
  }))), m = x(() => L.fromObject({
21592
21591
  year: Number(a.value),
@@ -25365,7 +25364,7 @@ const fx = {
25365
25364
  "cpRadio--isActive": a(d),
25366
25365
  "cpRadio--isDisabled": u
25367
25366
  },
25368
- `cpRadio--is${De(n.color)}`
25367
+ `cpRadio--is${Ee(n.color)}`
25369
25368
  ];
25370
25369
  return (d, u) => (h(), y("div", null, [
25371
25370
  (h(!0), y(le, null, be(t.options, ({ label: c, value: p, description: f, additionalData: m, disabled: g }, C) => (h(), y("label", {
@@ -25415,7 +25414,7 @@ const fx = {
25415
25414
  }),
25416
25415
  emits: ["update:modelValue"],
25417
25416
  setup(t) {
25418
- const e = t, n = P1(t, "modelValue"), i = Ie(), o = Ie(), r = Ie(), s = x(() => De(e.label)), a = x(() => [
25417
+ const e = t, n = P1(t, "modelValue"), i = Ie(), o = Ie(), r = Ie(), s = x(() => Ee(e.label)), a = x(() => [
25419
25418
  `cpSelect--${e.size}`,
25420
25419
  {
25421
25420
  "cpSelect--isInvalid": e.isInvalid,
@@ -25498,7 +25497,7 @@ const fx = {
25498
25497
  setup(t) {
25499
25498
  const e = t, n = Vt(), i = x(() => !!n["leading-icon"]), o = x(() => !!e.label), r = x(() => !!n["trailing-icon"]), s = x(() => [
25500
25499
  `cpSelectableButton--${e.size}`,
25501
- `cpSelectableButton--is${De(e.appearance)}`,
25500
+ `cpSelectableButton--is${Ee(e.appearance)}`,
25502
25501
  {
25503
25502
  "cpSelectableButton--isSelected": e.isSelected,
25504
25503
  "cpSelectableButton--isExpanded": e.isExpanded,
@@ -25652,7 +25651,7 @@ const fx = {
25652
25651
  subcontent: { default: "" }
25653
25652
  },
25654
25653
  setup(t) {
25655
- const e = t, n = Ie(), i = Vt(), o = x(() => !!(e.subcontent || i.subcontent)), r = x(() => [`cpTooltip--is${De(e.color)}`]);
25654
+ const e = t, n = Ie(), i = Vt(), o = x(() => !!(e.subcontent || i.subcontent)), r = x(() => [`cpTooltip--is${Ee(e.color)}`]);
25656
25655
  return (s, a) => (h(), U(ge(hu), {
25657
25656
  "aria-id": ge(n),
25658
25657
  class: Y(["cpTooltip", r.value]),
@@ -25710,7 +25709,7 @@ const fx = {
25710
25709
  },
25711
25710
  emits: ["update:modelValue"],
25712
25711
  setup(t, { emit: e }) {
25713
- const n = t, i = e, { trigger: o } = Wr(), r = Ie(), s = x(() => De(n.color)), a = x(() => [
25712
+ const n = t, i = e, { trigger: o } = Wr(), r = Ie(), s = x(() => Ee(n.color)), a = x(() => [
25714
25713
  {
25715
25714
  "cpSwitch--hasLabel": n.label,
25716
25715
  "cpSwitch--isActive": n.modelValue,
@@ -26319,7 +26318,7 @@ const M_ = ["aria-labelledby"], L_ = { class: "cpTable__table" }, k_ = ["id"], O
26319
26318
  "cpTelInput__input--isInvalid": n.isInvalid,
26320
26319
  "cpTelInput__input--isDisabled": n.disabled
26321
26320
  }
26322
- })), f = q(l.id || Ie()), m = x(() => De(n.label)), g = x(() => n.isInvalid && n.errorMessage.length), C = x(() => n.help?.length && !g.value), $ = async () => {
26321
+ })), f = q(l.id || Ie()), m = x(() => Ee(n.label)), g = x(() => n.isInvalid && n.errorMessage.length), C = x(() => n.help?.length && !g.value), $ = async () => {
26323
26322
  r.value && setTimeout(() => r.value?.focus(), 1);
26324
26323
  }, b = async () => {
26325
26324
  if (!r.value) return;
@@ -26431,7 +26430,7 @@ const M_ = ["aria-labelledby"], L_ = { class: "cpTable__table" }, k_ = ["id"], O
26431
26430
  set(d) {
26432
26431
  return l(d), d;
26433
26432
  }
26434
- }), r = q(n.inputId || Ie()), s = x(() => De(n.label)), a = x(() => n.isInvalid && n.errorMessage.length), l = (d) => i("update:modelValue", d);
26433
+ }), r = q(n.inputId || Ie()), s = x(() => Ee(n.label)), a = x(() => n.isInvalid && n.errorMessage.length), l = (d) => i("update:modelValue", d);
26435
26434
  return (d, u) => {
26436
26435
  const c = Ue("bind-once");
26437
26436
  return h(), y("div", hS, [
@@ -27524,7 +27523,7 @@ const mI = { class: "cpToast__inner" }, yI = { class: "cpToast__content" }, vI =
27524
27523
  __name: "CpToast",
27525
27524
  setup(t) {
27526
27525
  _t(() => Je.on("add", c));
27527
- const e = (p) => p.showTimer && p.life !== void 0, n = (p) => `cpToast--is${De(p)}`, i = (p) => {
27526
+ const e = (p) => p.showTimer && p.life !== void 0, n = (p) => `cpToast--is${Ee(p)}`, i = (p) => {
27528
27527
  switch (p) {
27529
27528
  case et.ERROR:
27530
27529
  return "alert-octagon";