aloha-vue 1.2.75 → 1.2.76

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/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.75",
17
+ "version": "1.2.76",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -6,8 +6,10 @@ import {
6
6
 
7
7
  import AMenuBreadcrumbs from "../AMenuBreadcrumbs/AMenuBreadcrumbs";
8
8
  import AMenuPanelGroup from "../AMenuPanelGroup/AMenuPanelGroup";
9
+ import ATranslation from "../../ATranslation/ATranslation";
9
10
 
10
11
  import GroupAPI from "./compositionAPI/GroupAPI";
12
+ import HeaderAPI from "./compositionAPI/HeaderAPI";
11
13
  import IdAPI from "./compositionAPI/IdAPI";
12
14
  import LevelAPI from "./compositionAPI/LevelAPI";
13
15
  import PanelOpenAPI from "./compositionAPI/PanelOpenAPI";
@@ -103,15 +105,24 @@ export default {
103
105
  openedLevelIndex,
104
106
  });
105
107
 
108
+ const {
109
+ isHeaderPanelVisible,
110
+ parentLabel,
111
+ } = HeaderAPI(props, {
112
+ openedLevelIndex,
113
+ });
114
+
106
115
  provide("isChildPanelOpen", isChildPanelOpen);
107
116
  provide("isPanelMain", isPanelMain);
108
117
 
109
118
  return {
110
119
  isChildPanelOpen,
120
+ isHeaderPanelVisible,
111
121
  isItemsWithoutGroup,
112
122
  isPanelOpen,
113
123
  itemsGroup,
114
124
  panelId,
125
+ parentLabel,
115
126
  styleZIndex,
116
127
  };
117
128
  },
@@ -135,6 +146,15 @@ export default {
135
146
  isSearchActive: this.isSearchActive,
136
147
  panelParentsOpen: this.panelParentsOpen,
137
148
  }),
149
+ (this.isHeaderPanelVisible) && h("div", {
150
+ class: "a_menu_2__panel_header",
151
+ }, [
152
+ h(ATranslation, {
153
+ class: "a_menu_2__panel_header__text",
154
+ html: this.parentLabel,
155
+ tag: "strong",
156
+ }),
157
+ ]),
138
158
  h("ul", {
139
159
  class: "a_menu_2__listview",
140
160
  }, [
@@ -0,0 +1,36 @@
1
+ import {
2
+ computed,
3
+ inject,
4
+ toRef,
5
+ } from "vue";
6
+
7
+ import AKeyLabel from "../../../const/AKeyLabel";
8
+
9
+ import {
10
+ get,
11
+ } from "lodash-es";
12
+
13
+ export default function HeaderAPI(props, {
14
+ openedLevelIndex = computed(() => 0),
15
+ }) {
16
+ const dataKeyById = toRef(props, "dataKeyById");
17
+ const isPanelMain = toRef(props, "isPanelMain");
18
+ const parentId = toRef(props, "parentId");
19
+
20
+ const isMenuOpen = inject("isMenuOpen");
21
+
22
+ const isHeaderPanelVisible = computed(() => {
23
+ return !isPanelMain.value &&
24
+ !isMenuOpen.value &&
25
+ openedLevelIndex.value === 0;
26
+ });
27
+
28
+ const parentLabel = computed(() => {
29
+ return get(dataKeyById.value, `${ parentId.value }.${ AKeyLabel }`);
30
+ });
31
+
32
+ return {
33
+ isHeaderPanelVisible,
34
+ parentLabel,
35
+ };
36
+ }
@@ -236,7 +236,7 @@ export default {
236
236
  }, this.countChildren),
237
237
  h(AIcon, {
238
238
  class: "a_menu_2__link__counter__icon",
239
- icon: "ChevronRight",
239
+ icon: "MenuChevronRight",
240
240
  })
241
241
  ]),
242
242
  ]),
@@ -18,6 +18,7 @@ import CheckLg from "../AIcon/Icons/CheckLg";
18
18
  import ChevronDown from "../AIcon/Icons/ChevronDown";
