edvoyui-component-library-test-flight 0.0.106 → 0.0.108
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/alerts/EUIAlerts.vue.d.ts +4 -0
- package/dist/alerts/EUIAlerts.vue.d.ts.map +1 -0
- package/dist/library-vue-ts.cjs.js +28 -28
- package/dist/library-vue-ts.css +1 -1
- package/dist/library-vue-ts.es.js +4976 -4722
- package/dist/library-vue-ts.umd.js +24 -24
- 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/HelloWorld.vue +293 -167
- package/src/components/alerts/EUIAlerts.stories.ts +217 -0
- package/src/components/alerts/EUIAlerts.vue +194 -0
- package/src/components/dropdown/EUIMultiDropdown.vue +74 -39
- package/src/components/index.ts +1 -0
- package/src/components/modal/EUIModal.stories.ts +20 -0
- package/src/components/modal/EUIModal.vue +36 -8
- package/src/components/slideover/EUISlideover.stories.ts +1 -1
|
@@ -3,16 +3,18 @@
|
|
|
3
3
|
<Transition name="modal" appear>
|
|
4
4
|
<div
|
|
5
5
|
v-if="isVisible"
|
|
6
|
-
class="fixed
|
|
6
|
+
class="fixed z-50 flex flex-col items-center justify-end inset-2 sm:justify-center"
|
|
7
7
|
@click.self="closeModal"
|
|
8
8
|
>
|
|
9
9
|
<div
|
|
10
10
|
class="backdrop fixed inset-0 z-[-1] w-screen h-screen bg-black/50 pointer-events-none overflow-hidden"
|
|
11
11
|
></div>
|
|
12
12
|
<div
|
|
13
|
-
class="bg-white shadow-lg max-w-lg w-full max-h-[calc(100svh-3rem)] md:h-auto overflow-hidden relative"
|
|
14
13
|
:class="[
|
|
14
|
+
'bg-white shadow-lg w-full overflow-hidden relative flex flex-col justify-between',
|
|
15
|
+
slideClass,
|
|
15
16
|
roundedClass !== '' ? roundedClass : 'rounded-t-3xl md:rounded-2xl',
|
|
17
|
+
size === 'full' ? 'h-full max-h-svh' : 'max-h-[calc(100svh-3rem)] md:h-auto'
|
|
16
18
|
]"
|
|
17
19
|
>
|
|
18
20
|
<template v-if="$slots.header">
|
|
@@ -55,14 +57,14 @@
|
|
|
55
57
|
<template v-if="$slots.content">
|
|
56
58
|
<slot name="content"></slot>
|
|
57
59
|
</template>
|
|
58
|
-
<div v-else class="p-4 border-t border-b border-gray-200">
|
|
60
|
+
<div v-else class="p-4 border-t border-b border-gray-200 max-h-[calc(100svh-3rem)] flex-1">
|
|
59
61
|
<slot></slot>
|
|
60
62
|
</div>
|
|
61
63
|
|
|
62
64
|
<template v-if="$slots.footer">
|
|
63
65
|
<slot name="footer"></slot>
|
|
64
66
|
</template>
|
|
65
|
-
<div v-else class="flex items-center justify-end p-4 space-x-2">
|
|
67
|
+
<div v-else class="sticky bottom-0 flex items-center justify-end float-none p-4 space-x-2">
|
|
66
68
|
<button
|
|
67
69
|
@click="closeModal"
|
|
68
70
|
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"
|
|
@@ -83,7 +85,14 @@
|
|
|
83
85
|
</template>
|
|
84
86
|
|
|
85
87
|
<script lang="ts">
|
|
86
|
-
import {
|
|
88
|
+
import {
|
|
89
|
+
defineComponent,
|
|
90
|
+
onMounted,
|
|
91
|
+
onUnmounted,
|
|
92
|
+
watch,
|
|
93
|
+
computed,
|
|
94
|
+
type PropType,
|
|
95
|
+
} from "vue";
|
|
87
96
|
|
|
88
97
|
export default defineComponent({
|
|
89
98
|
name: "Modal",
|
|
@@ -112,9 +121,27 @@ export default defineComponent({
|
|
|
112
121
|
type: Boolean,
|
|
113
122
|
default: false,
|
|
114
123
|
},
|
|
124
|
+
size: {
|
|
125
|
+
type: String as PropType<"xs" | "sm" | "md" | "lg" | "xl" | "full">,
|
|
126
|
+
default: "sm",
|
|
127
|
+
},
|
|
115
128
|
},
|
|
116
129
|
emits: ["update:isVisible", "confirm"],
|
|
117
130
|
setup(props, { emit }) {
|
|
131
|
+
const slideClass = computed(() => {
|
|
132
|
+
const sizeClass = {
|
|
133
|
+
full: "max-w-screen",
|
|
134
|
+
xl: "max-w-screen-lg min-w-[100svw] sm:min-w-[1024px]",
|
|
135
|
+
lg: "max-w-2xl min-w-[100svw] sm:min-w-[42rem]",
|
|
136
|
+
md: "max-w-xl min-w-[100svw] sm:min-w-[36rem]",
|
|
137
|
+
sm: "max-w-lg min-w-[100svw] sm:min-w-[32rem]",
|
|
138
|
+
xs: "max-w-md min-w-[100svw] sm:min-w-[28rem]",
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const slideWidth = sizeClass[props.size];
|
|
142
|
+
return slideWidth;
|
|
143
|
+
});
|
|
144
|
+
|
|
118
145
|
// Methods
|
|
119
146
|
const closeModal = () => {
|
|
120
147
|
if (!props.persistent) {
|
|
@@ -143,9 +170,10 @@ export default defineComponent({
|
|
|
143
170
|
window.removeEventListener("keydown", handleKeydown);
|
|
144
171
|
});
|
|
145
172
|
return {
|
|
146
|
-
closeModal
|
|
173
|
+
closeModal,
|
|
174
|
+
slideClass,
|
|
147
175
|
};
|
|
148
|
-
}
|
|
176
|
+
},
|
|
149
177
|
});
|
|
150
178
|
</script>
|
|
151
179
|
|
|
@@ -160,7 +188,7 @@ export default defineComponent({
|
|
|
160
188
|
}
|
|
161
189
|
.modal-enter-to,
|
|
162
190
|
.modal-leave-from {
|
|
163
|
-
|
|
191
|
+
@apply opacity-100;
|
|
164
192
|
}
|
|
165
193
|
|
|
166
194
|
.backdrop {
|
|
@@ -23,7 +23,7 @@ const meta: Meta<typeof EUISlideover> = {
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
size: {
|
|
26
|
-
control: { type: "select", options: ["xs", "sm", "md", "lg"] },
|
|
26
|
+
control: { type: "select", options: ["xs", "sm", "md", "lg", "full"] },
|
|
27
27
|
description: "Size of the slideover.",
|
|
28
28
|
defaultValue: "xs",
|
|
29
29
|
table: {
|