@citizenplane/pimp 18.9.21 → 18.9.23

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.
@@ -2,7 +2,10 @@ interface Props {
2
2
  animationDuration?: number;
3
3
  canBackdropClose?: boolean;
4
4
  canSwipeClose?: boolean;
5
+ expandOnContentDrag?: boolean;
6
+ halfAndExpand?: boolean;
5
7
  preventClose?: boolean;
8
+ snapPoints?: Array<number | `${number}%`>;
6
9
  swipeCloseThreshold?: string;
7
10
  }
8
11
  type __VLS_Props = Props;
@@ -31,6 +34,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
31
34
  "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
32
35
  }>, {
33
36
  animationDuration: number;
37
+ expandOnContentDrag: boolean;
38
+ halfAndExpand: boolean;
39
+ snapPoints: Array<number | `${number}%`>;
34
40
  swipeCloseThreshold: string;
35
41
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
42
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -1 +1 @@
1
- {"version":3,"file":"CpBottomSheet.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpBottomSheet.vue"],"names":[],"mappings":"AAuBA;AAwJA,UAAU,KAAK;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,KAAK,WAAW,GAAG,KAAK,CAAC;AAiEzB,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAkEF,QAAA,IAAwB,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACxF,KAAK,WAAW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AK,WAAW,GAAG,EAAE,GACnB;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA0B/C,QAAA,MAAM,eAAe;;;;;;;;;;;;;uBA1LC,MAAM;yBAGJ,OAAO;mBACb,OAAO;gBAEV,KAAK,CAAC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC;yBACnB,MAAM;6EA4L5B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,10 +1,15 @@
1
1
  interface Props {
2
+ animationDuration?: number;
2
3
  breakpoint?: number;
3
4
  class?: string;
5
+ expandOnContentDrag?: boolean;
6
+ halfAndExpand?: boolean;
4
7
  isClosableOnClickOutside?: boolean;
5
8
  maxWidth?: number | undefined;
6
9
  preventClose?: boolean;
10
+ snapPoints?: Array<number | `${number}%`>;
7
11
  subtitle?: string;
12
+ swipeCloseThreshold?: string;
8
13
  title?: string;
9
14
  }
10
15
  type __VLS_Props = Props;
@@ -1 +1 @@
1
- {"version":3,"file":"CpDynamicDialog.vue.d.ts","sourceRoot":"","sources":["../../src/components/CpDynamicDialog.vue"],"names":[],"mappings":"AA8BA;AA8IA,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,S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kB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
package/dist/pimp.es.js CHANGED
@@ -24939,47 +24939,57 @@ var VO = ["data-vsbs-shadow", "data-vsbs-sheet-show"], HO = /* @__PURE__ */ ((e,
24939
24939
  animationDuration: { default: 300 },
24940
24940
  canBackdropClose: { type: Boolean },
24941
24941
  canSwipeClose: { type: Boolean },
24942
+ expandOnContentDrag: {
24943
+ type: Boolean,
24944
+ default: !0
24945
+ },
24946
+ halfAndExpand: {
24947
+ type: Boolean,
24948
+ default: !1
24949
+ },
24942
24950
  preventClose: { type: Boolean },
24943
- swipeCloseThreshold: { default: "20%" }
24951
+ snapPoints: { default: () => [] },
24952
+ swipeCloseThreshold: { default: "40%" }
24944
24953
  }, {
24945
24954
  modelValue: { type: Boolean },
24946
24955
  modelModifiers: {}
24947
24956
  }),
24948
24957
  emits: /*@__PURE__*/ S(["close", "open"], ["update:modelValue"]),
24949
24958
  setup(e, { expose: t, emit: n }) {
24950
- let r = e, i = n, a = me("bottomSheetRef"), s = fe(e, "modelValue"), c = !1, u = () => {
24951
- if (c) {
24952
- c = !1;
24959
+ let r = e, a = n, s = me("bottomSheetRef"), c = fe(e, "modelValue"), u = i(() => r.snapPoints?.length ? r.snapPoints : r.halfAndExpand ? ["50%", "100%"] : void 0), d = !1, f = () => {
24960
+ if (d) {
24961
+ d = !1;
24953
24962
  return;
24954
24963
  }
24955
- if (s.value) {
24956
- a.value?.open();
24964
+ if (c.value) {
24965
+ s.value?.open();
24957
24966
  return;
24958
24967
  }
24959
- a.value?.close();
24968
+ s.value?.close();
24960
24969
  };
24961
- B(s, () => u());
24962
- let d = () => i("open"), f = () => {
24970
+ B(c, () => f());
24971
+ let p = () => a("open"), m = () => {
24963
24972
  if (r.preventClose) {
24964
- s.value && a.value?.open();
24973
+ c.value && s.value?.open();
24965
24974
  return;
24966
24975
  }
24967
- s.value &&= (c = !0, !1), i("close");
24976
+ c.value &&= (d = !0, !1), a("close");
24968
24977
  };
24969
24978
  return t({
24970
- open: () => a.value?.open(),
24971
- close: () => a.value?.close()
24979
+ open: () => s.value?.open(),
24980
+ close: () => s.value?.close()
24972
24981
  }), (t, n) => (j(), o(R(HO), {
24973
24982
  ref_key: "bottomSheetRef",
24974
- ref: a,
24983
+ ref: s,
24975
24984
  "can-backdrop-close": e.canBackdropClose,
24976
24985
  "can-swipe-close": e.canSwipeClose,
24977
24986
  duration: e.animationDuration,
24978
- "expand-on-content-drag": "",
24987
+ "expand-on-content-drag": e.expandOnContentDrag,
24979
24988
  "swipe-close-threshold": e.swipeCloseThreshold,
24980
24989
  "teleport-defer": "",
24981
- onClosed: f,
24982
- onOpened: d
24990
+ "snap-points": u.value,
24991
+ onClosed: m,
24992
+ onOpened: p
24983
24993
  }, {
24984
24994
  header: V(() => [P(t.$slots, "header")]),
24985
24995
  footer: V(() => [P(t.$slots, "footer")]),
@@ -24989,7 +24999,9 @@ var VO = ["data-vsbs-shadow", "data-vsbs-sheet-show"], HO = /* @__PURE__ */ ((e,
24989
24999
  "can-backdrop-close",
24990
25000
  "can-swipe-close",
24991
25001
  "duration",
24992
- "swipe-close-threshold"
25002
+ "expand-on-content-drag",
25003
+ "swipe-close-threshold",
25004
+ "snap-points"
24993
25005
  ]));
24994
25006
  }
24995
25007
  }), GO = {
@@ -28169,12 +28181,17 @@ function Jj(e, r) {
28169
28181
  var Yj = /*#__PURE__*/ X(qj, [["render", Jj]]), Xj = /* @__PURE__ */ h({
28170
28182
  __name: "CpDynamicDialog",
28171
28183
  props: /*@__PURE__*/ S({
28184
+ animationDuration: {},
28172
28185
  breakpoint: {},
28173
28186
  class: {},
28187
+ expandOnContentDrag: { type: Boolean },
28188
+ halfAndExpand: { type: Boolean },
28174
28189
  isClosableOnClickOutside: { type: Boolean },
28175
28190
  maxWidth: {},
28176
28191
  preventClose: { type: Boolean },
28192
+ snapPoints: {},
28177
28193
  subtitle: {},
28194
+ swipeCloseThreshold: {},
28178
28195
  title: {}
28179
28196
  }, {
28180
28197
  isVisible: {
@@ -28190,7 +28207,12 @@ var Yj = /*#__PURE__*/ X(qj, [["render", Jj]]), Xj = /* @__PURE__ */ h({
28190
28207
  contentClass: n.class,
28191
28208
  canBackdropClose: !n.preventClose,
28192
28209
  canSwipeClose: !n.preventClose,
28193
- preventClose: n.preventClose
28210
+ expandOnContentDrag: n.expandOnContentDrag,
28211
+ preventClose: n.preventClose,
28212
+ halfAndExpand: n.halfAndExpand,
28213
+ snapPoints: n.snapPoints,
28214
+ swipeCloseThreshold: n.swipeCloseThreshold,
28215
+ animationDuration: n.animationDuration
28194
28216
  } : {
28195
28217
  maxWidth: n.maxWidth,
28196
28218
  class: n.class,