@awes-io/ui 2.118.0 → 2.119.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.119.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.118.1...@awes-io/ui@2.119.0) (2024-12-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * typo ([0950dc7](https://github.com/awes-io/client/commit/0950dc75e1e88f838831bc744e2964493cfd1475))
12
+
13
+
14
+ ### Features
15
+
16
+ * add ignore refrhes props for refresh wrapper ([ae5cc60](https://github.com/awes-io/client/commit/ae5cc60cf1fe6aeac2c1591d0cb348d1a177b08e))
17
+ * change style for page header ([6751e08](https://github.com/awes-io/client/commit/6751e0835d54018b98e59dcf522a111bc68efdbd))
18
+ * change style for search ([44318f0](https://github.com/awes-io/client/commit/44318f02455649715b7cc1f73087f74486b4bd12))
19
+
20
+
21
+
22
+
23
+
24
+ ## [2.118.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.118.0...@awes-io/ui@2.118.1) (2024-11-29)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * fix aw uploader loading max files ([288e57b](https://github.com/awes-io/client/commit/288e57b64ea69187488f3b121c06388737607e47))
30
+ * fix z-index in tooltip ([297f4d4](https://github.com/awes-io/client/commit/297f4d489e25c6768105db73745836d44af9a8ce))
31
+
32
+
33
+
34
+
35
+
6
36
  # [2.118.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.117.0...@awes-io/ui@2.118.0) (2024-11-29)
7
37
 
8
38
 
@@ -5,8 +5,8 @@
5
5
  border-radius: 0.625rem;
6
6
 
7
7
  /* & .aw-slider__scroller {
8
- padding: theme('spacing.1') 0;
9
- } */
8
+ padding: theme('spacing.1') 0;
9
+ } */
10
10
 
11
11
  &__wrapper {
12
12
  padding: 0;
@@ -85,10 +85,19 @@
85
85
  cursor: not-allowed;
86
86
  }
87
87
 
88
+ &--expand {
89
+ min-width: var(--nav-min-width, 100%);
90
+
91
+ .aw-button-nav__toggler {
92
+ flex: var(--nav-toggler-grow, 1) 0 auto;
93
+ }
94
+ }
95
+
88
96
  &--fullwidth {
89
97
  margin-left: calc(-1 * var(--container-padding));
90
98
  margin-right: calc(-1 * var(--container-padding));
91
99
  max-width: calc(100% + 2 * var(--container-padding));
100
+ width: calc(100% + 2 * var(--container-padding));
92
101
 
93
102
  .aw-slider__scroller:before,
94
103
  .aw-slider__scroller:after {
@@ -107,13 +116,9 @@
107
116
  .aw-slider__scroller > :last-child {
108
117
  scroll-snap-align: end;
109
118
  }
110
- }
111
-
112
- &--expand {
113
- min-width: var(--nav-min-width, 100%);
114
119
 
115
120
  .aw-button-nav__toggler {
116
- flex: var(--nav-toggler-grow, 1) 0 auto;
121
+ flex: auto;
117
122
  }
118
123
  }
119
124
 
@@ -221,6 +226,10 @@
221
226
  }
222
227
  }
223
228
 
229
+ &--fullwidth {
230
+ width: auto;
231
+ }
232
+
224
233
  &--without-min-with {
225
234
  .aw-button-nav__toggler {
226
235
  & > span {
@@ -6,17 +6,26 @@
6
6
  padding-bottom: 9.5rem;
7
7
 
8
8
  &__buttons {
9
+ @apply bg-page-bg;
10
+
9
11
  display: flex;
10
12
  justify-content: space-between;
11
13
  gap: 1rem;
12
- padding: 0.5rem 1.5rem 0;
14
+ padding: 0.5rem 1.5rem 1rem;
13
15
  padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
16
+ position: sticky;
17
+ top: 0;
18
+ z-index: 1;
19
+
20
+ &--sticky {
21
+ box-shadow: 0px 10px 20px 0px rgba(37, 38, 41, 0.05);
22
+ }
14
23
 
15
24
  &-wrapper {
16
25
  display: flex;
17
26
  align-items: center;
18
27
  gap: 1rem;
19
- }
28
+ }
20
29
  }
21
30
 
22
31
  &__user-profile {
@@ -24,15 +33,15 @@
24
33
  padding-bottom: 2.5rem;
25
34
 
26
35
  &:after {
27
- @apply bg-mono-800;
28
- content: '';
29
- display: block;
30
- height: 1px;
31
-
32
- position: absolute;
33
- bottom: calc(0.75rem - 1px);
34
- left: 1.5rem;
35
- right: 1.5rem;
36
+ @apply bg-mono-800;
37
+ content: '';
38
+ display: block;
39
+ height: 1px;
40
+
41
+ position: absolute;
42
+ bottom: calc(0.75rem - 1px);
43
+ left: 1.5rem;
44
+ right: 1.5rem;
36
45
  }
37
46
  }
38
47
 
@@ -42,7 +51,7 @@
42
51
  align-items: center;
43
52
  flex-direction: column;
44
53
 
45
- padding: 1rem 1.5rem 1rem;
54
+ padding: 0 1.5rem 1rem;
46
55
  }
47
56
 
48
57
  &__theme {
@@ -3,9 +3,8 @@
3
3
  align-items: center;
4
4
  gap: 1rem;
5
5
 
6
- padding: var(--header-padding-top) var(--header-padding-horizontal)
7
- var(--header-padding-bottom);
8
- height: var(--header-height);
6
+ padding: var(--header-padding-top) var(--header-padding-horizontal) var(--header-padding-bottom);
7
+ min-height: var(--header-height);
9
8
  box-shadow: none;
10
9
 
11
10
  position: relative;
@@ -72,6 +71,10 @@
72
71
  }
73
72
  }
74
73
 
74
+ &__breadcrumbs {
75
+ align-self: flex-start;
76
+ }
77
+
75
78
  &__breadcrumbs,
76
79
  &__buttons {
77
80
  flex: 1 1 3rem;
@@ -106,7 +109,7 @@
106
109
  @screen lg {
107
110
  .aw-page-header {
108
111
  /* padding-left: 2.5rem;
109
- padding-right: 2.5rem; */
112
+ padding-right: 2.5rem; */
110
113
 
111
114
  &--primary {
112
115
  @apply bg-surface;
@@ -119,19 +122,12 @@
119
122
 
120
123
  &--container {
121
124
  gap: 0;
122
- width: 100%;
123
- margin-left: 0;
124
- margin-right: 0;
125
125
 
126
126
  position: static;
127
127
  }
128
128
 
129
129
  :where(&--container) &__breadcrumbs {
130
- flex: 0 0
131
- calc(
132
- 50% - var(--header-container-width) / 2 +
133
- var(--header-padding-horizontal)
134
- );
130
+ flex: 0 0 calc(50% - var(--header-container-width) / 2 + var(--header-padding-horizontal));
135
131
  }
136
132
 
137
133
  &:where(:not(&--container)) &__title {
@@ -147,14 +143,14 @@
147
143
  }
148
144
 
149
145
  /* :where(&--container) &__buttons {
150
- margin-right: max(
151
- 0px,
152
- calc(
153
- 50% - var(--header-container-width) / 2 +
154
- var(--header-padding-horizontal)
155
- )
156
- );
157
- } */
146
+ margin-right: max(
147
+ 0px,
148
+ calc(
149
+ 50% - var(--header-container-width) / 2 +
150
+ var(--header-padding-horizontal)
151
+ )
152
+ );
153
+ } */
158
154
  }
159
155
  }
160
156
 
@@ -1,6 +1,6 @@
1
1
  .aw-search {
2
2
  background: transparent;
3
- border-radius: 1rem;
3
+ border-radius: 0.625rem;
4
4
 
5
5
  .aw-text-field__element,
6
6
  input {
@@ -8,7 +8,7 @@
8
8
  padding-right: 3rem;
9
9
  padding-left: 1rem;
10
10
  height: 2.875rem;
11
- border-radius: 1rem;
11
+ border-radius: 0.625rem;
12
12
  font-size: 0.875rem;
13
13
  }
14
14
 
@@ -35,11 +35,8 @@
35
35
 
36
36
  @screen lg {
37
37
  .aw-search {
38
- border-radius: 0.625rem;
39
-
40
38
  .aw-text-field__element,
41
39
  input {
42
- border-radius: 0.625rem;
43
40
  height: 2.375rem;
44
41
  }
45
42
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  &[data-visible] {
12
12
  display: block;
13
- z-index: 19;
13
+ z-index: 20;
14
14
  }
15
15
 
16
16
  &[data-popper-reference-hidden] {
@@ -12,10 +12,21 @@ export const TABLE_DATA_FETCHED = 'data-fetched'
12
12
 
13
13
  export const FORM_ENTER_SKIP_ATTR = 'data-enter-skip'
14
14
 
15
- export const COLORS = Object.keys(CUSTOM_COLORS).map((color) => ({
16
- color: toColor(color),
17
- onColor: toOnColor(color)
18
- }))
15
+ // export const COLORS = Object.keys(CUSTOM_COLORS).map((color) => ({
16
+ // color: toColor(color),
17
+ // onColor: toOnColor(color)
18
+ // }))
19
+
20
+ export const COLORS = Object.keys(CUSTOM_COLORS).reduce((acc, color) => {
21
+ if (color !== 'black') {
22
+ return acc.concat({
23
+ color: toColor(color),
24
+ onColor: toOnColor(color)
25
+ })
26
+ }
27
+
28
+ return acc
29
+ }, [])
19
30
 
20
31
  export const TEST_ID_ATTR = 'data-testid'
21
32
 
@@ -56,6 +56,7 @@ export const CUSTOM_COLORS_BG_DARK = {
56
56
  export default {
57
57
  default: {
58
58
  colors: {
59
+ white: '#ffffff',
59
60
  accent: '#56af40',
60
61
  'accent-hover': '#469E30',
61
62
  success: '#56af40',
@@ -114,6 +115,7 @@ export default {
114
115
  },
115
116
  dark: {
116
117
  colors: {
118
+ white: '#ffffff',
117
119
  accent: '#56af40',
118
120
  success: '#56af40',
119
121
  info: '#4a7fe4',
@@ -34,7 +34,9 @@ export default {
34
34
  name: 'AwRefreshWrapper',
35
35
 
36
36
  props: {
37
- loading: Boolean
37
+ loading: Boolean,
38
+
39
+ ignoreRefresh: Boolean
38
40
  },
39
41
 
40
42
  data: () => ({
@@ -51,21 +53,25 @@ export default {
51
53
  },
52
54
 
53
55
  mounted() {
54
- this.$refs.refreshLoader.addEventListener(
55
- 'touchmove',
56
- this.onTouchStartMove,
57
- { passive: false }
58
- )
56
+ if (!this.ignoreRefresh) {
57
+ this.$refs.refreshLoader.addEventListener(
58
+ 'touchmove',
59
+ this.onTouchStartMove,
60
+ { passive: false }
61
+ )
62
+ }
59
63
  },
60
64
 
61
65
  beforeDestroy() {
62
- this.removeListeners()
66
+ if (!this.ignoreRefresh) {
67
+ this.removeListeners()
63
68
 
64
- this.$refs.refreshLoader.removeEventListener(
65
- 'touchmove',
66
- this.onTouchStartMove,
67
- { passive: false }
68
- )
69
+ this.$refs.refreshLoader.removeEventListener(
70
+ 'touchmove',
71
+ this.onTouchStartMove,
72
+ { passive: false }
73
+ )
74
+ }
69
75
  },
70
76
 
71
77
  methods: {
@@ -2,6 +2,7 @@
2
2
  <AwRefreshWrapper
3
3
  class="aw-table-builder relative"
4
4
  :loading="collection.loading"
5
+ :ignore-refresh="ignoreRefresh"
5
6
  @refresh="fetch"
6
7
  >
7
8
  <template #before>
@@ -283,6 +284,10 @@ export default {
283
284
  */
284
285
  noFetch: Boolean,
285
286
 
287
+ /**
288
+ * Disable pull-to-refresh on a table
289
+ */
290
+ ignoreRefresh: Boolean,
286
291
  /**
287
292
  * Disable auto fetching on page or limit change
288
293
  */
@@ -315,7 +315,7 @@ export default {
315
315
  _uploadFile(files) {
316
316
  this.errorText = ''
317
317
 
318
- let maxFilesForUpload = files.length - 1
318
+ let maxFilesForUpload = 0
319
319
 
320
320
  if (this.maxFiles) {
321
321
  maxFilesForUpload = this.maxFiles - this.uploadedFilesNumber - 1
@@ -328,11 +328,14 @@ export default {
328
328
  this.maxFiles
329
329
  )
330
330
  })
331
+ } else {
332
+ maxFilesForUpload = files.length - 1
331
333
  }
332
334
  }
333
335
 
334
336
  for (var i = maxFilesForUpload; i >= 0; i--) {
335
337
  const file = files[i]
338
+
336
339
  const errors = this._validateFile(file)
337
340
 
338
341
  if (!isEmpty(errors)) {
@@ -44,6 +44,27 @@
44
44
  <slot name="after-breadcrumb" />
45
45
  </template>
46
46
 
47
+ <template #title="{ title, titleShowable, hideTitle }">
48
+ <slot
49
+ name="title"
50
+ :title="title"
51
+ :titleShowable="titleShowable"
52
+ :hideTitle="hideTitle"
53
+ >
54
+ <h1
55
+ v-if="title"
56
+ class="aw-page-header__title"
57
+ :class="{
58
+ 'sr-only': !titleShowable && hideTitle,
59
+ 'aw-page-header__title--showable': titleShowable,
60
+ 'aw-page-header__title--visible': !hideTitle
61
+ }"
62
+ >
63
+ {{ title }}
64
+ </h1>
65
+ </slot>
66
+ </template>
67
+
47
68
  <template #default>
48
69
  <slot name="buttons"></slot>
49
70
  </template>
@@ -12,17 +12,24 @@
12
12
  <slot name="breadcrumbs"> </slot>
13
13
  </div>
14
14
 
15
- <h1
16
- v-if="title"
17
- class="aw-page-header__title"
18
- :class="{
19
- 'sr-only': !titleShowable && hideTitle,
20
- 'aw-page-header__title--showable': titleShowable,
21
- 'aw-page-header__title--visible': !hideTitle
22
- }"
15
+ <slot
16
+ name="title"
17
+ :title="title"
18
+ :titleShowable="titleShowable"
19
+ :hideTitle="hideTitle"
23
20
  >
24
- {{ title }}
25
- </h1>
21
+ <h1
22
+ v-if="title"
23
+ class="aw-page-header__title"
24
+ :class="{
25
+ 'sr-only': !titleShowable && hideTitle,
26
+ 'aw-page-header__title--showable': titleShowable,
27
+ 'aw-page-header__title--visible': !hideTitle
28
+ }"
29
+ >
30
+ {{ title }}
31
+ </h1>
32
+ </slot>
26
33
 
27
34
  <div class="aw-page-header__buttons">
28
35
  <slot />
@@ -1,6 +1,15 @@
1
1
  <template>
2
2
  <div class="aw-more">
3
- <div class="aw-more__buttons">
3
+ <div
4
+ ref="topScrollMark"
5
+ class="aw-page__top-scroll-mark"
6
+ aria-hidden="true"
7
+ ></div>
8
+
9
+ <div
10
+ class="aw-more__buttons"
11
+ :class="{ 'aw-more__buttons--sticky': isHeaderStuck }"
12
+ >
4
13
  <AwButton color="mono" icon="awesio/arrow" @click="onClickGoBack" />
5
14
 
6
15
  <div
@@ -117,6 +126,7 @@ import { lensProp, pathOr, viewOr } from 'rambdax'
117
126
  import AwMobileMenuNav from '@AwLayouts/_AwMobileMenuNav.vue'
118
127
  import AwMobileMenuItem from '@AwLayouts/_AwMobileMenuItem.vue'
119
128
  import { VISIBLE_ITEMS_COUNT } from '@AwOrganisms/AwBottomBar.vue'
129
+ import pageMixin from '@AwMixins/page'
120
130
 
121
131
  export default {
122
132
  name: 'More',
@@ -134,6 +144,8 @@ export default {
134
144
  AwMobileMenuItem
135
145
  },
136
146
 
147
+ mixins: [pageMixin],
148
+
137
149
  computed: {
138
150
  ...mapState('awesIo', ['bottomBarAction']),
139
151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.118.0",
3
+ "version": "2.119.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": "9fac83b530a7826aea528e3823d0317e439133f6"
117
+ "gitHead": "f9ac1c4a9f97c7786f5d25ff792d005ca23b8d75"
118
118
  }