quasar-ui-danx 0.3.2 → 0.3.4

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.
@@ -14,6 +14,7 @@
14
14
  @click="toggleSelect(option)"
15
15
  >
16
16
  <QCheckbox
17
+ @click.stop="toggleSelect(option)"
17
18
  :model-value="isSelected(option)"
18
19
  class="mr-2"
19
20
  />
@@ -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 overflow-hidden"
6
- :class="{'rounded-2xl': !square}"
5
+ class="grow h-full"
7
6
  @click="showPreview = true"
8
7
  >
9
8
  <div
@@ -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";