@citizenplane/pimp 17.0.4 → 17.0.6

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.
@@ -3,10 +3,11 @@ export interface Props {
3
3
  color?: 'neutral' | 'accent' | 'error' | 'warning' | 'success';
4
4
  disabled?: boolean;
5
5
  enableHaptics?: boolean;
6
+ href?: string;
6
7
  isLoading?: boolean;
7
8
  isSquare?: boolean;
8
9
  size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg';
9
- tag?: 'button' | 'a';
10
+ tag?: 'a' | 'button' | 'label';
10
11
  type?: 'button' | 'submit' | 'reset';
11
12
  }
12
13
  declare function __VLS_template(): {
@@ -26,10 +27,11 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
26
27
  onClick?: ((event: MouseEvent) => any) | undefined;
27
28
  }>, {
28
29
  size: "2xs" | "xs" | "sm" | "md" | "lg";
29
- tag: "button" | "a";
30
+ tag: "a" | "button" | "label";
30
31
  type: "button" | "submit" | "reset";
31
32
  color: "neutral" | "accent" | "error" | "warning" | "success";
32
33
  appearance: "primary" | "secondary" | "tertiary";
34
+ href: string;
33
35
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
34
36
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
35
37
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CpButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpButton.vue"],"names":[],"mappings":"AA4BA;AA4aA,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAA;IACjD,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA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AE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACxC,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC9B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;CACrC;AAiED,iBAAS,cAAc;WA6FT,OAAO,IAA6B;;gCAZb,GAAG;yBACV,GAAG;iCACK,GAAG;;;;EAexC;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;UAzLZ,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;SAClC,GAAG,GAAG,QAAQ,GAAG,OAAO;UACvB,QAAQ,GAAG,QAAQ,GAAG,OAAO;WAR5B,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS;gBADjD,SAAS,GAAG,WAAW,GAAG,UAAU;UAI1C,MAAM;6EAqMb,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
package/dist/pimp.es.js CHANGED
@@ -18961,6 +18961,7 @@ const N1 = {
18961
18961
  color: { default: "neutral" },
18962
18962
  disabled: { type: Boolean },
18963
18963
  enableHaptics: { type: Boolean },
18964
+ href: { default: void 0 },
18964
18965
  isLoading: { type: Boolean },
18965
18966
  isSquare: { type: Boolean },
18966
18967
  size: { default: "md" },
@@ -18969,7 +18970,7 @@ const N1 = {
18969
18970
  },
18970
18971
  emits: ["click"],
18971
18972
  setup(t, { emit: e }) {
18972
- const n = t, r = e, i = kt(), { trigger: o } = U2(), a = w(() => Pe(n.appearance)), s = w(() => Pe(n.color)), l = w(() => !!i.default), d = w(() => !!i["leading-icon"]), u = w(() => !!i["trailing-icon"]), c = w(() => n.disabled || n.isLoading), f = w(() => [
18973
+ const n = t, r = e, i = kt(), { trigger: o } = U2(), a = w(() => Pe(n.appearance)), s = w(() => Pe(n.color)), l = w(() => !!i.default), d = w(() => !!i["leading-icon"]), u = w(() => !!i["trailing-icon"]), c = w(() => n.disabled || n.isLoading), f = w(() => n.tag === "a" ? n.href : void 0), p = w(() => [
18973
18974
  `cpButton--is${a.value}`,
18974
18975
  `cpButton--${n.size}`,
18975
18976
  {
@@ -18979,17 +18980,18 @@ const N1 = {
18979
18980
  "cpButton--isLoading": n.isLoading,
18980
18981
  "cpButton--isSquare": n.isSquare
18981
18982
  }
18982
- ]), p = (m) => {
18983
- n.enableHaptics && o(N1.RIGID), r("click", m);
18983
+ ]), m = (g) => {
18984
+ n.enableHaptics && o(N1.RIGID), r("click", g);
18984
18985
  };
18985
- return (m, g) => (h(), G(Ze(t.tag), {
18986
+ return (g, v) => (h(), G(Ze(t.tag), {
18986
18987
  "aria-disabled": c.value,
18987
- class: Y(["cpButton", f.value]),
18988
+ class: Y(["cpButton", p.value]),
18988
18989
  disabled: c.value,
18990
+ href: f.value,
18989
18991
  role: "button",
18990
18992
  tabindex: "0",
18991
18993
  type: t.type,
18992
- onClick: p
18994
+ onClick: m
18993
18995
  }, {
18994
18996
  default: B(() => [
18995
18997
  $("span", xw, [
@@ -18997,18 +18999,18 @@ const N1 = {
18997
18999
  F(x3, { color: "neutral" })
18998
19000
  ])) : M("", !0),
18999
19001
  d.value ? (h(), y("span", Sw, [
19000
- V(m.$slots, "leading-icon")
19002
+ V(g.$slots, "leading-icon")
19001
19003
  ])) : M("", !0),
19002
19004
  l.value ? (h(), y("span", Iw, [
19003
- V(m.$slots, "default")
19005
+ V(g.$slots, "default")
19004
19006
  ])) : M("", !0),
19005
19007
  u.value ? (h(), y("span", Mw, [
19006
- V(m.$slots, "trailing-icon")
19008
+ V(g.$slots, "trailing-icon")
19007
19009
  ])) : M("", !0)
19008
19010
  ])
19009
19011
  ]),
19010
19012
  _: 3
19011
- }, 8, ["aria-disabled", "class", "disabled", "type"]));
19013
+ }, 8, ["aria-disabled", "class", "disabled", "href", "type"]));
19012
19014
  }
19013
19015
  }), _3 = /* @__PURE__ */ te({
19014
19016
  __name: "CpButtonGroup",