@modelmenu/navigation 2.6.0 → 2.8.0

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.
@@ -6,6 +6,7 @@
6
6
  <FontAwesomeIcon
7
7
  v-if="menuBar.icon"
8
8
  :icon="menuBar.icon"
9
+ :size="'1x'"
9
10
  ></FontAwesomeIcon>
10
11
  </div>
11
12
  </div>
@@ -67,7 +68,7 @@
67
68
  <slot name="handler"></slot>
68
69
  </div>
69
70
 
70
- <div class="loader" v-if="menuBar.loading">
71
+ <div class="loader" v-if="menuBar.loading && loader">
71
72
  <svg class="loader-icon" viewBox="0 0 64 64" aria-hidden="true">
72
73
  <circle class="loader-track" cx="32" cy="32" r="24"></circle>
73
74
  <circle class="loader-ring" cx="32" cy="32" r="24"></circle>
@@ -86,10 +87,13 @@ import {
86
87
  } from "./models/menu-models";
87
88
  import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
88
89
  import {
90
+ faAlignJustify,
89
91
  faChevronDown,
90
92
  faChevronLeft,
91
93
  faChevronRight,
92
94
  faChevronUp,
95
+ faClose,
96
+ faHamburger,
93
97
  } from "@fortawesome/free-solid-svg-icons";
94
98
  import MenuItem from "./components/menu-item.vue";
95
99
  import SubMenuItems from "./components/sub-menu-items.vue";
@@ -126,6 +130,10 @@ export default defineComponent({
126
130
  type: ThemeModel,
127
131
  default: () => new ThemeModel(),
128
132
  },
133
+ loader: {
134
+ type: Boolean,
135
+ default: () => false
136
+ }
129
137
  },
130
138
  emits: ["changeTheme"],
131
139
  watch: {
@@ -169,6 +177,7 @@ export default defineComponent({
169
177
  topItems: this.topItems,
170
178
  leftItems: this.leftItems,
171
179
  floor: 20,
180
+ loader: this.loader,
172
181
  router: router,
173
182
  toTop: toTop,
174
183
  menubar: menubar,
@@ -214,7 +223,7 @@ export default defineComponent({
214
223
  openVerticalMenu(event: MouseEvent) {
215
224
  this.menuBar.opened = !this.menuBar.opened;
216
225
  this.menuBar.changeIcon = "flip";
217
- this.menuBar.icon = this.menuBar.opened ? faChevronRight : faChevronLeft;
226
+ this.menuBar.icon = this.menuBar.opened ? faClose : faAlignJustify;
218
227
  },
219
228
  openSubMenu(item: any) {
220
229
  item.opened = !item.opened;
@@ -456,13 +465,16 @@ export default defineComponent({
456
465
  .menu-icon {
457
466
  width: 30px;
458
467
  height: 30px;
459
- border: 2px solid rgba(70, 70, 70, 0.4);
460
468
  display: flex;
461
469
  justify-content: center;
462
470
  align-items: center;
463
471
  border-radius: 4px;
464
472
  }
465
473
 
474
+ .menu-icon svg {
475
+ font-size: 18px;
476
+ }
477
+
466
478
  .menu-icon:hover {
467
479
  cursor: pointer;
468
480
  background-color: rgba(133, 133, 133, 0.1);
@@ -1,7 +1,6 @@
1
1
  import {
2
+ faAlignJustify,
2
3
  faChevronDown,
3
- faChevronRight,
4
- faChevronUp,
5
4
  } from "@fortawesome/free-solid-svg-icons";
6
5
 
7
6
  export class LeftMenuModel {
@@ -18,7 +17,7 @@ export class MenuItemModel {
18
17
  }
19
18
 
20
19
  export class MenuBarModel {
21
- icon: any = faChevronRight; //angle-arrow, bars, ellipsis
20
+ icon: any = faAlignJustify; //angle-arrow, bars, ellipsis
22
21
  name = "";
23
22
  loading = false;
24
23
  opened = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelmenu/navigation",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "",
5
5
  "main": "./menu/index.d.ts",
6
6
  "type": "module",