@awes-io/ui 2.93.0 → 2.94.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,36 @@
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.94.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.93.1...@awes-io/ui@2.94.0) (2024-02-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **aw-image-upload:** call to method fixed ([220647b](https://github.com/awes-io/client/commit/220647b9e5a8fe1ce91e5b0b8ab7d8996db9b865))
12
+
13
+
14
+ ### Features
15
+
16
+ * **action-icon:** xxs size added ([7057713](https://github.com/awes-io/client/commit/70577138238e906679094df73ca622b6155163a6))
17
+ * change btn color and radius in mob select close btn ([add50f4](https://github.com/awes-io/client/commit/add50f47d76124af0c0ef7fde44307b2447aa090))
18
+ * change style in mobile menu page ([6f5c7b7](https://github.com/awes-io/client/commit/6f5c7b7cd49a2d873ace9b1907f2854ca930e6bb))
19
+
20
+
21
+
22
+
23
+
24
+ ## [2.93.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.93.0...@awes-io/ui@2.93.1) (2024-02-02)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * fix href in mobile menu item ([6c869e8](https://github.com/awes-io/client/commit/6c869e8d17f2650fb69cf25ee8019c9ab965636f))
30
+ * mobile menu items count fixed ([ff4fd20](https://github.com/awes-io/client/commit/ff4fd20c8608b4af27eb288e8e320d9fef323e90))
31
+
32
+
33
+
34
+
35
+
6
36
  # [2.93.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.92.0...@awes-io/ui@2.93.0) (2024-02-01)
7
37
 
8
38
 
@@ -3,12 +3,12 @@
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  justify-content: center;
6
- gap: 0.5rem;
6
+ gap: min(0.5rem, calc(var(--size) / 10));
7
7
  flex-shrink: 0;
8
8
 
9
9
  width: var(--size);
10
10
  height: var(--size);
11
- padding: max(0.25rem, calc(var(--size) / 8));
11
+ padding: min(0.25rem, calc(var(--size) / 8));
12
12
  border-radius: var(--radius);
13
13
 
14
14
  background-color: var(--bg-color);
@@ -22,8 +22,8 @@
22
22
  }
23
23
 
24
24
  small {
25
- font-size: 0.875rem;
26
- line-height: 1.125rem;
25
+ font-size: min(0.875rem, calc(var(--size) / 4));
26
+ line-height: 1.2857;
27
27
  text-align: center;
28
28
  }
29
29
 
@@ -20,6 +20,7 @@
20
20
 
21
21
  li + li .aw-mobile-menu-nav__item--divide {
22
22
  position: relative;
23
+ padding-top: 2.5rem;
23
24
 
24
25
  &:before {
25
26
  @apply bg-mono-800;
@@ -28,7 +29,7 @@
28
29
  height: 1px;
29
30
 
30
31
  position: absolute;
31
- top: 0;
32
+ top: 0.75rem;
32
33
  left: 1.5rem;
33
34
  right: 1.5rem;
34
35
  }
@@ -12,7 +12,7 @@
12
12
 
13
13
  <slot v-else>
14
14
  <AwIcon :name="icon" class="aw-action-icon__icon" />
15
- <small v-if="text">{{ text }}</small>
15
+ <small v-if="isTextVisible">{{ text }}</small>
16
16
  </slot>
17
17
  </span>
18
18
  </template>
@@ -22,10 +22,14 @@ import { toColor, toOnColor } from '@AwUtils/styles'
22
22
  import { isAnimatedIcon } from '@AwUtils/icons/animated'
23
23
 
24
24
  const SIZES = {
25
+ xxs: {
26
+ size: '1rem',
27
+ iconSize: '0.5rem',
28
+ radius: '0.25rem'
29
+ },
25
30
  xs: {
26
31
  size: '1.5rem',
27
32
  iconSize: '0.75rem',
28
- iconWithTextSize: '0.5rem',
29
33
  radius: '0.3125rem'
30
34
  },
31
35
  sm: {
@@ -66,7 +70,7 @@ const SIZES_MOBILE = {
66
70
 
67
71
  const SIZES_NAMES = Object.keys(SIZES)
68
72
 
69
- const SIZE_DEFAULT = SIZES_NAMES[2]
73
+ const SIZE_DEFAULT = 'md'
70
74
 
71
75
  export default {
72
76
  name: 'AwActionIcon',
@@ -122,16 +126,20 @@ export default {
122
126
  },
123
127
 
124
128
  computed: {
125
- styles() {
129
+ sizeConfig() {
126
130
  const sizes = this.$screen[this.desktopFrom] ? SIZES : SIZES_MOBILE
127
- const size = sizes[this.size] || sizes[SIZE_DEFAULT]
128
131
 
132
+ return sizes[this.size] || sizes[SIZE_DEFAULT]
133
+ },
134
+
135
+ styles() {
129
136
  const styles = {
130
- '--size': size.size,
131
- '--icon-size': this.text
132
- ? size.iconWithTextSize
133
- : size.iconSize,
134
- '--radius': size.radius,
137
+ '--size': this.sizeConfig.size,
138
+ '--icon-size':
139
+ this.text && this.isTextVisible
140
+ ? this.sizeConfig.iconWithTextSize
141
+ : this.sizeConfig.iconSize,
142
+ '--radius': this.sizeConfig.radius,
135
143
  '--color': this.onColor
136
144
  ? toColor(this.onColor)
137
145
  : toOnColor(this.color),
@@ -142,6 +150,10 @@ export default {
142
150
  return styles
143
151
  },
144
152
 
153
+ isTextVisible() {
154
+ return !!(this.text && this.sizeConfig.iconWithTextSize)
155
+ },
156
+
145
157
  isAnimatedIcon() {
146
158
  return isAnimatedIcon(this.icon)
147
159
  }
@@ -139,7 +139,12 @@
139
139
  @input="_applySearch"
140
140
  >
141
141
  <template #prefix>
142
- <AwButton color="mono" v-if="isOpened" @click="_close">
142
+ <AwButton
143
+ style="--btn-radius: 0.375rem"
144
+ color="mono-light"
145
+ v-if="isOpened"
146
+ @click="_close"
147
+ >
143
148
  <template #icon>
144
149
  <AwIconSystemMono name="arrow" />
145
150
  </template>
@@ -152,7 +152,8 @@
152
152
  >
153
153
  <template #prefix>
154
154
  <AwButton
155
- color="mono"
155
+ style="--btn-radius: 0.375rem"
156
+ color="mono-light"
156
157
  v-if="isOpened"
157
158
  @click="close"
158
159
  >
@@ -259,7 +259,7 @@ export default {
259
259
  data
260
260
  })
261
261
 
262
- return getValueFromResult(result)
262
+ return this.getValueFromResult(result)
263
263
  }
264
264
  }
265
265
  }
@@ -23,22 +23,10 @@
23
23
  (item.isDivide || allDivides) && i
24
24
  }
25
25
  ]"
26
- :href="_getChildrenCount(item) ? null : item.href"
26
+ :href="item.href"
27
27
  :arrow="checkShowArrow(item)"
28
28
  :active="isActive(item)"
29
- v-on="
30
- _getChildrenCount(item)
31
- ? {
32
- click: () =>
33
- $emit(
34
- 'click:submenu',
35
- item.children,
36
- item.subtitle || item.text,
37
- item.href
38
- )
39
- }
40
- : item.listeners || null
41
- "
29
+ v-on="item.listeners || null"
42
30
  />
43
31
  </li>
44
32
  </slot>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="aw-more">
3
3
  <div class="aw-more__profile" v-if="user">
4
- <AwAvatar :src="user.src" :name="user.name" size="144" />
4
+ <AwAvatar :src="user.src" :name="user.name" size="112" />
5
5
 
6
6
  <AwHeadline tag="span" class="aw-more__profile-name mt-2">
7
7
  {{ user.name }}
@@ -82,7 +82,20 @@
82
82
  </template>
83
83
  </AwMobileMenuNav>
84
84
 
85
- <AwMobileMenuNav :items="tertiaryMenu" class="my-6" />
85
+ <AwMobileMenuNav :items="tertiaryMenu" class="my-6">
86
+ <template #default="{items, _getChildrenCount, isActive }">
87
+ <li v-for="(item, i) in items" :key="i" v-show="!item.abstract">
88
+ <AwMobileMenuItem
89
+ v-bind="item"
90
+ :href="item.href"
91
+ theme="island"
92
+ :arrow="!!(item.href || _getChildrenCount(item))"
93
+ :active="isActive(item)"
94
+ v-on="item.listeners"
95
+ />
96
+ </li>
97
+ </template>
98
+ </AwMobileMenuNav>
86
99
 
87
100
  <slot name="after-mobile-menu">
88
101
  <Component
@@ -97,7 +110,7 @@
97
110
  </template>
98
111
 
99
112
  <script>
100
- import { mapGetters } from 'vuex'
113
+ import { mapState, mapGetters } from 'vuex'
101
114
  import { lensProp, pathOr, viewOr } from 'rambdax'
102
115
 
103
116
  import AwMobileMenuNav from '@AwLayouts/_AwMobileMenuNav.vue'
@@ -121,12 +134,13 @@ export default {
121
134
  },
122
135
 
123
136
  computed: {
137
+ ...mapState('awesIo', ['bottomBarAction']),
138
+
124
139
  ...mapGetters('awesIo', [
125
140
  'user',
126
141
  'logoComponent',
127
142
  'afterMobileMenuComponent',
128
- 'beforeMobileMenuComponent',
129
- 'bottomBarAction'
143
+ 'beforeMobileMenuComponent'
130
144
  ]),
131
145
 
132
146
  profileUrl() {
@@ -134,13 +148,13 @@ export default {
134
148
  },
135
149
 
136
150
  menuItemsStartIndex() {
137
- return VISIBLE_ITEMS_COUNT - (this.bottomBarAction ? 2 : 1)
151
+ return VISIBLE_ITEMS_COUNT - (this.bottomBarAction ? 1 : 0)
138
152
  },
139
153
 
140
154
  mainMenu() {
141
- return viewOr([], lensProp('mainMenu'), this.layoutProvider).filter(
142
- ({ is }) => !is
143
- ).slice(this.menuItemsStartIndex)
155
+ return viewOr([], lensProp('mainMenu'), this.layoutProvider)
156
+ .filter(({ is }) => !is)
157
+ .slice(this.menuItemsStartIndex)
144
158
  },
145
159
 
146
160
  secondaryMenu() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.93.0",
3
+ "version": "2.94.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": "f26263752064890282eda08c1e201dc59adc25ac"
117
+ "gitHead": "e89427eeea7b836568dccea9f19a525abd85b1d1"
118
118
  }