@awes-io/ui 2.122.0 → 2.124.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,33 @@
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.124.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.123.0...@awes-io/ui@2.124.0) (2024-12-17)
7
+
8
+
9
+ ### Features
10
+
11
+ * change style for page and layout ([d89ce87](https://github.com/awes-io/client/commit/d89ce87602251d10c7979145ddf4495de23a523a))
12
+
13
+
14
+
15
+
16
+
17
+ # [2.123.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.122.0...@awes-io/ui@2.123.0) (2024-12-16)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * fix file uploader ([cd87010](https://github.com/awes-io/client/commit/cd8701010d7955cf8363b6273ca0f919115380ca))
23
+
24
+
25
+ ### Features
26
+
27
+ * change style for header notification ([0e47a49](https://github.com/awes-io/client/commit/0e47a49b62e2a17de432a4aeb076d82596dbbef2))
28
+
29
+
30
+
31
+
32
+
6
33
  # [2.122.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.121.0...@awes-io/ui@2.122.0) (2024-12-13)
7
34
 
8
35
 
@@ -8,58 +8,102 @@
8
8
  flex: auto;
9
9
  flex-direction: column;
10
10
  gap: 1rem;
11
- padding: 1rem 0.5rem 1rem 1rem;
11
+ padding: 1rem;
12
12
 
13
13
  &-content {
14
14
  display: flex;
15
- gap: 0.5rem;
15
+ gap: 1rem;
16
+
17
+ &-text {
18
+ font-weight: 700;
19
+ font-size: 0.875rem;
20
+ line-height: 1rem;
21
+ }
22
+ }
23
+
24
+ &-block {
25
+ display: flex;
26
+ justify-content: space-between;
27
+ gap: 1rem;
28
+ flex: auto;
29
+
30
+ &--icon {
31
+ padding-left: 2rem;
32
+ }
16
33
  }
17
34
 
18
35
  &-buttons {
19
36
  display: flex;
20
37
  gap: 1rem;
38
+
39
+ .aw-button {
40
+ border-radius: 0.3125rem;
41
+ font-weight: 700;
42
+
43
+ --btn-bg-color: #ffffff;
44
+ --btn-color: #14171d;
45
+
46
+ &:hover {
47
+ background-color: #e7eaed;
48
+ border-color: #e7eaed;
49
+ }
50
+ }
21
51
  }
22
52
  }
23
53
 
24
- &__content {
25
- flex-grow: 1;
26
-
54
+ &__close-button {
55
+ display: flex;
27
56
  align-items: center;
28
- justify-content: center;
57
+ gap: 0.25rem;
58
+ color: #e7eaed;
29
59
 
30
- padding-top: theme('spacing.3', 0.75rem);
31
- padding-bottom: theme('spacing.3', 0.75rem);
60
+ &:hover {
61
+ color: #ffffff;
32
62
 
33
- & + .aw-button {
34
- .aw-button__content {
35
- width: 3rem;
36
- height: 3rem;
63
+ .aw-header-notification__close-button-text {
64
+ color: #ffffff;
37
65
  }
66
+ }
38
67
 
39
- .aw-button__text {
40
- font-size: 1rem;
41
- }
68
+ &-icon {
69
+ flex: none;
70
+ }
71
+
72
+ &-text {
73
+ color: #e7eaed;
74
+ font-weight: 700;
42
75
  }
43
76
  }
44
77
 
45
78
  & + * {
46
- --header-padding-top: var(--header-padding-bottom, 0.5rem);
79
+ --header-padding-top: var(--header-padding-bottom, 0.5rem);
47
80
  }
48
81
 
49
- & + * [class*="--fixed-top"] {
50
- --header-padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-padding-bottom, 0.5rem));
82
+ & + * [class*='--fixed-top'] {
83
+ --header-padding-top: calc(
84
+ env(safe-area-inset-top, 0px) + var(--header-padding-bottom, 0.5rem)
85
+ );
51
86
  }
52
87
  }
53
88
 
54
- @screen md {
89
+ @screen lg {
55
90
  .aw-header-notification {
56
91
  &__wrapper {
57
92
  flex-direction: row;
58
93
  align-items: center;
59
94
  justify-content: center;
95
+ padding: 0.5rem 1rem;
96
+
97
+ &-block {
98
+ &--icon {
99
+ padding-left: 0;
100
+ }
101
+ }
60
102
 
61
103
  &-content {
62
104
  align-items: center;
105
+ justify-content: end;
106
+ flex: auto;
63
107
  }
64
108
  }
65
109
  }
@@ -158,6 +158,18 @@
158
158
  }
159
159
 
160
160
  @screen lg {
161
+ .aw-layout {
162
+ .aw-page-header__breadcrumbs {
163
+ left: calc(300px + 1.5rem);
164
+ }
165
+
166
+ .aw-layout__aw-layout-menu.aw-layout-menu--hide-submenu ~ .aw-page {
167
+ .aw-page-header__breadcrumbs {
168
+ left: calc(6rem + 1.5rem);
169
+ }
170
+ }
171
+ }
172
+
161
173
  .layout {
162
174
  &&--default,
163
175
  &&--simple {
@@ -3,8 +3,10 @@
3
3
  align-items: center;
4
4
  justify-content: space-between;
5
5
  gap: 1rem;
6
+ width: 100%;
6
7
 
7
- padding: var(--header-padding-top) var(--header-padding-horizontal) var(--header-padding-bottom);
8
+ padding: var(--header-padding-top) var(--header-padding-horizontal)
9
+ var(--header-padding-bottom);
8
10
  min-height: var(--header-height);
9
11
  box-shadow: none;
10
12
 
@@ -33,7 +35,6 @@
33
35
 
34
36
  &--container {
35
37
  max-width: 100%;
36
- width: var(--header-container-width);
37
38
  margin-left: auto;
38
39
  margin-right: auto;
39
40
  }
@@ -91,6 +92,7 @@
91
92
 
92
93
  &__buttons {
93
94
  justify-content: flex-end;
95
+ flex: none;
94
96
  /* align-items: center; */
95
97
  }
96
98
  }
@@ -112,22 +114,57 @@
112
114
  @apply bg-surface;
113
115
  }
114
116
 
117
+ &--container {
118
+ position: static;
119
+ width: var(--header-container-width);
120
+ }
121
+
122
+ &--container-small {
123
+ width: calc(
124
+ var(--header-container-width) +
125
+ ((2 * 80px) - (2 * var(--header-padding-horizontal)))
126
+ );
127
+ padding-left: 80px;
128
+ padding-right: min(
129
+ 80px,
130
+ calc((100% - (var(--container-small-width) - 48px)) / 2)
131
+ );
132
+ }
133
+
134
+ &--container-default {
135
+ width: calc(
136
+ var(--header-container-width) +
137
+ ((2 * 80px) - (2 * var(--header-padding-horizontal)))
138
+ );
139
+ padding-left: 80px;
140
+ padding-right: min(
141
+ 80px,
142
+ max(24px, calc(100% - var(--container-width)))
143
+ );
144
+ }
145
+
115
146
  &__title {
116
147
  font-size: 1.25rem;
117
148
  line-height: 1.4285;
118
149
  }
119
150
 
120
- &--container {
121
- position: static;
122
- }
123
-
124
151
  :where(&--container) &__title {
125
152
  text-align: left;
126
153
  }
127
154
 
155
+ &__breadcrumbs {
156
+ position: absolute;
157
+ left: var(--header-padding-horizontal);
158
+ z-index: 1;
159
+ }
160
+
161
+ &__buttons {
162
+ margin-left: auto;
163
+ }
164
+
128
165
  &__breadcrumbs,
129
166
  &__buttons {
130
- min-width: 2.5rem;
167
+ min-width: 2.5rem;
131
168
  }
132
169
 
133
170
  /* :where(&--container) &__buttons {
@@ -315,7 +315,7 @@ export default {
315
315
  _uploadFile(files) {
316
316
  this.errorText = ''
317
317
 
318
- let maxFilesForUpload = 0
318
+ let maxFilesForUpload = files.length - 1
319
319
 
320
320
  if (this.maxFiles) {
321
321
  maxFilesForUpload = this.maxFiles - this.uploadedFilesNumber - 1
@@ -328,8 +328,6 @@ export default {
328
328
  this.maxFiles
329
329
  )
330
330
  })
331
- } else {
332
- maxFilesForUpload = files.length - 1
333
331
  }
334
332
  }
335
333
 
@@ -102,7 +102,9 @@
102
102
  class="aw-page__mobile-title"
103
103
  aria-hidden="true"
104
104
  >
105
- {{ _title }}
105
+ <slot name="mobile-title" :title="_title">
106
+ {{ _title }}
107
+ </slot>
106
108
  </div>
107
109
 
108
110
  <div v-if="hasAside">
@@ -4,7 +4,11 @@
4
4
  :class="{
5
5
  'aw-page-header--primary': primary,
6
6
  'aw-page-header--is-stuck': isStuck,
7
- 'aw-page-header--container': isContainer
7
+ 'aw-page-header--container': isContainer,
8
+ 'aw-page-header--container-small':
9
+ isContainer && container === 'small',
10
+ 'aw-page-header--container-default':
11
+ isContainer && container === 'default'
8
12
  }"
9
13
  :style="{ '--header-container-width': headerContainerWidth }"
10
14
  >
@@ -15,34 +15,52 @@
15
15
  :name="config.icon"
16
16
  />
17
17
 
18
- <div v-html="$sanitize(config.text)" />
18
+ <div
19
+ class="aw-header-notification__wrapper-content-text"
20
+ v-html="$sanitize(config.text)"
21
+ />
19
22
  </div>
20
23
 
21
24
  <div
22
- v-if="config.buttons.length"
23
- class="aw-header-notification__wrapper-buttons"
25
+ class="aw-header-notification__wrapper-block"
26
+ :class="{
27
+ 'aw-header-notification__wrapper-block--icon': config.icon
28
+ }"
24
29
  >
25
- <AwButton
26
- v-for="({ listeners, ...props }, i) in config.buttons"
27
- :key="i"
28
- size="xs"
29
- v-bind="props"
30
- v-on="listeners"
31
- />
30
+ <div
31
+ v-if="config.buttons.length"
32
+ class="aw-header-notification__wrapper-buttons"
33
+ >
34
+ <AwButton
35
+ v-for="({ listeners, ...props }, i) in config.buttons"
36
+ :key="i"
37
+ size="xs"
38
+ v-bind="props"
39
+ v-on="listeners"
40
+ />
41
+ </div>
42
+
43
+ <!-- close -->
44
+ <button
45
+ v-if="config.closable"
46
+ class="aw-header-notification__close-button"
47
+ @click="
48
+ $store.commit('awesIo/SET_HEADER_NOTIFICATION', null)
49
+ "
50
+ >
51
+ <AwIconSystemMono
52
+ name="close"
53
+ class="aw-header-notification__close-button-icon"
54
+ />
55
+
56
+ <AwDescription class="lg:hidden">
57
+ <span class="aw-header-notification__close-button-text">
58
+ {{ $t('Not now') }}
59
+ </span>
60
+ </AwDescription>
61
+ </button>
32
62
  </div>
33
63
  </div>
34
-
35
- <!-- close -->
36
- <AwButton
37
- v-if="config.closable"
38
- theme="icon"
39
- class="flex-shrink-0"
40
- @click="$store.commit('awesIo/SET_HEADER_NOTIFICATION', null)"
41
- >
42
- <template #icon>
43
- <AwIconSystemMono name="close" />
44
- </template>
45
- </AwButton>
46
64
  </div>
47
65
  </template>
48
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.122.0",
3
+ "version": "2.124.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": "03e22b86583110843d2c58c790cde459f0b22f2f"
117
+ "gitHead": "def894ee9eee53ca104a3c00dd3651db4c69f336"
118
118
  }