@citizenplane/pimp 18.2.0 → 18.2.1

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.2.0",
3
+ "version": "18.2.1",
4
4
  "scripts": {
5
5
  "dev": "storybook dev -p 8081",
6
6
  "build-storybook": "storybook build --output-dir ./docs",
@@ -86,6 +86,11 @@ const props = withDefaults(defineProps<Props>(), {
86
86
  keepOpenOnClick: false,
87
87
  })
88
88
 
89
+ const emits = defineEmits<{
90
+ hide: []
91
+ show: []
92
+ }>()
93
+
89
94
  const MOBILE_BREAKPOINT_PX = 640
90
95
 
91
96
  const trigger = ref<HTMLElement | null>(null)
@@ -122,11 +127,13 @@ const drawerPt = {
122
127
  const show = (event: Event) => {
123
128
  if (isDrawer.value) isOpen.value = true
124
129
  else popover.value?.show(event, trigger.value)
130
+ emits('show')
125
131
  }
126
132
 
127
133
  const hide = () => {
128
134
  if (isDrawer.value) isOpen.value = false
129
135
  else popover.value?.hide()
136
+ emits('hide')
130
137
  }
131
138
 
132
139
  const onItemClick = () => {
@@ -167,7 +174,7 @@ defineExpose({ show, hide, toggle })
167
174
 
168
175
  &__overlay {
169
176
  position: absolute;
170
- margin-top: var(--cp-spacing-lg);
177
+ margin-top: var(--cp-spacing-sm-md);
171
178
  min-width: calc(var(--cp-dimensions-1) * 62.5);
172
179
  border-radius: var(--cp-radius-md);
173
180
  background-color: var(--cp-background-primary);