quasar-ui-danx 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,85 @@
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
+ >
10
+ <a class="nav-link" @click="item.onClick">
11
+ <component
12
+ :is="item.icon"
13
+ class="nav-icon"
14
+ />
15
+ <div class="label ml-2">{{ item.label }}</div>
16
+ <QTooltip v-if="collapsed">{{ item.label }}</QTooltip>
17
+ </a>
18
+ <QSeparator
19
+ v-if="item.separator"
20
+ :key="'separator-' + item.label"
21
+ class="my-2"
22
+ />
23
+ </div>
24
+ </div>
25
+ </template>
26
+ <script setup>
27
+ import { computed } from "vue";
28
+
29
+ const props = defineProps({
30
+ collapsed: Boolean,
31
+ items: {
32
+ type: Array,
33
+ required: true
34
+ }
35
+ });
36
+
37
+ const allowedItems = computed(() => props.items.filter((item) => !item.hidden));
38
+ </script>
39
+
40
+ <style lang="scss">
41
+ .nav-link {
42
+ display: block !important;
43
+ padding: 1.2em;
44
+ border-radius: 0.5em;
45
+ font-weight: bold;
46
+ font-size: 14px;
47
+ color: black;
48
+ height: 3.8em;
49
+ width: 13em;
50
+ transition: all 150ms;
51
+
52
+ &:hover {
53
+ @apply bg-gray-200;
54
+ .nav-icon {
55
+ @apply text-gray-700;
56
+ }
57
+ }
58
+
59
+ &.is-active {
60
+ @apply bg-blue-100;
61
+ }
62
+
63
+ &.is-disabled {
64
+ @apply bg-inherit;
65
+ }
66
+
67
+ .label {
68
+ @apply transition-all;
69
+ }
70
+
71
+ .nav-icon {
72
+ @apply w-5 h-5 flex-shrink-0 text-black;
73
+ }
74
+ }
75
+
76
+ .is-collapsed {
77
+ .nav-link {
78
+ width: 3.8em;
79
+ }
80
+
81
+ .label {
82
+ @apply opacity-0;
83
+ }
84
+ }
85
+ </style>
@@ -0,0 +1 @@
1
+ export { default as NavigationMenu } from "./NavigationMenu.vue";
@@ -1,5 +1,6 @@
1
1
  export * from "./ActionTable";
2
2
  export * from "./AuditHistory";
3
3
  export * from "./DragAndDrop";
4
+ export * from "./Navigation";
4
5
  export * from "./PanelsDrawer";
5
6
  export * from "./Utility";
@@ -0,0 +1,18 @@
1
+ body {
2
+ height: 100vh;
3
+
4
+ #app,
5
+ #main-layout,
6
+ main {
7
+ height: 100%;
8
+ }
9
+ }
10
+
11
+ a {
12
+ cursor: pointer;
13
+
14
+ &.is-disabled {
15
+ opacity: 0.5;
16
+ cursor: not-allowed;
17
+ }
18
+ }
@@ -3,3 +3,4 @@
3
3
  @tailwind utilities;
4
4
 
5
5
  @import 'quasar-reset';
6
+ @import "general";