19
19
  import ChevronLeft from "../AIcon/Icons/ChevronLeft";
20
20
  import ChevronRight from "../AIcon/Icons/ChevronRight";
21
+ import ChevronRightThin from "../AIcon/Icons/bootstrap-1-9-1/ChevronRight";
21
22
  import ChevronUp from "../AIcon/Icons/ChevronUp";
22
23
  import Close from "../AIcon/Icons/Close";
23
24
  import Cog from "../AIcon/Icons/Cog";
@@ -48,11 +49,12 @@ import Trash from "../AIcon/Icons/Trash";
48
49
 
49
50
  export const iconPluginOptions = ref({
50
51
  icons: {
51
- Aloha,
52
+ _NoImage,
52
53
  AlertDanger,
53
- AlertSuccess,
54
54
  AlertInfo,
55
+ AlertSuccess,
55
56
  AlertWarning,
57
+ Aloha,
56
58
  AngleDown,
57
59
  AngleLeft,
58
60
  AngleRight,
@@ -64,8 +66,8 @@ export const iconPluginOptions = ref({
64
66
  ChevronLeft,
65
67
  ChevronRight,
66
68
  ChevronUp,
67
- Cog,
68
69
  Close,
70
+ Cog,
69
71
  Cross,
70
72
  Dnd,
71
73
  DoubleAngleDown,
@@ -78,6 +80,7 @@ export const iconPluginOptions = ref({
78
80
  FloppyDisk,
79
81
  Home,
80
82
  Lock,
83
+ MenuChevronRight: ChevronRightThin,
81
84
  Minus,
82
85
  Ok,
83
86
  OptionHorizontal,
@@ -90,7 +93,6 @@ export const iconPluginOptions = ref({
90
93
  ThList,
91
94
  ThreeDots,
92
95
  Trash,
93
- _NoImage,
94
96
  },
95
97
  });
96
98
 
@@ -24,28 +24,38 @@
24
24
  --a_menu_2_panel_iconpanel_size: var(--a_menu_2_width_collapsed);
25
25
  --a_menu_2_panel_color: var(--a_color_gray_600);
26
26
  --a_menu_2_link_color: var(--a_color_gray_900);
27
+ --a_menu_2_link_hover_color: var(--a_color_gray_900);
28
+ --a_menu_2_link_hover_bg: var(--a_color_gray_200);
27
29
  --a_menu_2_listitem_padding: .3rem;
28
30
  --a_menu_2_listitem_panel_secondary_padding_x: .6rem;
29
31
  --a_menu_2_listitem_panel_secondary_padding_y: .3rem;
30
32
  --a_menu_2_link_padding_x: .7rem;
31
- --a_menu_2_link_padding_y: .7rem;
33
+ --a_menu_2_link_padding_y: .5rem;
32
34
  --a_menu_2_link_selected_bg: var(--a_color_gray_200);
33
35
  --a_menu_2_link_selected_color: inherit;
34
36
  --a_menu_2_link_border_color: transparent;
35
37
  --a_menu_2_link_border_radius: .3rem;
38
+ --a_menu_2_link_focus_size: 0 0 1px 3px;
36
39
  --a_menu_2_icon_color: var(--a_menu_2_link_color);
37
- --a_menu_2_icon_focus_shadow_color: var(--a_color_focus);
40
+ --a_menu_2_focus_shadow_color: var(--a_color_focus);
38
41
  --a_menu_2_list_header_bg: var(--a_color_gray_200);
39
- --a_menu_2_breadcrumb_min_height: 60px;
42
+ --a_menu_2_breadcrumb_min_height: 65px;
40
43
  --a_menu_2_breadcrumb_border_bottom_width: 1px;
41
44
  --a_menu_2_submenu_open_bg: var(--a_color_primary);
42
45
  --a_menu_2_submenu_open_color: var(--a_color_white);
43
46
  --a_menu_2_submenu_border_radius: 1rem;
44
47
  --a_menu_2_submenu_border_width: 2px;
45
48
  --a_menu_2_search_height: 50px;
49
+ --a_menu_2_search_link_focus_size: inset 0 0 1px 2px;
46
50
  --a_menu_2_close_panel_width: 300px;
47
51
  --a_menu_2_close_panel_max_height: 400px;
48
52
  --a_menu_2_close_panel_border_radius: .3rem;
53
+ --a_menu_2_close_panel_box_shadow_color: var(--a_color_gray_600);
54
+ --a_menu_2_close_panel_box_shadow_size: 0 0 7px 3px;
55
+ --a_menu_2_close_panel_header_color: var(--a_color_gray_900);
56
+ --a_menu_2_close_panel_header_border_bottom_color: var(--a_color_gray_600);
57
+ --a_menu_2_close_panel_header_border_bottom_width: 1px;
58
+ --a_menu_2_link_line_horizontal_display: none;
49
59
 
50
60
  width: var(--a_menu_2_width);
51
61
  position: absolute;
@@ -101,7 +111,7 @@
101
111
  border-color: inherit;
102
112
  border-bottom-width: 1px;
103
113
  border-bottom-style: solid;
104
- display: block;
114
+ display: var(--a_menu_2_link_line_horizontal_display);
105
115
  position: absolute;
106
116
  inset-inline-start: 20px;
107
117
  inset-inline-end: 0;
@@ -135,11 +145,15 @@
135
145
  text-decoration: none;
136
146
  color: var(--a_menu_2_link_color);
137
147
  }
138
- &:focus,
148
+ &:focus {
149
+ outline: 0;
150
+ box-shadow: var(--a_menu_2_link_focus_size) var(--a_menu_2_focus_shadow_color);
151
+ color: var(--a_menu_2_link_color);
152
+ }
139
153
  &:hover {
140
154
  outline: 0;
141
- box-shadow: inset 0 0 1px 4px var(--a_menu_2_icon_focus_shadow_color);
142
155
  color: var(--a_menu_2_link_color);
156
+ background-color: var(--a_menu_2_link_hover_bg);
143
157
  }
144
158
  &.a_menu_2__link_active {
145
159
  --a_menu_2_icon_color: var(--a_menu_2_submenu_open_bg);
@@ -480,7 +494,8 @@
480
494
  top: auto;
481
495
  border: none;
482
496
  border-radius: var(--a_menu_2_close_panel_border_radius);
483
- box-shadow: 0 0 2px 2px var(--a_color_gray_600);
497
+ // Aloha
498
+ box-shadow: var(--a_menu_2_close_panel_box_shadow_size) var(--a_color_gray_600);
484
499
  max-height: var(--a_menu_2_close_panel_max_height);
485
500
  overflow-y: auto;
486
501
  z-index: 2;
@@ -545,7 +560,7 @@
545
560
  padding: 0.2rem 0.3rem;
546
561
  &:focus,
547
562
  &:hover {
548
- box-shadow: inset 0 0 1px 2px var(--a_menu_2_icon_focus_shadow_color);
563
+ box-shadow: var(--a_menu_2_search_link_focus_size) var(--a_menu_2_focus_shadow_color);
549
564
  }
550
565
  }
551
566
  .a_menu_2__breadcrumbs__item__divider {
@@ -568,4 +583,14 @@
568
583
  .a_menu_2__breadcrumb__ul_truncated__dropdown {
569
584
  padding: .2rem;
570
585
  min-width: auto;
586
+ }
587
+
588
+ .a_menu_2__panel_header {
589
+ color: var(--a_menu_2_close_panel_header_color);
590
+ border-bottom: var(--a_menu_2_close_panel_header_border_bottom_width) solid var(--a_menu_2_close_panel_header_border_bottom_color);
591
+ padding: var(--a_menu_2_listitem_panel_secondary_padding_y) var(--a_menu_2_listitem_panel_secondary_padding_x);
592
+ }
593
+ .a_menu_2__panel_header__text {
594
+ display: inline-block;
595
+ padding: var(--a_menu_2_link_padding_y) var(--a_menu_2_link_padding_x);
571
596
  }