quasar-ui-danx 0.3.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -1
- package/danx-local.sh +1 -0
- package/dist/danx.es.js +3830 -3767
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +5 -5
- package/dist/danx.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +1 -0
- package/src/components/Navigation/NavigationMenu.vue +86 -0
- package/src/components/Navigation/index.ts +1 -0
- package/src/components/Utility/Files/FilePreview.vue +2 -3
- package/src/components/index.ts +1 -0
- package/src/styles/general.scss +18 -0
- package/src/styles/index.scss +1 -0
@@ -0,0 +1,86 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
class="p-4"
|
4
|
+
:class="{ 'is-collapsed': collapsed }"
|
5
|
+
>
|
6
|
+
<div
|
7
|
+
v-for="item in allowedItems"
|
8
|
+
:key="'nav-item-' + item.label"
|
9
|
+
class="nav-menu-item"
|
10
|
+
:class="item.class || itemClass"
|
11
|
+
>
|
12
|
+
<div class="flex flex-nowrap" @click="item.onClick">
|
13
|
+
<div v-if="item.icon">
|
14
|
+
<component
|
15
|
+
:is="item.icon"
|
16
|
+
class="nav-icon"
|
17
|
+
:class="item.iconClass"
|
18
|
+
/>
|
19
|
+
</div>
|
20
|
+
<div class="label ml-2" :class="item.labelClass">{{ item.label }}</div>
|
21
|
+
<QTooltip v-if="collapsed" v-bind="item.tooltip">{{ item.tooltip?.text || item.label }}</QTooltip>
|
22
|
+
</div>
|
23
|
+
<QSeparator
|
24
|
+
v-if="item.separator"
|
25
|
+
:key="'separator-' + item.label"
|
26
|
+
class="my-2"
|
27
|
+
/>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</template>
|
31
|
+
<script setup>
|
32
|
+
import { computed } from "vue";
|
33
|
+
|
34
|
+
const props = defineProps({
|
35
|
+
collapsed: Boolean,
|
36
|
+
itemClass: {
|
37
|
+
type: String,
|
38
|
+
default: "hover:bg-gray-200"
|
39
|
+
},
|
40
|
+
activeClass: {
|
41
|
+
type: String,
|
42
|
+
default: "bg-blue-200"
|
43
|
+
},
|
44
|
+
items: {
|
45
|
+
type: Array,
|
46
|
+
required: true
|
47
|
+
}
|
48
|
+
});
|
49
|
+
|
50
|
+
const allowedItems = computed(() => props.items.filter((item) => !item.hidden));
|
51
|
+
</script>
|
52
|
+
|
53
|
+
<style lang="scss">
|
54
|
+
.nav-menu-item {
|
55
|
+
padding: 1.2em;
|
56
|
+
border-radius: 0.5em;
|
57
|
+
font-weight: bold;
|
58
|
+
font-size: 14px;
|
59
|
+
height: 3.8em;
|
60
|
+
width: 13em;
|
61
|
+
transition: all 150ms, color 0ms;
|
62
|
+
cursor: pointer;
|
63
|
+
|
64
|
+
&.is-disabled {
|
65
|
+
@apply bg-inherit;
|
66
|
+
}
|
67
|
+
|
68
|
+
.label {
|
69
|
+
@apply transition-all;
|
70
|
+
}
|
71
|
+
|
72
|
+
.nav-icon {
|
73
|
+
@apply w-5 h-5 flex-shrink-0;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
.is-collapsed {
|
78
|
+
.nav-link {
|
79
|
+
width: 3.8em;
|
80
|
+
}
|
81
|
+
|
82
|
+
.label {
|
83
|
+
@apply opacity-0;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
</style>
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as NavigationMenu } from "./NavigationMenu.vue";
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="relative flex justify-center bg-gray-100" :class="{'rounded-2xl': !square}">
|
2
|
+
<div class="relative flex justify-center bg-gray-100 overflow-hidden" :class="{'rounded-2xl': !square}">
|
3
3
|
<template v-if="computedImage">
|
4
4
|
<div
|
5
|
-
class="grow h-full
|
6
|
-
:class="{'rounded-2xl': !square}"
|
5
|
+
class="grow h-full"
|
7
6
|
@click="showPreview = true"
|
8
7
|
>
|
9
8
|
<div
|
package/src/components/index.ts
CHANGED
package/src/styles/index.scss
CHANGED