@citizenplane/pimp 18.9.22 → 18.9.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenplane/pimp",
3
- "version": "18.9.22",
3
+ "version": "18.9.24",
4
4
  "scripts": {
5
5
  "dev": "storybook dev -p 8081",
6
6
  "build-storybook": "storybook build --output-dir ./docs",
@@ -135,7 +135,7 @@ defineExpose({
135
135
 
136
136
  [data-vsbs-sheet] {
137
137
  overflow: hidden;
138
- max-height: calc(100% - 65px) !important;
138
+ max-height: var(--cp-bottomsheet-max-height, calc(100% - 65px - env(safe-area-inset-top, 0px))) !important;
139
139
  }
140
140
 
141
141
  [data-vsbs-scroll] {
@@ -144,6 +144,10 @@ defineExpose({
144
144
  overscroll-behavior: unset !important;
145
145
  }
146
146
 
147
+ [data-vsbs-footer] {
148
+ padding-bottom: var(--cp-bottomsheet-footer-padding-bottom, calc(16px + env(safe-area-inset-bottom, 0px))) !important;
149
+ }
150
+
147
151
  [data-vsbs-footer]:is(.vsbs-enter-active) {
148
152
  pointer-events: none;
149
153
  }
@@ -42,6 +42,7 @@ import { Breakpoints } from '@/constants/layout'
42
42
 
43
43
 
44
44
  interface Props {
45
+ animationDuration?: number
45
46
  breakpoint?: number
46
47
  class?: string
47
48
  expandOnContentDrag?: boolean
@@ -49,7 +50,9 @@ interface Props {
49
50
  isClosableOnClickOutside?: boolean
50
51
  maxWidth?: number | undefined
51
52
  preventClose?: boolean
53
+ snapPoints?: Array<number | `${number}%`>
52
54
  subtitle?: string
55
+ swipeCloseThreshold?: string
53
56
  title?: string
54
57
  }
55
58
 
@@ -88,6 +91,9 @@ const dynamicComponentProps = computed(() => {
88
91
  expandOnContentDrag: props.expandOnContentDrag,
89
92
  preventClose: props.preventClose,
90
93
  halfAndExpand: props.halfAndExpand,
94
+ snapPoints: props.snapPoints,
95
+ swipeCloseThreshold: props.swipeCloseThreshold,
96
+ animationDuration: props.animationDuration,
91
97
  }
92
98
  }
93
99
 
@@ -169,6 +169,7 @@ const focusCloseButton = () => {
169
169
  const onHide = () => {
170
170
  isOpen.value = false
171
171
  focusTrigger()
172
+ emits('hide')
172
173
  }
173
174
 
174
175
  const alignPopoverEnd = () => {
@@ -190,6 +191,7 @@ const alignPopoverEnd = () => {
190
191
  const onShow = async () => {
191
192
  isOpen.value = true
192
193
  if (isPopoverPlacementEnd.value) alignPopoverEnd()
194
+ emits('show')
193
195
  }
194
196
 
195
197
  defineExpose({ show, hide, toggle })