quasar-ui-danx 0.3.4 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-danx",
3
- "version": "0.3.4",
3
+ "version": "0.3.8",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
@@ -10,7 +10,8 @@
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",
@@ -27,6 +28,7 @@
27
28
  "core-js": "^3.0.0",
28
29
  "cssnano": "^4.1.10",
29
30
  "eslint": "^8.5.0",
31
+ "eslint-plugin-import": "^2.29.1",
30
32
  "eslint-plugin-vue": "^9.24.1",
31
33
  "fs-extra": "^8.1.0",
32
34
  "postcss": "^8.4.38",
@@ -1,29 +1,46 @@
1
1
  <template>
2
2
  <div
3
- class="p-4"
4
- :class="{ 'is-collapsed': collapsed }"
3
+ class="p-4"
4
+ :class="{ 'is-collapsed': collapsed }"
5
5
  >
6
6
  <div
7
- v-for="item in allowedItems"
8
- :key="'nav-item-' + item.label"
9
- class="nav-menu-item"
10
- :class="item.class || itemClass"
7
+ v-for="item in allowedItems"
8
+ :key="'nav-item-' + item.label"
9
+ class="nav-menu-item-box"
11
10
  >
12
- <div class="flex flex-nowrap" @click="item.onClick">
13
- <div v-if="item.icon">
11
+ <div
12
+ class="nav-menu-item flex flex-nowrap"
13
+ :class="item.class || itemClass"
14
+ @click="item.onClick"
15
+ >
16
+ <div
17
+ v-if="item.icon"
18
+ class="flex-shrink-0"
19
+ >
14
20
  <component
15
- :is="item.icon"
16
- class="nav-icon"
17
- :class="item.iconClass"
21
+ :is="item.icon"
22
+ class="nav-icon"
23
+ :class="item.iconClass"
18
24
  />
19
25
  </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>
26
+ <div
27
+ v-if="!collapsed"
28
+ class="label ml-2"
29
+ :class="item.labelClass"
30
+ >
31
+ {{ item.label }}
32
+ </div>
33
+ <QTooltip
34
+ v-if="collapsed"
35
+ v-bind="item.tooltip"
36
+ >
37
+ {{ item.tooltip?.text || item.label }}
38
+ </QTooltip>
22
39
  </div>
23
40
  <QSeparator
24
- v-if="item.separator"
25
- :key="'separator-' + item.label"
26
- class="my-2"
41
+ v-if="item.separator"
42
+ :key="'separator-' + item.label"
43
+ class="my-2"
27
44
  />
28
45
  </div>
29
46
  </div>
@@ -52,12 +69,10 @@ const allowedItems = computed(() => props.items.filter((item) => !item.hidden));
52
69
 
53
70
  <style lang="scss">
54
71
  .nav-menu-item {
55
- padding: 1.2em;
72
+ padding: 1em;
56
73
  border-radius: 0.5em;
57
74
  font-weight: bold;
58
75
  font-size: 14px;
59
- height: 3.8em;
60
- width: 13em;
61
76
  transition: all 150ms, color 0ms;
62
77
  cursor: pointer;
63
78
 
@@ -2,5 +2,6 @@
2
2
  @tailwind components;
3
3
  @tailwind utilities;
4
4
 
5
- @import 'quasar-reset';
5
+ @import "quasar-reset";
6
6
  @import "general";
7
+ @import "transitions";
@@ -0,0 +1,15 @@
1
+ body.disable-all-transitions {
2
+ * {
3
+ transition: none !important;
4
+ }
5
+ }
6
+
7
+ .v-enter-active,
8
+ .v-leave-active {
9
+ transition: opacity 0.5s ease;
10
+ }
11
+
12
+ .v-enter-from,
13
+ .v-leave-to {
14
+ opacity: 0;
15
+ }