@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/dist/components/CpMenu.vue.d.ts +7 -1
- package/dist/components/CpMenu.vue.d.ts.map +1 -1
- package/dist/pimp.es.js +432 -431
- package/dist/pimp.umd.js +9 -9
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CpMenu.vue +8 -1
package/package.json
CHANGED
|
@@ -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-
|
|
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);
|