@citizenplane/pimp 18.9.0 → 18.9.2
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/CpDynamicDialog.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/pimp.es.js +1241 -1239
- package/dist/pimp.umd.js +46 -46
- package/package.json +1 -1
- package/src/components/CpDynamicDialog.vue +1 -2
- package/src/components/index.ts +2 -0
- package/src/stories/CpDynamicDialog.stories.ts +1 -9
package/package.json
CHANGED
|
@@ -53,13 +53,12 @@ const dynamicComponentRef = useTemplateRef('dynamicComponentRef')
|
|
|
53
53
|
|
|
54
54
|
const isVisibleModel = defineModel<boolean>('isVisible', { default: false })
|
|
55
55
|
|
|
56
|
-
const ClientOnly = resolveComponent('client-only')
|
|
57
56
|
const CpTransitionDialog = resolveComponent('cp-transition-dialog')
|
|
58
57
|
const CpBottomSheet = resolveComponent('cp-bottom-sheet')
|
|
59
58
|
const CpDialog = resolveComponent('cp-dialog')
|
|
60
59
|
|
|
61
60
|
const dynamicWrapperComponent = computed(() => {
|
|
62
|
-
if (isMobile.value) return
|
|
61
|
+
if (isMobile.value) return 'div'
|
|
63
62
|
return CpTransitionDialog
|
|
64
63
|
})
|
|
65
64
|
|
package/src/components/index.ts
CHANGED
|
@@ -79,6 +79,7 @@ const Components = {
|
|
|
79
79
|
CpToast,
|
|
80
80
|
CpButtonToggle,
|
|
81
81
|
CpBadge,
|
|
82
|
+
CpBottomSheet,
|
|
82
83
|
CpTabs,
|
|
83
84
|
CpHeading,
|
|
84
85
|
CpButton,
|
|
@@ -168,6 +169,7 @@ export {
|
|
|
168
169
|
CpDate,
|
|
169
170
|
CpDatepicker,
|
|
170
171
|
CpDialog,
|
|
172
|
+
CpDynamicDialog,
|
|
171
173
|
CpHeading,
|
|
172
174
|
CpIcon,
|
|
173
175
|
CpInput,
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3-vite'
|
|
2
|
-
import {
|
|
2
|
+
import { ref } from 'vue'
|
|
3
3
|
|
|
4
4
|
import CpDynamicDialog from '@/components/CpDynamicDialog.vue'
|
|
5
5
|
|
|
6
|
-
const ClientOnlyStub = { template: '<slot />' }
|
|
7
|
-
|
|
8
|
-
const registerClientOnly = () => {
|
|
9
|
-
const instance = getCurrentInstance()
|
|
10
|
-
instance?.appContext.app.component('client-only', ClientOnlyStub)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
6
|
const STORY_TRIGGER_LAYOUT =
|
|
14
7
|
'display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; width: 100%;'
|
|
15
8
|
|
|
16
9
|
const createStoryRender = (content: string) => (args: Record<string, unknown>) => ({
|
|
17
10
|
components: { CpDynamicDialog },
|
|
18
11
|
setup() {
|
|
19
|
-
registerClientOnly()
|
|
20
12
|
const isVisible = ref(false)
|
|
21
13
|
return { args, isVisible }
|
|
22
14
|
},
|