edvoyui-component-library-test-flight 0.0.147 → 0.0.148
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/library-vue-ts.cjs.js +1 -1
- package/dist/library-vue-ts.css +1 -1
- package/dist/library-vue-ts.es.js +10 -4
- package/dist/library-vue-ts.umd.js +2 -2
- package/dist/modal/EUIModal.vue.d.ts +1 -1
- package/dist/modal/EUIModal.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/modal/EUIModal.stories.ts +14 -0
- package/src/components/modal/EUIModal.vue +24 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/modal/EUIModal.vue?vue&type=script&lang.ts";
|
|
2
|
-
import "/Volumes/work/repos/edvoy-ui-v2/src/components/modal/EUIModal.vue?vue&type=style&index=0&scoped=
|
|
2
|
+
import "/Volumes/work/repos/edvoy-ui-v2/src/components/modal/EUIModal.vue?vue&type=style&index=0&scoped=6e392f5b&lang.scss";
|
|
3
3
|
declare const _default: any;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=EUIModal.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EUIModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/modal/EUIModal.vue"],"names":[],"mappings":"AACA,cAAc,2FAA2F,CAAC;
|
|
1
|
+
{"version":3,"file":"EUIModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/modal/EUIModal.vue"],"names":[],"mappings":"AACA,cAAc,2FAA2F,CAAC;AA+F1G,OAAO,oHAAoH,CAAC;;AAE5H,wBAAmH"}
|
package/package.json
CHANGED
|
@@ -55,6 +55,20 @@ const meta: Meta<typeof EUIModal> = {
|
|
|
55
55
|
defaultValue: { summary: "sm" },
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
+
placement: {
|
|
59
|
+
control: { type: "select" },
|
|
60
|
+
options: [
|
|
61
|
+
"top",
|
|
62
|
+
"bottom",
|
|
63
|
+
"center",
|
|
64
|
+
],
|
|
65
|
+
description:
|
|
66
|
+
"Defines the position of the modal show in 'placement' element. Default is 'center'.",
|
|
67
|
+
defaultValue: "center",
|
|
68
|
+
table: {
|
|
69
|
+
defaultValue: { summary: "center" },
|
|
70
|
+
},
|
|
71
|
+
},
|
|
58
72
|
},
|
|
59
73
|
},
|
|
60
74
|
parameters: {
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
<Transition name="modal" appear>
|
|
4
4
|
<div
|
|
5
5
|
v-if="isVisible"
|
|
6
|
-
class="fixed z-50 flex flex-col items-center justify-end inset-2
|
|
6
|
+
class="fixed z-50 flex flex-col items-center justify-end inset-2 modal-wrapper"
|
|
7
|
+
:class="[
|
|
8
|
+
placement === 'top'
|
|
9
|
+
? 'sm:justify-start'
|
|
10
|
+
: placement === 'bottom'
|
|
11
|
+
? 'sm:justify-end'
|
|
12
|
+
: 'sm:justify-center',
|
|
13
|
+
]"
|
|
7
14
|
@click.self="closeModal"
|
|
8
15
|
>
|
|
9
16
|
<div
|
|
@@ -11,10 +18,12 @@
|
|
|
11
18
|
></div>
|
|
12
19
|
<div
|
|
13
20
|
:class="[
|
|
14
|
-
'bg-white shadow-lg w-full overflow-hidden relative flex flex-col justify-between',
|
|
21
|
+
'bg-white shadow-lg w-full overflow-hidden relative flex flex-col justify-between modal-container',
|
|
15
22
|
slideClass,
|
|
16
23
|
roundedClass !== '' ? roundedClass : 'rounded-t-3xl md:rounded-2xl',
|
|
17
|
-
size === 'full'
|
|
24
|
+
size === 'full'
|
|
25
|
+
? 'h-full max-h-svh'
|
|
26
|
+
: 'max-h-[calc(100svh-3rem)] md:h-auto',
|
|
18
27
|
]"
|
|
19
28
|
>
|
|
20
29
|
<template v-if="$slots.header">
|
|
@@ -57,14 +66,20 @@
|
|
|
57
66
|
<template v-if="$slots.content">
|
|
58
67
|
<slot name="content"></slot>
|
|
59
68
|
</template>
|
|
60
|
-
<div
|
|
69
|
+
<div
|
|
70
|
+
v-else
|
|
71
|
+
class="p-4 border-t border-b border-gray-200 max-h-[calc(100svh-3rem)] flex-1"
|
|
72
|
+
>
|
|
61
73
|
<slot></slot>
|
|
62
74
|
</div>
|
|
63
75
|
|
|
64
76
|
<template v-if="$slots.footer">
|
|
65
77
|
<slot name="footer"></slot>
|
|
66
78
|
</template>
|
|
67
|
-
<div
|
|
79
|
+
<div
|
|
80
|
+
v-else
|
|
81
|
+
class="sticky bottom-0 flex items-center justify-end float-none p-4 space-x-2"
|
|
82
|
+
>
|
|
68
83
|
<button
|
|
69
84
|
@click="closeModal"
|
|
70
85
|
class="px-4 py-2 text-base font-semibold tracking-wide text-gray-600 transition-colors duration-75 bg-white rounded-md hover:bg-gray-100"
|
|
@@ -125,6 +140,10 @@ export default defineComponent({
|
|
|
125
140
|
type: String as PropType<"xs" | "sm" | "md" | "lg" | "xl" | "full">,
|
|
126
141
|
default: "sm",
|
|
127
142
|
},
|
|
143
|
+
placement: {
|
|
144
|
+
type: String as PropType<"center" | "bottom" | "top">,
|
|
145
|
+
default: "center",
|
|
146
|
+
},
|
|
128
147
|
},
|
|
129
148
|
emits: ["update:isVisible", "confirm"],
|
|
130
149
|
setup(props, { emit }) {
|