quasar-ui-danx 0.3.3 → 0.3.7
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/danx.es.js +1773 -1740
- 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 +4 -3
- package/src/components/Navigation/NavigationMenu.vue +25 -24
- package/src/components/Utility/Files/FilePreview.vue +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quasar-ui-danx",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"author": "Dan <dan@flytedesk.com>",
|
|
5
5
|
"description": "DanX Vue / Quasar component library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "cd dev && quasar dev && cd ..",
|
|
12
12
|
"build": "vite build",
|
|
13
|
-
"preview": "vite preview"
|
|
13
|
+
"preview": "vite preview",
|
|
14
|
+
"postversion": "yarn build && npm publish && cd .. && git add ui && git commit -m \"v$npm_package_version\" && git tag \"v$npm_package_version\" && git push"
|
|
14
15
|
},
|
|
15
16
|
"repository": {
|
|
16
17
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/flytedan/quasar-
|
|
18
|
+
"url": "https://github.com/flytedan/quasar-ui-danx"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
21
|
"@quasar/extras": "^1.16.4",
|
|
@@ -6,15 +6,20 @@
|
|
|
6
6
|
<div
|
|
7
7
|
v-for="item in allowedItems"
|
|
8
8
|
:key="'nav-item-' + item.label"
|
|
9
|
+
class="nav-menu-item"
|
|
10
|
+
:class="item.class || itemClass"
|
|
9
11
|
>
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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>
|
|
18
23
|
<QSeparator
|
|
19
24
|
v-if="item.separator"
|
|
20
25
|
:key="'separator-' + item.label"
|
|
@@ -28,6 +33,14 @@ import { computed } from "vue";
|
|
|
28
33
|
|
|
29
34
|
const props = defineProps({
|
|
30
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
|
+
},
|
|
31
44
|
items: {
|
|
32
45
|
type: Array,
|
|
33
46
|
required: true
|
|
@@ -38,27 +51,15 @@ const allowedItems = computed(() => props.items.filter((item) => !item.hidden));
|
|
|
38
51
|
</script>
|
|
39
52
|
|
|
40
53
|
<style lang="scss">
|
|
41
|
-
.nav-
|
|
42
|
-
display: block !important;
|
|
54
|
+
.nav-menu-item {
|
|
43
55
|
padding: 1.2em;
|
|
44
56
|
border-radius: 0.5em;
|
|
45
57
|
font-weight: bold;
|
|
46
58
|
font-size: 14px;
|
|
47
|
-
color: black;
|
|
48
59
|
height: 3.8em;
|
|
49
60
|
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
|
-
}
|
|
61
|
+
transition: all 150ms, color 0ms;
|
|
62
|
+
cursor: pointer;
|
|
62
63
|
|
|
63
64
|
&.is-disabled {
|
|
64
65
|
@apply bg-inherit;
|
|
@@ -69,7 +70,7 @@ const allowedItems = computed(() => props.items.filter((item) => !item.hidden));
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
.nav-icon {
|
|
72
|
-
@apply w-5 h-5 flex-shrink-0
|
|
73
|
+
@apply w-5 h-5 flex-shrink-0;
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -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
|