@citizenplane/pimp 9.11.1 → 9.12.0
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/pimp.es.js +925 -927
- package/dist/pimp.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/src/components/CpDialog.vue +3 -14
- package/src/components/CpTable.vue +2 -0
- package/src/components/CpTransitionDialog.vue +20 -0
- package/src/components/index.ts +2 -2
- package/src/stories/CpDialog.stories.ts +2 -2
- package/src/components/CpDialogWrapper.vue +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citizenplane/pimp",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.12.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "storybook dev -p 8080",
|
|
6
6
|
"build-storybook": "storybook build --output-dir ./docs",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@storybook/vue3-vite": "^9.1.17",
|
|
59
59
|
"@stylistic/eslint-plugin": "^5.6.1",
|
|
60
60
|
"@types/feather-icons": "^4.29.4",
|
|
61
|
+
"@types/vue-tel-input": "^2.1.7",
|
|
61
62
|
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
62
63
|
"@typescript-eslint/parser": "^8.50.1",
|
|
63
64
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cpDialog">
|
|
3
|
-
<dialog ref="dialogElement" class="cpDialog__dialog" @keydown.esc.stop.prevent="
|
|
3
|
+
<dialog ref="dialogElement" class="cpDialog__dialog" @keydown.esc.stop.prevent="handleClose">
|
|
4
4
|
<div class="cpDialog__overlay" />
|
|
5
5
|
<main ref="dialogContainer" class="cpDialog__container" :style="dynamicStyle" @keydown.tab="trapFocus">
|
|
6
6
|
<header v-if="hasHeaderSlot" class="cpDialog__header">
|
|
7
7
|
<slot name="header" />
|
|
8
|
-
<button
|
|
8
|
+
<button class="cpDialog__close" type="button" @click="handleClose">
|
|
9
9
|
<cp-icon type="x" />
|
|
10
10
|
</button>
|
|
11
11
|
</header>
|
|
@@ -52,7 +52,7 @@ const hasHeaderSlot = computed(() => !!slots.header)
|
|
|
52
52
|
|
|
53
53
|
const hasFooterSlot = computed(() => !!slots.footer)
|
|
54
54
|
|
|
55
|
-
const
|
|
55
|
+
const handleClose = () => emit('close')
|
|
56
56
|
const trapFocus = (event: KeyboardEvent) => handleTrapFocus(event, dialogContainer.value)
|
|
57
57
|
|
|
58
58
|
const openDialog = () => dialogElement.value?.show()
|
|
@@ -120,11 +120,6 @@ $dialog-breakpoint: 550px;
|
|
|
120
120
|
transition: opacity 250ms ease;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
&.dialog-leave-to &__overlay,
|
|
124
|
-
&.dialog-enter-from &__overlay {
|
|
125
|
-
opacity: 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
123
|
&__container {
|
|
129
124
|
position: relative;
|
|
130
125
|
display: flex;
|
|
@@ -148,12 +143,6 @@ $dialog-breakpoint: 550px;
|
|
|
148
143
|
}
|
|
149
144
|
}
|
|
150
145
|
|
|
151
|
-
&.dialog-enter-from &__container,
|
|
152
|
-
&.dialog-leave-to &__container {
|
|
153
|
-
opacity: 0;
|
|
154
|
-
transform: scale3d(0.85, 0.85, 1) translate3d(0, fn.px-to-rem(30), 0);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
146
|
&__header,
|
|
158
147
|
&__content,
|
|
159
148
|
&__footer {
|
|
@@ -638,6 +638,7 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
638
638
|
line-height: fn.px-to-rem(16);
|
|
639
639
|
font-weight: normal;
|
|
640
640
|
color: colors.$neutral-dark-1;
|
|
641
|
+
background-color: colors.$neutral-light;
|
|
641
642
|
|
|
642
643
|
&:first-letter {
|
|
643
644
|
text-transform: capitalize;
|
|
@@ -657,6 +658,7 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
|
|
|
657
658
|
&--isOptions {
|
|
658
659
|
right: 0;
|
|
659
660
|
padding: 0;
|
|
661
|
+
background-color: transparent;
|
|
660
662
|
}
|
|
661
663
|
}
|
|
662
664
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<teleport to="body">
|
|
3
|
+
<transition name="dialog">
|
|
4
|
+
<slot />
|
|
5
|
+
</transition>
|
|
6
|
+
</teleport>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<style lang="scss">
|
|
10
|
+
.dialog-leave-to dialog > div,
|
|
11
|
+
.dialog-enter-from dialog > div {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dialog-leave-to dialog main,
|
|
16
|
+
.dialog-enter-from dialog main {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
transform: scale3d(0.85, 0.85, 1) translate3d(0, fn.px-to-rem(30), 0);
|
|
19
|
+
}
|
|
20
|
+
</style>
|
package/src/components/index.ts
CHANGED
|
@@ -19,7 +19,6 @@ import CpContextualMenu from './CpContextualMenu.vue'
|
|
|
19
19
|
import CpDate from './CpDate.vue'
|
|
20
20
|
import CpDatepicker from './CpDatepicker.vue'
|
|
21
21
|
import CpDialog from './CpDialog.vue'
|
|
22
|
-
import CpDialogWrapper from './CpDialogWrapper.vue'
|
|
23
22
|
import CpHeading from './CpHeading.vue'
|
|
24
23
|
import CpIcon from './CpIcon.vue'
|
|
25
24
|
import CpInput from './CpInput.vue'
|
|
@@ -38,6 +37,7 @@ import CpTelInput from './CpTelInput.vue'
|
|
|
38
37
|
import CpTextarea from './CpTextarea.vue'
|
|
39
38
|
import CpToaster from './CpToaster.vue'
|
|
40
39
|
import CpTooltip from './CpTooltip.vue'
|
|
40
|
+
import CpTransitionDialog from './CpTransitionDialog.vue'
|
|
41
41
|
import IconAirline from './icons/IconAirline.vue'
|
|
42
42
|
import IconCheckList from './icons/IconCheckList.vue'
|
|
43
43
|
import IconCollapse from './icons/IconCollapse.vue'
|
|
@@ -56,7 +56,6 @@ const Components = {
|
|
|
56
56
|
CpHeading,
|
|
57
57
|
CpButton,
|
|
58
58
|
CpButtonGroup,
|
|
59
|
-
CpDialogWrapper,
|
|
60
59
|
CpDialog,
|
|
61
60
|
CpDate,
|
|
62
61
|
CpContextualMenu,
|
|
@@ -91,6 +90,7 @@ const Components = {
|
|
|
91
90
|
IconCollapse,
|
|
92
91
|
IconExpand,
|
|
93
92
|
IconCheckList,
|
|
93
|
+
CpTransitionDialog,
|
|
94
94
|
TransitionExpand,
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -37,7 +37,7 @@ export const Default: Story = {
|
|
|
37
37
|
},
|
|
38
38
|
template: `
|
|
39
39
|
<CpButton @click="isOpen = true">Open Dialog</CpButton>
|
|
40
|
-
<
|
|
40
|
+
<CpTransitionDialog>
|
|
41
41
|
<CpDialog v-bind="args" v-if="isOpen" @close="isOpen = false">
|
|
42
42
|
<template #header>
|
|
43
43
|
<h1 style="padding: 16px 24px">Header slot</h1>
|
|
@@ -48,7 +48,7 @@ export const Default: Story = {
|
|
|
48
48
|
This is the footer slot
|
|
49
49
|
</template>
|
|
50
50
|
</CpDialog>
|
|
51
|
-
</
|
|
51
|
+
</CpTransitionDialog>
|
|
52
52
|
`,
|
|
53
53
|
}),
|
|
54
54
|
}
|