@citizenplane/pimp 18.16.2 → 18.16.3

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,6 +3,7 @@ interface Props {
3
3
  isSelected?: boolean;
4
4
  label?: string;
5
5
  leadingIcon?: string;
6
+ size?: 'sm' | 'md' | 'lg';
6
7
  }
7
8
  declare var __VLS_1: {}, __VLS_8: {};
8
9
  type __VLS_Slots = {} & {
@@ -17,6 +18,7 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
17
18
  }>, {
18
19
  label: string;
19
20
  isSelected: boolean;
21
+ size: "sm" | "md" | "lg";
20
22
  disabled: boolean;
21
23
  leadingIcon: string;
22
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"CpButtonToggle.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpButtonToggle.vue"],"names":[],"mappings":"AAsBA;AAmJA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AA4FD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,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,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;WAtGN,MAAM;gBADD,OAAO;cADT,OAAO;iBAGJ,MAAM;6EAyGpB,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"}
1
+ {"version":3,"file":"CpButtonToggle.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpButtonToggle.vue"],"names":[],"mappings":"AAsBA;AA4KA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC1B;AA2GD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,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,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;WAtHN,MAAM;gBADD,OAAO;UAGb,IAAI,GAAG,IAAI,GAAG,IAAI;cAJd,OAAO;iBAGJ,MAAM;6EAyHpB,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
@@ -24735,13 +24735,20 @@ var HO = (e, t) => ({
24735
24735
  default: !1
24736
24736
  },
24737
24737
  label: { default: "" },
24738
- leadingIcon: { default: "dashed-circle" }
24738
+ leadingIcon: { default: "dashed-circle" },
24739
+ size: { default: "md" }
24739
24740
  },
24740
24741
  emits: ["click"],
24741
24742
  setup(e, { emit: t }) {
24742
- let n = e, r = t, i = fe(), o = a(() => !!n.label || !!i.default), s = a(() => ({ "cpToggleButton--isSelected": n.isSelected })), d = (e) => {
24743
- r("click", e);
24744
- };
24743
+ let n = e, r = t, i = fe(), o = a(() => !!n.label || !!i.default), s = a(() => ({
24744
+ [`cpToggleButton--${n.size}`]: !0,
24745
+ "cpToggleButton--isSelected": n.isSelected
24746
+ })), d = a(() => {
24747
+ switch (n.size) {
24748
+ case "lg": return "20";
24749
+ default: return "16";
24750
+ }
24751
+ }), f = (e) => r("click", e);
24745
24752
  return (t, n) => {
24746
24753
  let r = I("cp-icon");
24747
24754
  return M(), l("button", {
@@ -24750,11 +24757,11 @@ var HO = (e, t) => ({
24750
24757
  class: T(["cpToggleButton", s.value]),
24751
24758
  disabled: e.disabled,
24752
24759
  type: "button",
24753
- onClick: d
24760
+ onClick: f
24754
24761
  }, [u("span", fk, [F(t.$slots, "leading", {}, () => [m(r, {
24755
- size: "16",
24762
+ size: d.value,
24756
24763
  type: e.leadingIcon
24757
- }, null, 8, ["type"])])]), o.value ? (M(), l("span", pk, [F(t.$slots, "default", {}, () => [p(L(e.label), 1)])])) : c("", !0)], 10, dk);
24764
+ }, null, 8, ["size", "type"])])]), o.value ? (M(), l("span", pk, [F(t.$slots, "default", {}, () => [p(L(e.label), 1)])])) : c("", !0)], 10, dk);
24758
24765
  };
24759
24766
  }
24760
24767
  }), hk = {