@awes-io/ui 2.112.0 → 2.113.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,34 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.113.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.112.1...@awes-io/ui@2.113.0) (2024-10-15)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **aw-page-header:** hide breadcrumb wrapper if empty ([c7d1781](https://github.com/awes-io/client/commit/c7d17817d0807fdffc441734dfc7c0b052b6a7e1))
12
+
13
+
14
+ ### Features
15
+
16
+ * change logic for show active mobile menu childer ([d1d1e08](https://github.com/awes-io/client/commit/d1d1e08d31802cbe50ac3a941f408b9f8167b343))
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.112.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.112.0...@awes-io/ui@2.112.1) (2024-10-04)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * aw-dock z-index increased ([d552d36](https://github.com/awes-io/client/commit/d552d36487ff48115c94e61e39e8fad629d95283))
28
+ * z-indexes fix ([ee4a1ec](https://github.com/awes-io/client/commit/ee4a1ecdd99828391360159bafa7d10db834e6c1))
29
+
30
+
31
+
32
+
33
+
6
34
  # [2.112.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.111.0...@awes-io/ui@2.112.0) (2024-10-03)
7
35
 
8
36
 
@@ -13,7 +13,7 @@
13
13
  bottom: 0;
14
14
  min-height: 3.5rem;
15
15
  width: 100%;
16
- z-index: 20;
16
+ z-index: 19;
17
17
 
18
18
  & > * {
19
19
  flex-basis: 9rem;
@@ -12,7 +12,7 @@
12
12
  position: fixed;
13
13
  left: 0;
14
14
  bottom: 0;
15
- z-index: 10;
15
+ z-index: 21;
16
16
 
17
17
  touch-action: pan-y;
18
18
 
@@ -11,6 +11,12 @@
11
11
  gap: 1rem;
12
12
  padding: 0.5rem 1.5rem 0;
13
13
  padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
14
+
15
+ &-wrapper {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 1rem;
19
+ }
14
20
  }
15
21
 
16
22
  &__user-profile {
@@ -86,22 +86,22 @@
86
86
  }
87
87
  }
88
88
 
89
- /* @screen md {
89
+ @screen md {
90
90
  .aw-page-header {
91
91
  &__title {
92
- flex: 10 1 max-content;
92
+ flex: 1 1 max-content;
93
93
  }
94
94
 
95
95
  &__breadcrumbs,
96
96
  &__buttons {
97
- flex: 1 10 max-content;
97
+ flex: 1 0 max-content;
98
98
  }
99
99
 
100
100
  &__buttons {
101
101
  min-width: max-content;
102
102
  }
103
103
  }
104
- } */
104
+ }
105
105
 
106
106
  @screen lg {
107
107
  .aw-page-header {
@@ -6,6 +6,6 @@
6
6
 
7
7
  margin-bottom: 0;
8
8
  font-size: 1.125rem;
9
- line-height: 1;
9
+ line-height: 1.2222;
10
10
  display: inline-block;
11
11
  }
@@ -85,7 +85,7 @@
85
85
  border-radius: 50%;
86
86
 
87
87
  &:checked {
88
- background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
88
+ mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0ZM16 10C12.6863 10 10 12.6863 10 16C10 19.3137 12.6863 22 16 22C19.3137 22 22 19.3137 22 16C22 12.6863 19.3137 10 16 10Z' fill='%23D9D9D9'/%3E%3C/svg%3E");
89
89
  }
90
90
  }
91
91
 
@@ -312,7 +312,7 @@ export default {
312
312
  },
313
313
 
314
314
  optionLabel: {
315
- type: String,
315
+ type: [String, Function],
316
316
  default: ''
317
317
  },
318
318
 
@@ -19,15 +19,12 @@
19
19
  :title="_title"
20
20
  :title-showable="!isDesktop"
21
21
  :hide-title="!isDesktop && !isHeaderStuck"
22
+ :hide-breadcrumb="!(backUrl || isMenuToggler)"
22
23
  :container="container"
23
24
  is-container
24
25
  :is-stuck="isHeaderStuck && !isDesktop"
25
26
  hide-menu
26
27
  class="aw-page__header"
27
- :style="{
28
- '--breadcrumb-width':
29
- backUrl || isMenuToggler ? '2.5rem' : '0px'
30
- }"
31
28
  >
32
29
  <template #breadcrumbs>
33
30
  <slot name="headline-breadcrumb">
@@ -47,6 +47,7 @@
47
47
  v-for="({ listeners, tooltip, ...attrs },
48
48
  i) in splitButtons.fixed"
49
49
  :key="i"
50
+ style="--btn-padding-x: 1rem"
50
51
  v-tooltip="tooltip"
51
52
  v-bind="attrs"
52
53
  auto-width
@@ -8,7 +8,7 @@
8
8
  }"
9
9
  :style="{ '--header-container-width': headerContainerWidth }"
10
10
  >
11
- <div class="aw-page-header__breadcrumbs">
11
+ <div v-if="!hideBreadcrumb" class="aw-page-header__breadcrumbs">
12
12
  <slot name="breadcrumbs"> </slot>
13
13
  </div>
14
14
 
@@ -65,6 +65,8 @@ export default {
65
65
  default: 'full'
66
66
  },
67
67
 
68
+ hideBreadcrumb: Boolean,
69
+
68
70
  hideTitle: Boolean,
69
71
 
70
72
  titleShowable: Boolean,
@@ -42,7 +42,9 @@
42
42
  !item.expanded
43
43
  "
44
44
  class="aw-nav__toggler"
45
- :class="{ 'aw-nav__toggler--open': openedChildren[i] }"
45
+ :class="{
46
+ 'aw-nav__toggler--open': i === openedChildrenIndex
47
+ }"
46
48
  :[$options.TOGGLE_CHILDREN_ATTR]="i"
47
49
  >
48
50
  <AwIconSystemMono name="angle" size="16" />
@@ -54,7 +56,7 @@
54
56
  :is="item.expanded ? 'div' : 'AwAccordionFold'"
55
57
  v-if="item.children && item.children.length"
56
58
  :key="'children-' + i"
57
- :show="openedChildren[i]"
59
+ :show="i === openedChildrenIndex"
58
60
  >
59
61
  <AwNavItem
60
62
  v-for="(subchild, j) in item.children"
@@ -133,7 +135,7 @@ export default {
133
135
 
134
136
  data() {
135
137
  return {
136
- openedChildren: [],
138
+ openedChildrenIndex: null,
137
139
  tooltips: {}
138
140
  }
139
141
  },
@@ -147,11 +149,7 @@ export default {
147
149
  watch: {
148
150
  items: {
149
151
  handler(items) {
150
- this.openedChildren = items.map((item) => {
151
- if (item.expanded) {
152
- return null
153
- }
154
-
152
+ this.openedChildrenIndex = items.findIndex((item) => {
155
153
  return (
156
154
  item === this.activeMenuItem ||
157
155
  item.children.some(
@@ -201,14 +199,13 @@ export default {
201
199
  if (toggleTarget) {
202
200
  $event.stopPropagation()
203
201
 
204
- const index = toggleTarget.getAttribute(TOGGLE_CHILDREN_ATTR)
205
-
206
- this.$set(
207
- this.openedChildren,
208
- index,
209
- !this.openedChildren[index]
202
+ const index = Number(
203
+ toggleTarget.getAttribute(TOGGLE_CHILDREN_ATTR)
210
204
  )
211
205
 
206
+ this.openedChildrenIndex =
207
+ this.openedChildrenIndex === index ? null : index
208
+
212
209
  return
213
210
  }
214
211
 
@@ -217,9 +214,9 @@ export default {
217
214
  if (openTarget) {
218
215
  $event.stopPropagation()
219
216
 
220
- const index = openTarget.getAttribute(OPEN_CHILDREN_ATTR)
221
-
222
- this.$set(this.openedChildren, index, true)
217
+ this.openedChildrenIndex = Number(
218
+ openTarget.getAttribute(OPEN_CHILDREN_ATTR)
219
+ )
223
220
 
224
221
  return
225
222
  }
@@ -3,13 +3,24 @@
3
3
  <div class="aw-more__buttons">
4
4
  <AwButton color="mono" icon="awesio/arrow" @click="onClickGoBack" />
5
5
 
6
- <AwButton
7
- v-if="user"
8
- color="mono"
9
- icon="awesio/edit"
10
- :href="profileUrl"
11
- back
12
- />
6
+ <div
7
+ v-if="user || beforeProfileButtonComponent"
8
+ class="aw-more__buttons-wrapper"
9
+ >
10
+ <Component
11
+ v-if="beforeProfileButtonComponent"
12
+ :is="beforeProfileButtonComponent.is"
13
+ v-bind="beforeProfileButtonComponent.props"
14
+ />
15
+
16
+ <AwButton
17
+ v-if="user"
18
+ color="mono"
19
+ icon="awesio/edit"
20
+ :href="profileUrl"
21
+ back
22
+ />
23
+ </div>
13
24
  </div>
14
25
 
15
26
  <div class="aw-more__profile" v-if="user">
@@ -131,7 +142,8 @@ export default {
131
142
  'logoComponent',
132
143
  'userMenuAvatarComponent',
133
144
  'afterMobileMenuComponent',
134
- 'beforeMobileMenuComponent'
145
+ 'beforeMobileMenuComponent',
146
+ 'beforeProfileButtonComponent'
135
147
  ]),
136
148
 
137
149
  profileUrl() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.112.0",
3
+ "version": "2.113.0",
4
4
  "description": "User Interface (UI) components",
5
5
  "keywords": [
6
6
  "ui",
@@ -114,5 +114,5 @@
114
114
  "rollup-plugin-visualizer": "^2.6.0",
115
115
  "rollup-plugin-vue": "^5.0.1"
116
116
  },
117
- "gitHead": "c8bbf723d678f1cbb8891251a2c6cf0566c73b8f"
117
+ "gitHead": "03c333535144de280da2aa6117e41ab92a144102"
118
118
  }
package/store/awesIo.js CHANGED
@@ -39,6 +39,7 @@ export const state = () => ({
39
39
  },
40
40
  mobileMenuOpened: false,
41
41
  beforeMobileMenu: null,
42
+ beforeProfileButton: null,
42
43
  userMenuAvatar: null,
43
44
  afterMobileMenu: null,
44
45
  bottomBarAction: null,
@@ -132,6 +133,10 @@ export const getters = {
132
133
  return state.beforeMobileMenu
133
134
  },
134
135
 
136
+ beforeProfileButtonComponent(state) {
137
+ return state.beforeProfileButton
138
+ },
139
+
135
140
  userMenuAvatarComponent(state) {
136
141
  return state.userMenuAvatar
137
142
  },
@@ -233,6 +238,12 @@ export const mutations = {
233
238
  }
234
239
  },
235
240
 
241
+ SET_BEFORE_PROFILE_BUTTON(state, payload) {
242
+ if (payload && payload.component) {
243
+ state.beforeProfileButton = payload.component
244
+ }
245
+ },
246
+
236
247
  SET_USER_MENU_AVATAR(state, payload) {
237
248
  if (payload && payload.component) {
238
249
  state.userMenuAvatar = payload.component