@awes-io/ui 2.100.1 → 2.102.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 +27 -0
- package/assets/css/components/action-button.css +1 -1
- package/assets/css/components/action-card.css +15 -0
- package/assets/css/components/card.css +4 -6
- package/assets/css/components/modal.css +10 -5
- package/assets/css/components/text-field.css +5 -2
- package/assets/css/typography.css +2 -2
- package/assets/js/styles.js +12 -3
- package/components/1_atoms/AwCard.vue +25 -7
- package/components/1_atoms/AwInput.vue +4 -10
- package/components/2_molecules/AwSelectObject.vue +4 -2
- package/components/3_organisms/AwTel.vue +19 -3
- package/components/4_pages/AwPage.vue +5 -1
- package/components/4_pages/AwPageMenuButtons.vue +1 -1
- package/package.json +2 -2
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.102.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.101.0...@awes-io/ui@2.102.0) (2024-04-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **aw-select-object:** pass close function to slots ([ade33a0](https://github.com/awes-io/client/commit/ade33a0dfae9aaef4cd228557b21b5290c35909a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.101.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.100.1...@awes-io/ui@2.101.0) (2024-04-19)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* tel updated ([808bb10](https://github.com/awes-io/client/commit/808bb104783bd7a98a417cf0aeff9fa0cd8e71c0))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add description for aw card ([2961740](https://github.com/awes-io/client/commit/2961740faae3ebb93c2cf7a5efe74bef93f03522))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [2.100.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.100.0...@awes-io/ui@2.100.1) (2024-04-05)
|
|
7
34
|
|
|
8
35
|
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&__title {
|
|
22
|
+
font-size: 1rem;
|
|
23
|
+
line-height: 1.5;
|
|
24
|
+
|
|
22
25
|
margin-top: 0;
|
|
23
26
|
margin-bottom: 0;
|
|
24
27
|
margin-inline-end: auto;
|
|
@@ -33,4 +36,16 @@
|
|
|
33
36
|
left: 0;
|
|
34
37
|
top: 0;
|
|
35
38
|
}
|
|
39
|
+
|
|
40
|
+
:where(.container, .container-small, .container-full) & {
|
|
41
|
+
margin-left: calc(-1 * var(--container-padding));
|
|
42
|
+
margin-right: calc(-1 * var(--container-padding));
|
|
43
|
+
width: calc(100% + 2 * var(--container-padding));
|
|
44
|
+
|
|
45
|
+
@screen lg {
|
|
46
|
+
margin-left: initial;
|
|
47
|
+
margin-right: initial;
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
36
51
|
}
|
|
@@ -13,14 +13,16 @@
|
|
|
13
13
|
box-shadow: none;
|
|
14
14
|
|
|
15
15
|
&__title {
|
|
16
|
-
|
|
16
|
+
display: flex;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&__header {
|
|
20
20
|
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 0.25rem;
|
|
21
23
|
|
|
22
24
|
&--offset {
|
|
23
|
-
margin-bottom:
|
|
25
|
+
margin-bottom: 1.5rem;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -42,10 +44,6 @@
|
|
|
42
44
|
.aw-card {
|
|
43
45
|
--card-padding-x: 1.875rem;
|
|
44
46
|
--card-padding-y: 1.875rem;
|
|
45
|
-
|
|
46
|
-
&__header--offset {
|
|
47
|
-
margin-bottom: 1.25rem;
|
|
48
|
-
}
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
.container .aw-card,
|
|
@@ -20,8 +20,10 @@ $modal-aside-width-large: 75vw;
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&__dialog {
|
|
23
|
-
@apply relative max-w-full mx-auto
|
|
23
|
+
@apply relative max-w-full mx-auto;
|
|
24
24
|
|
|
25
|
+
background-color: var(--c-surface);
|
|
26
|
+
color: var(--c-on-surface);
|
|
25
27
|
border-top-left-radius: 0.9375rem;
|
|
26
28
|
border-top-right-radius: 0.9375rem;
|
|
27
29
|
}
|
|
@@ -229,7 +231,8 @@ $modal-aside-width-large: 75vw;
|
|
|
229
231
|
width: calc(100% + 4rem);
|
|
230
232
|
}
|
|
231
233
|
|
|
232
|
-
&[class*='is-fullscreen'] &,
|
|
234
|
+
&[class*='is-fullscreen'] &,
|
|
235
|
+
&[class*='is-overlay-aside'] & {
|
|
233
236
|
&__dialog {
|
|
234
237
|
border-radius: 0;
|
|
235
238
|
}
|
|
@@ -261,9 +264,9 @@ $modal-aside-width-large: 75vw;
|
|
|
261
264
|
@apply p-8;
|
|
262
265
|
}
|
|
263
266
|
|
|
264
|
-
&[class*='is-overlay-aside'] &__content--buttons {
|
|
267
|
+
/* &[class*='is-overlay-aside'] &__content--buttons {
|
|
265
268
|
padding-bottom: 7rem;
|
|
266
|
-
}
|
|
269
|
+
} */
|
|
267
270
|
|
|
268
271
|
&__buttons {
|
|
269
272
|
@apply static;
|
|
@@ -297,6 +300,7 @@ $modal-aside-width-large: 75vw;
|
|
|
297
300
|
margin-top: auto;
|
|
298
301
|
position: sticky;
|
|
299
302
|
bottom: 0;
|
|
303
|
+
z-index: 1;
|
|
300
304
|
|
|
301
305
|
& > .aw-button {
|
|
302
306
|
flex-grow: 1;
|
|
@@ -367,7 +371,8 @@ $modal-aside-width-large: 75vw;
|
|
|
367
371
|
max-width: 580px;
|
|
368
372
|
}
|
|
369
373
|
|
|
370
|
-
&.is-fullscreen &__dialog,
|
|
374
|
+
&.is-fullscreen &__dialog,
|
|
375
|
+
&.is-overlay-aside &__dialog {
|
|
371
376
|
border-radius: 0;
|
|
372
377
|
}
|
|
373
378
|
|
|
@@ -67,7 +67,9 @@
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&__element {
|
|
70
|
-
@apply w-full truncate block
|
|
70
|
+
@apply w-full truncate block;
|
|
71
|
+
background-color: var(--c-surface);
|
|
72
|
+
color: var(--c-on-surface);
|
|
71
73
|
line-height: 1.5;
|
|
72
74
|
border-radius: 0.625rem;
|
|
73
75
|
|
|
@@ -110,7 +112,8 @@
|
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
&--page &__element {
|
|
113
|
-
|
|
115
|
+
background-color: var(--c-page-bg);
|
|
116
|
+
color: var(--c-on-page-bg);
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
&__fake-input {
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
line-height: 1.5;
|
|
9
9
|
|
|
10
|
-
overscroll-behavior
|
|
10
|
+
overscroll-behavior: none;
|
|
11
11
|
scrollbar-color: rgba(var(--c-on-page-bg-rgb), 0.1) transparent;
|
|
12
12
|
|
|
13
13
|
&::-webkit-scrollbar {
|
|
14
14
|
width: 12px;
|
|
15
15
|
height: 12px;
|
|
16
|
-
background-color:
|
|
16
|
+
background-color: var(--c-page-bg);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&::-webkit-scrollbar-thumb {
|
package/assets/js/styles.js
CHANGED
|
@@ -11,7 +11,10 @@ export const CUSTOM_COLORS = {
|
|
|
11
11
|
green: '#2bb611',
|
|
12
12
|
lime: '#a4bf00',
|
|
13
13
|
grey: '#565656',
|
|
14
|
-
'light-grey': '#8b9aab'
|
|
14
|
+
'light-grey': '#8b9aab',
|
|
15
|
+
black: '#000',
|
|
16
|
+
forest: '#177200',
|
|
17
|
+
brown: '#b55700'
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const CUSTOM_COLORS_KEYS = keys(CUSTOM_COLORS)
|
|
@@ -27,7 +30,10 @@ export const CUSTOM_COLORS_BG_LIGHT = {
|
|
|
27
30
|
green: '#ddefd9',
|
|
28
31
|
lime: '#f1f5d9',
|
|
29
32
|
grey: '#eceded',
|
|
30
|
-
'light-grey': '#ecf0f5'
|
|
33
|
+
'light-grey': '#ecf0f5',
|
|
34
|
+
black: '#d8d9da',
|
|
35
|
+
forest: '#d1e3cc',
|
|
36
|
+
brown: '#f0ddcc'
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
export const CUSTOM_COLORS_BG_DARK = {
|
|
@@ -41,7 +47,10 @@ export const CUSTOM_COLORS_BG_DARK = {
|
|
|
41
47
|
green: '#2D4A2C',
|
|
42
48
|
lime: '#464C29',
|
|
43
49
|
grey: '#393A3D',
|
|
44
|
-
'light-grey': '#41444B'
|
|
50
|
+
'light-grey': '#41444B',
|
|
51
|
+
black: '#252629',
|
|
52
|
+
forest: '#293c29',
|
|
53
|
+
brown: '#493729'
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
export default {
|
|
@@ -6,14 +6,23 @@
|
|
|
6
6
|
class="aw-card__header"
|
|
7
7
|
:class="{ 'aw-card__header--offset': hasContent }"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
<div class="aw-card__title">
|
|
10
|
+
<slot name="title">
|
|
11
|
+
<AwSubHeadline class="my-0" :tag="titleTag">
|
|
12
|
+
{{ title }}
|
|
13
|
+
</AwSubHeadline>
|
|
14
|
+
</slot>
|
|
15
|
+
|
|
16
|
+
<div class="aw-card__header-badge">
|
|
17
|
+
<slot name="badge"></slot>
|
|
18
|
+
</div>
|
|
16
19
|
</div>
|
|
20
|
+
|
|
21
|
+
<slot name="description">
|
|
22
|
+
<AwDescription v-if="description" tag="div">
|
|
23
|
+
{{ description }}
|
|
24
|
+
</AwDescription>
|
|
25
|
+
</slot>
|
|
17
26
|
</div>
|
|
18
27
|
</slot>
|
|
19
28
|
|
|
@@ -22,9 +31,13 @@
|
|
|
22
31
|
</template>
|
|
23
32
|
|
|
24
33
|
<script>
|
|
34
|
+
import AwDescription from '@AwAtoms/AwDescription.vue'
|
|
35
|
+
|
|
25
36
|
export default {
|
|
26
37
|
name: 'AwCard',
|
|
27
38
|
|
|
39
|
+
components: { AwDescription },
|
|
40
|
+
|
|
28
41
|
inheritAttrs: false,
|
|
29
42
|
|
|
30
43
|
props: {
|
|
@@ -41,6 +54,11 @@ export default {
|
|
|
41
54
|
title: {
|
|
42
55
|
type: String,
|
|
43
56
|
default: ''
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
description: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: ''
|
|
44
62
|
}
|
|
45
63
|
},
|
|
46
64
|
|
|
@@ -141,18 +141,12 @@ export default {
|
|
|
141
141
|
computed: {
|
|
142
142
|
elClasses() {
|
|
143
143
|
let base = this.$options._config.baseClass
|
|
144
|
-
const theme = String(this.theme)
|
|
144
|
+
const theme = String(this.theme || '')
|
|
145
|
+
.split(',')
|
|
146
|
+
.map((modifier) => `${base}--${modifier}`)
|
|
145
147
|
|
|
146
148
|
return {
|
|
147
|
-
base: [
|
|
148
|
-
base,
|
|
149
|
-
{
|
|
150
|
-
[`${base}--page`]: theme.includes('page'),
|
|
151
|
-
[`${base}--uncolor-prefix`]: theme.includes(
|
|
152
|
-
'uncolor-prefix'
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
],
|
|
149
|
+
base: [base].concat(theme),
|
|
156
150
|
el: `${base}__element`,
|
|
157
151
|
label: `${base}__label`,
|
|
158
152
|
labelRequired: `${base}__label--required`,
|
|
@@ -177,7 +177,8 @@
|
|
|
177
177
|
optionsList,
|
|
178
178
|
isLoading,
|
|
179
179
|
hasSearch: !isLoading && !!_searchPhraseLength,
|
|
180
|
-
searchPhrase
|
|
180
|
+
searchPhrase,
|
|
181
|
+
close
|
|
181
182
|
}"
|
|
182
183
|
></slot>
|
|
183
184
|
|
|
@@ -222,7 +223,8 @@
|
|
|
222
223
|
v-bind="{
|
|
223
224
|
...optionsList[i],
|
|
224
225
|
searchPhrase,
|
|
225
|
-
highlightSearch
|
|
226
|
+
highlightSearch,
|
|
227
|
+
close
|
|
226
228
|
}"
|
|
227
229
|
>
|
|
228
230
|
<span v-html="highlightSearch(optionLabel)" />
|
|
@@ -249,12 +249,13 @@ export default {
|
|
|
249
249
|
const value = $event.target.value
|
|
250
250
|
const phoneNumber = this._parsePhoneNumber(value, this.country)
|
|
251
251
|
const phoneValue = this._getPhoneValue(phoneNumber)
|
|
252
|
+
const isTyping = $event.data !== null
|
|
252
253
|
|
|
253
254
|
// open dropdown on backspace
|
|
254
255
|
if (
|
|
255
256
|
phoneNumber.number === '' &&
|
|
256
257
|
phoneValue === this.phoneValue &&
|
|
257
|
-
|
|
258
|
+
!isTyping
|
|
258
259
|
) {
|
|
259
260
|
this.$nextTick(this._openCountriesDropdown)
|
|
260
261
|
return
|
|
@@ -262,9 +263,20 @@ export default {
|
|
|
262
263
|
|
|
263
264
|
// save caret position
|
|
264
265
|
let pos = $event.target.selectionStart
|
|
265
|
-
|
|
266
|
+
let digit = pos > 0 ? value[pos - 1] : '_'
|
|
266
267
|
let adjustPosition = false
|
|
267
268
|
|
|
269
|
+
if (isTyping && digit === ' ') {
|
|
270
|
+
adjustPosition = true
|
|
271
|
+
|
|
272
|
+
const max = value.length
|
|
273
|
+
|
|
274
|
+
while (pos < max && digit === ' ') {
|
|
275
|
+
pos++
|
|
276
|
+
digit = value[pos - 1]
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
268
280
|
if (phoneValue !== this.phoneValue) {
|
|
269
281
|
adjustPosition = true
|
|
270
282
|
|
|
@@ -288,7 +300,7 @@ export default {
|
|
|
288
300
|
this.$refs.input.setError('')
|
|
289
301
|
}
|
|
290
302
|
|
|
291
|
-
if (
|
|
303
|
+
if (isTyping && this.showCountries) {
|
|
292
304
|
this.showCountries = false
|
|
293
305
|
}
|
|
294
306
|
|
|
@@ -308,6 +320,10 @@ export default {
|
|
|
308
320
|
pos++
|
|
309
321
|
}
|
|
310
322
|
|
|
323
|
+
while (isTyping && newValue[pos - 1] === ' ' && pos < max) {
|
|
324
|
+
pos++
|
|
325
|
+
}
|
|
326
|
+
|
|
311
327
|
$event.target.setSelectionRange(pos, pos)
|
|
312
328
|
})
|
|
313
329
|
}
|
|
@@ -84,7 +84,11 @@
|
|
|
84
84
|
>
|
|
85
85
|
<!-- eslint-disable prettier/prettier -->
|
|
86
86
|
<div :class="[containerClass, { 'aw-page__grid': hasAside }]">
|
|
87
|
-
<div
|
|
87
|
+
<div
|
|
88
|
+
v-if="_title"
|
|
89
|
+
class="aw-page__mobile-title"
|
|
90
|
+
aria-hidden="true"
|
|
91
|
+
>
|
|
88
92
|
{{ _title }}
|
|
89
93
|
</div>
|
|
90
94
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.102.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": "
|
|
117
|
+
"gitHead": "c8f5b80c78849f95b0bd80be7b0293047a9fd828"
|
|
118
118
|
}
|