@awes-io/ui 2.145.8 → 2.146.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 +24 -0
- package/assets/css/components/action-button.css +83 -13
- package/assets/css/components/alert.css +5 -0
- package/assets/css/components/button.css +16 -0
- package/assets/css/components/card.css +7 -0
- package/assets/css/components/icon-menu-item.css +1 -1
- package/assets/css/components/nav.css +6 -0
- package/assets/css/components/page-header.css +16 -0
- package/assets/css/components/page.css +9 -0
- package/assets/css/components/progress.css +22 -0
- package/assets/css/components/switch-field.css +36 -0
- package/assets/css/components/tags.css +31 -2
- package/assets/css/components/text-field.css +16 -0
- package/assets/css/fonts.css +44 -0
- package/assets/css/main.css +1 -0
- package/components/1_atoms/AwActionIcon.vue +2 -2
- package/components/1_atoms/AwProgress.vue +9 -0
- package/components/1_atoms/AwSwitcher.vue +4 -1
- package/components/1_atoms/AwTag.vue +44 -2
- package/components/2_molecules/AwActionButton.vue +39 -11
- package/components/2_molecules/AwButton.vue +9 -1
- package/components/2_molecules/AwTel.vue +1 -1
- package/components/3_organisms/AwAddress.vue +12 -1
- package/components/4_pages/AwPage.vue +66 -22
- package/components/5_layouts/AwLayoutProvider.vue +1 -1
- package/components/5_layouts/_AwNav.vue +15 -0
- package/docs/components/atoms/aw-action-icon.md +1 -1
- package/docs/components/atoms/aw-input.md +1 -0
- package/docs/components/atoms/aw-progress.md +9 -0
- package/docs/components/atoms/aw-tag.md +23 -2
- package/docs/components/layouts/aw-layout-provider.md +2 -1
- package/docs/components/molecules/aw-action-button.md +41 -1
- package/docs/components/molecules/aw-button.md +14 -0
- package/docs/components/organisms/aw-address.md +1 -1
- package/docs/components/pages/aw-page.md +10 -0
- package/docs/configuration.md +15 -6
- package/nuxt/awes.config.js +0 -1
- package/package.json +2 -2
- package/tailwind.config.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.146.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.145.9...@awes-io/ui@2.146.0) (2026-12-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui:** new options of tag, button, action button, page and menu (EW-1433) ([e90ce04](https://github.com/awes-io/client/commit/e90ce04fb8caa8d200d968743fe171f3ac3e0871))
|
|
12
|
+
* **ui:** use Inter from our CDN as the default font (EW-1433) ([a0c8fc4](https://github.com/awes-io/client/commit/a0c8fc48a270b78aa969cb78f5ff1d1327f760d3))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [2.145.9](https://github.com/awes-io/client/compare/@awes-io/ui@2.145.8...@awes-io/ui@2.145.9) (2026-11-22)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **ui:** log why the address timezone came back empty ([abcebd2](https://github.com/awes-io/client/commit/abcebd250d8f25de0e6e16114799e816de0c0215))
|
|
24
|
+
* **ui:** tel field survives a country change with an empty value ([a2893c5](https://github.com/awes-io/client/commit/a2893c5e3bd8fa5f312619bc20c1b28f26d732b2))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [2.145.8](https://github.com/awes-io/client/compare/@awes-io/ui@2.145.7...@awes-io/ui@2.145.8) (2026-11-19)
|
|
7
31
|
|
|
8
32
|
|
|
@@ -17,8 +17,18 @@
|
|
|
17
17
|
|
|
18
18
|
width: 100%;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
transition: 120ms box-shadow;
|
|
21
|
+
|
|
22
|
+
&:where(label) {
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__icon-right {
|
|
27
|
+
align-self: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&[aria-expanded='true'] &__icon-right {
|
|
31
|
+
transform: rotate(180deg);
|
|
22
32
|
}
|
|
23
33
|
|
|
24
34
|
&__icon-empty {
|
|
@@ -31,16 +41,6 @@
|
|
|
31
41
|
margin-left: -1rem;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
&:hover &__icon-wrapper {
|
|
35
|
-
color: var(--bg-color);
|
|
36
|
-
background-color: var(--color);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:focus-visible {
|
|
40
|
-
outline: 0;
|
|
41
|
-
box-shadow: 0 0 0 2px var(--c-mono-800) inset;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
44
|
&__text {
|
|
45
45
|
font-size: 1rem;
|
|
46
46
|
font-weight: 700;
|
|
@@ -61,10 +61,24 @@
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&--outline {
|
|
64
|
-
box-shadow: 0 0 0
|
|
64
|
+
box-shadow: 0 0 0 1px var(--c-mono-800) inset;
|
|
65
65
|
background: transparent;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
&:where(:is(a, button, label):hover:not(:disabled)) {
|
|
69
|
+
box-shadow: 0 0 0 1px var(--c-mono-500) inset;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:focus-visible {
|
|
73
|
+
outline: 0;
|
|
74
|
+
box-shadow: 0 0 0 2px var(--c-mono-500) inset;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--active,
|
|
78
|
+
&--active:where(:hover:not(:disabled)) {
|
|
79
|
+
box-shadow: 0 0 0 2px var(--c-mono-100) inset;
|
|
80
|
+
}
|
|
81
|
+
|
|
68
82
|
&--narrow {
|
|
69
83
|
padding: 1rem;
|
|
70
84
|
}
|
|
@@ -75,4 +89,60 @@
|
|
|
75
89
|
calc((var(--min-header-height) - var(--size)) / 2)
|
|
76
90
|
);
|
|
77
91
|
}
|
|
92
|
+
|
|
93
|
+
& > .aw-switch-field {
|
|
94
|
+
margin-top: calc((var(--min-header-height) - 1.25rem) / 2);
|
|
95
|
+
|
|
96
|
+
&:not(.is-switcher) .aw-switch-field__element {
|
|
97
|
+
width: 1.25rem;
|
|
98
|
+
height: 1.25rem;
|
|
99
|
+
mask-size: 100% 100%;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&--size-sm {
|
|
104
|
+
--min-header-height: 2.5rem;
|
|
105
|
+
|
|
106
|
+
column-gap: 0.75rem;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&--size-sm:where(&--narrow) {
|
|
110
|
+
padding: 0.75rem 0.875rem;
|
|
111
|
+
border-radius: 0.75rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--size-sm &__text {
|
|
115
|
+
font-size: 0.9375rem;
|
|
116
|
+
font-weight: 600;
|
|
117
|
+
line-height: 1.35;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&--size-sm &__icon-empty + &__text {
|
|
121
|
+
margin-left: -0.75rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&--size-sm &__description,
|
|
125
|
+
&--size-sm &__subdescription {
|
|
126
|
+
font-size: 0.8125rem;
|
|
127
|
+
line-height: 1.4;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&--size-sm &__description {
|
|
131
|
+
margin-top: 0.125rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--size-sm &__subdescription {
|
|
135
|
+
padding-top: 0.625rem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&--size-sm > .aw-action-icon {
|
|
139
|
+
width: 2.5rem;
|
|
140
|
+
margin-top: 0;
|
|
141
|
+
border-radius: 0.75rem;
|
|
142
|
+
|
|
143
|
+
.aw-action-icon__icon {
|
|
144
|
+
width: 1.25rem;
|
|
145
|
+
height: 1.25rem;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
78
148
|
}
|
|
@@ -221,7 +221,12 @@
|
|
|
221
221
|
--icon-color: var(--c-mono-400);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
&--corners-pill {
|
|
225
|
+
--btn-radius: 9999px;
|
|
226
|
+
}
|
|
227
|
+
|
|
224
228
|
&--theme-outline {
|
|
229
|
+
--btn-border-width: 1px;
|
|
225
230
|
--btn-bg-color: transparent;
|
|
226
231
|
--btn-color: var(--c-mono-100);
|
|
227
232
|
--btn-border-color: var(--c-mono-800);
|
|
@@ -229,6 +234,17 @@
|
|
|
229
234
|
--btn-border-hover-fallback: var(--c-mono-700);
|
|
230
235
|
}
|
|
231
236
|
|
|
237
|
+
&--color-surface:where(&--theme-solid) {
|
|
238
|
+
--btn-bg-color: var(--c-surface);
|
|
239
|
+
--btn-color: var(--c-on-surface);
|
|
240
|
+
--icon-color: var(--c-mono-400);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&--color-surface:where(&--theme-outline) {
|
|
244
|
+
--btn-bg-color: var(--c-surface);
|
|
245
|
+
--btn-color: var(--c-on-surface);
|
|
246
|
+
}
|
|
247
|
+
|
|
232
248
|
&--theme-outline:where(:not(:disabled)):hover {
|
|
233
249
|
border-color: var(--btn-border-hover, var(--btn-border-hover-fallback));
|
|
234
250
|
}
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
gap: 1rem;
|
|
19
|
+
|
|
20
|
+
font-size: 1rem;
|
|
21
|
+
line-height: 1.5;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
&__header {
|
|
@@ -32,6 +35,10 @@
|
|
|
32
35
|
flex-shrink: 0;
|
|
33
36
|
align-self: flex-start;
|
|
34
37
|
margin-left: auto;
|
|
38
|
+
|
|
39
|
+
&:empty {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
44
|
|
|
@@ -48,6 +48,18 @@
|
|
|
48
48
|
transition: 60ms box-shadow 120ms;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
&__heading {
|
|
52
|
+
display: contents;
|
|
53
|
+
|
|
54
|
+
&--described {
|
|
55
|
+
flex: 1 1 max-content;
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 0.25rem;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
51
63
|
&__title {
|
|
52
64
|
@apply font-body;
|
|
53
65
|
|
|
@@ -81,6 +93,10 @@
|
|
|
81
93
|
}
|
|
82
94
|
}
|
|
83
95
|
|
|
96
|
+
&__heading--described &__title {
|
|
97
|
+
flex: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
84
100
|
&__breadcrumbs {
|
|
85
101
|
align-self: flex-start;
|
|
86
102
|
}
|
|
@@ -41,6 +41,14 @@
|
|
|
41
41
|
margin-bottom: 1.5rem;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
&__mobile-heading--described {
|
|
45
|
+
margin-bottom: 1.5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__mobile-heading--described &__mobile-title {
|
|
49
|
+
margin-bottom: 0.25rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
&__top-scroll-mark {
|
|
45
53
|
height: 1px;
|
|
46
54
|
margin-bottom: -1px;
|
|
@@ -55,6 +63,7 @@
|
|
|
55
63
|
margin-right: 1rem;
|
|
56
64
|
}
|
|
57
65
|
|
|
66
|
+
&__mobile-heading,
|
|
58
67
|
&__mobile-title,
|
|
59
68
|
&__top-scroll-mark {
|
|
60
69
|
display: none;
|
|
@@ -20,4 +20,26 @@
|
|
|
20
20
|
left: 0;
|
|
21
21
|
z-index: 1;
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
&--size-md,
|
|
25
|
+
&--size-lg {
|
|
26
|
+
height: var(--progress-height);
|
|
27
|
+
border-radius: var(--progress-height);
|
|
28
|
+
|
|
29
|
+
&::after {
|
|
30
|
+
width: calc(var(--progress) * 100%);
|
|
31
|
+
height: 100%;
|
|
32
|
+
border-radius: inherit;
|
|
33
|
+
transform: none;
|
|
34
|
+
position: static;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--size-md {
|
|
39
|
+
--progress-height: 0.375rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--size-lg {
|
|
43
|
+
--progress-height: 0.625rem;
|
|
44
|
+
}
|
|
23
45
|
}
|
|
@@ -324,3 +324,39 @@
|
|
|
324
324
|
user-select: none;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
+
|
|
328
|
+
[dir='rtl'] {
|
|
329
|
+
.aw-switch-field__element + .aw-switch-field__label {
|
|
330
|
+
padding-left: 0;
|
|
331
|
+
padding-right: theme('spacing.4', 1rem);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.aw-switch-field--sm .aw-switch-field__element:checked ~ .aw-switch-field__switch .aw-switch-field__switch-circle,
|
|
335
|
+
.aw-switch-field--lg .aw-switch-field__element:checked ~ .aw-switch-field__switch .aw-switch-field__switch-circle {
|
|
336
|
+
transform: translateX(-100%);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.aw-switch-field--md .aw-switch-field__element:checked ~ .aw-switch-field__switch .aw-switch-field__switch-circle {
|
|
340
|
+
transform: translateX(-108%);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.aw-switch-field--md .aw-switch-field__switch-icon--on {
|
|
344
|
+
left: auto;
|
|
345
|
+
right: 5px;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.aw-switch-field--md .aw-switch-field__switch-icon--off {
|
|
349
|
+
left: 5px;
|
|
350
|
+
right: auto;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.aw-switch-field--lg .aw-switch-field__switch-icon--on {
|
|
354
|
+
left: auto;
|
|
355
|
+
right: 4px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.aw-switch-field--lg .aw-switch-field__switch-icon--off {
|
|
359
|
+
left: 4px;
|
|
360
|
+
right: auto;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
align-items: center;
|
|
11
11
|
gap: 0.5rem;
|
|
12
12
|
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: 9999px;
|
|
14
14
|
padding: 0.25rem 1rem;
|
|
15
15
|
min-height: 2rem;
|
|
16
16
|
min-width: calc(
|
|
@@ -19,10 +19,35 @@
|
|
|
19
19
|
|
|
20
20
|
text-align: center;
|
|
21
21
|
font-size: 0.75rem;
|
|
22
|
-
font-weight:
|
|
22
|
+
font-weight: 600;
|
|
23
23
|
line-height: 1.25rem;
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
|
|
26
|
+
&--size-xs {
|
|
27
|
+
gap: 0.25rem;
|
|
28
|
+
min-height: 1.125rem;
|
|
29
|
+
padding: 0 0.4375rem;
|
|
30
|
+
font-size: 0.625rem;
|
|
31
|
+
line-height: 1;
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--size-sm {
|
|
36
|
+
gap: 0.375rem;
|
|
37
|
+
min-height: 1.625rem;
|
|
38
|
+
padding: 0 0.75rem;
|
|
39
|
+
font-size: 0.75rem;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
letter-spacing: 0.02em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--size-lg {
|
|
45
|
+
gap: 0.4375rem;
|
|
46
|
+
min-height: 2.25rem;
|
|
47
|
+
padding: 0 0.875rem;
|
|
48
|
+
font-size: 0.8125rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
26
51
|
&--clickable {
|
|
27
52
|
&:focus:not(:focus-visible) {
|
|
28
53
|
outline: none;
|
|
@@ -40,4 +65,8 @@
|
|
|
40
65
|
color: var(--c-on-surface);
|
|
41
66
|
}
|
|
42
67
|
}
|
|
68
|
+
|
|
69
|
+
.aw-tag--theme-soft {
|
|
70
|
+
color: var(--tag-dark-color, var(--tag-color));
|
|
71
|
+
}
|
|
43
72
|
}
|
|
@@ -116,6 +116,22 @@
|
|
|
116
116
|
color: var(--c-on-page-bg);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
&--filled {
|
|
120
|
+
background-color: var(--c-mono-900);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&--filled,
|
|
124
|
+
&--filled:hover,
|
|
125
|
+
&--filled:focus-within {
|
|
126
|
+
border-color: transparent;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&--filled &__element,
|
|
130
|
+
&--filled &__postfix {
|
|
131
|
+
background-color: transparent;
|
|
132
|
+
color: var(--c-on-mono-900);
|
|
133
|
+
}
|
|
134
|
+
|
|
119
135
|
&__fake-input {
|
|
120
136
|
--icon-width: 2.5rem;
|
|
121
137
|
--icon-count: 0;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Inter';
|
|
3
|
+
src: url('https://storage2.easyweek.io/fonts/inter/fonts_inter_Inter-VariableFont_opsz,wght.woff2') format('woff2');
|
|
4
|
+
font-weight: 400 700;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-display: swap;
|
|
7
|
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF, U+1EA0-1EF1, U+1F00-1FFF;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: 'Inter';
|
|
12
|
+
src: url('https://storage2.easyweek.io/fonts/inter/distilled/inter-latin-ext-wght.woff2') format('woff2');
|
|
13
|
+
font-weight: 400 700;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-display: swap;
|
|
16
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@font-face {
|
|
20
|
+
font-family: 'Inter';
|
|
21
|
+
src: url('https://storage2.easyweek.io/fonts/inter/distilled/inter-latin-wght.woff2') format('woff2');
|
|
22
|
+
font-weight: 400 700;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-display: swap;
|
|
25
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@font-face {
|
|
29
|
+
font-family: 'Inter';
|
|
30
|
+
src: url('https://storage2.easyweek.io/fonts/inter/distilled/inter-cyrillic-ext-wght.woff2') format('woff2');
|
|
31
|
+
font-weight: 400 700;
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-display: swap;
|
|
34
|
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: 'Inter';
|
|
39
|
+
src: url('https://storage2.easyweek.io/fonts/inter/distilled/inter-cyrillic-wght.woff2') format('woff2');
|
|
40
|
+
font-weight: 400 700;
|
|
41
|
+
font-style: normal;
|
|
42
|
+
font-display: swap;
|
|
43
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
44
|
+
}
|
package/assets/css/main.css
CHANGED
|
@@ -131,8 +131,8 @@ export default {
|
|
|
131
131
|
if (isType('Number', this.size)) {
|
|
132
132
|
return {
|
|
133
133
|
size: this.size + 'px',
|
|
134
|
-
iconSize: Math.floor(this.size * 0.
|
|
135
|
-
radius: Math.floor(this.size * 0.
|
|
134
|
+
iconSize: Math.floor(this.size * 0.5) + 'px',
|
|
135
|
+
radius: Math.floor(this.size * 0.28) + 'px'
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="aw-progress"
|
|
4
|
+
:class="`aw-progress--size-${size}`"
|
|
4
5
|
:style="{ '--progress': progressRatio, '--color': fgColor }"
|
|
5
6
|
></div>
|
|
6
7
|
</template>
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
import anime from 'animejs'
|
|
10
11
|
import { clamp } from 'rambdax'
|
|
11
12
|
import { toColor } from '@AwUtils/styles'
|
|
13
|
+
import { conf } from '@AwUtils/component'
|
|
12
14
|
|
|
13
15
|
export default {
|
|
14
16
|
name: 'AwProgress',
|
|
@@ -27,6 +29,13 @@ export default {
|
|
|
27
29
|
color: {
|
|
28
30
|
type: String,
|
|
29
31
|
default: 'accent'
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
size: {
|
|
35
|
+
type: String,
|
|
36
|
+
default() {
|
|
37
|
+
return conf(this, 'size', 'sm')
|
|
38
|
+
}
|
|
30
39
|
}
|
|
31
40
|
},
|
|
32
41
|
|
|
@@ -134,6 +134,7 @@ export default {
|
|
|
134
134
|
data() {
|
|
135
135
|
return {
|
|
136
136
|
startPos: null,
|
|
137
|
+
isRtl: false,
|
|
137
138
|
isTouch: false,
|
|
138
139
|
isSwitched: false,
|
|
139
140
|
isInternalChecked: this.isChecked
|
|
@@ -187,6 +188,7 @@ export default {
|
|
|
187
188
|
return
|
|
188
189
|
|
|
189
190
|
this.startPos = $event.screenX
|
|
191
|
+
this.isRtl = getComputedStyle(this.$el).direction === 'rtl'
|
|
190
192
|
this.isTouch = $event.type === 'touchstart'
|
|
191
193
|
this.isSwitched = false
|
|
192
194
|
|
|
@@ -195,7 +197,8 @@ export default {
|
|
|
195
197
|
|
|
196
198
|
_onPointerMove($event) {
|
|
197
199
|
const el = this.$refs.element
|
|
198
|
-
const
|
|
200
|
+
const shift = $event.screenX - this.startPos
|
|
201
|
+
const diff = this.isRtl ? -shift : shift
|
|
199
202
|
|
|
200
203
|
if (el.checked && diff < -1 * THRESHOLD) {
|
|
201
204
|
this.isInternalChecked = false
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Component :is="tag" :style="tagStyle" class="aw-tag">
|
|
3
|
-
<
|
|
2
|
+
<Component :is="tag" :style="tagStyle" class="aw-tag" :class="[`aw-tag--size-${size}`, `aw-tag--theme-${theme}`]">
|
|
3
|
+
<slot name="icon">
|
|
4
|
+
<AwIcon v-if="icon" :name="icon" :size="iconSize" :class="iconClass" />
|
|
5
|
+
</slot>
|
|
4
6
|
{{ text }}
|
|
5
7
|
</Component>
|
|
6
8
|
</template>
|
|
7
9
|
|
|
8
10
|
<script>
|
|
9
11
|
import { toColor, toOnColor, isCustomColor } from '@AwUtils/styles'
|
|
12
|
+
import { conf } from '@AwUtils/component'
|
|
13
|
+
|
|
14
|
+
const ICON_SIZES = { xs: 12, sm: 14, md: 16, lg: 16 }
|
|
15
|
+
|
|
16
|
+
const SOFT_COLORS = {
|
|
17
|
+
green: { on: 'on-forest' },
|
|
18
|
+
yellow: { on: 'on-brown' },
|
|
19
|
+
grey: { bg: 'mono-900', on: 'mono-300', dark: 'mono-300' }
|
|
20
|
+
}
|
|
10
21
|
|
|
11
22
|
export default {
|
|
12
23
|
name: 'AwTag',
|
|
@@ -40,11 +51,42 @@ export default {
|
|
|
40
51
|
iconClass: {
|
|
41
52
|
type: [String, Array, Object],
|
|
42
53
|
default: null
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
size: {
|
|
57
|
+
type: String,
|
|
58
|
+
default() {
|
|
59
|
+
return conf(this, 'size', 'md')
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
theme: {
|
|
64
|
+
type: String,
|
|
65
|
+
default() {
|
|
66
|
+
return conf(this, 'theme', 'solid')
|
|
67
|
+
}
|
|
43
68
|
}
|
|
44
69
|
},
|
|
45
70
|
|
|
46
71
|
computed: {
|
|
72
|
+
iconSize() {
|
|
73
|
+
return ICON_SIZES[this.size] || ICON_SIZES.md
|
|
74
|
+
},
|
|
75
|
+
|
|
47
76
|
tagStyle() {
|
|
77
|
+
if (isCustomColor(this.color) && this.theme === 'soft') {
|
|
78
|
+
const onColor = `on-${this.color}`
|
|
79
|
+
const { bg, on, dark } = SOFT_COLORS[this.color] || {}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
'--tag-bg-color': toColor(bg || this.color),
|
|
83
|
+
'--tag-color': this.onColor
|
|
84
|
+
? toOnColor(this.onColor)
|
|
85
|
+
: toColor(on || onColor),
|
|
86
|
+
'--tag-dark-color': toColor(dark || onColor)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
48
90
|
if (isCustomColor(this.color)) {
|
|
49
91
|
return {
|
|
50
92
|
'--tag-bg-color': toOnColor(this.color),
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Component
|
|
3
|
-
:is="_linkComponent"
|
|
3
|
+
:is="tag || _linkComponent"
|
|
4
4
|
class="aw-action-button"
|
|
5
5
|
v-bind="{
|
|
6
|
-
..._linkAttrs,
|
|
6
|
+
...(tag ? $attrs : _linkAttrs),
|
|
7
7
|
class: {
|
|
8
|
+
[`aw-action-button--size-${size}`]: true,
|
|
8
9
|
'aw-animated-icon-parent': isAnimatedIcon,
|
|
9
10
|
'aw-action-button--outline': modifiers.includes('outline'),
|
|
10
|
-
'aw-action-button--narrow': modifiers.includes('narrow')
|
|
11
|
+
'aw-action-button--narrow': modifiers.includes('narrow'),
|
|
12
|
+
'aw-action-button--active': modifiers.includes('active')
|
|
11
13
|
}
|
|
12
14
|
}"
|
|
13
15
|
v-on="$listeners"
|
|
@@ -35,18 +37,26 @@
|
|
|
35
37
|
</AwDescription>
|
|
36
38
|
</span>
|
|
37
39
|
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
<slot name="icon-right-wrapper">
|
|
41
|
+
<AwActionIcon
|
|
42
|
+
v-if="iconRight && iconRightColor"
|
|
43
|
+
:icon="iconRight"
|
|
44
|
+
size="sm"
|
|
45
|
+
:color="iconRightColor"
|
|
46
|
+
/>
|
|
47
|
+
<AwIcon
|
|
48
|
+
v-else-if="iconRight"
|
|
49
|
+
:name="iconRight"
|
|
50
|
+
size="16"
|
|
51
|
+
class="aw-action-button__icon-right"
|
|
52
|
+
/>
|
|
53
|
+
</slot>
|
|
44
54
|
|
|
45
55
|
<AwDescription
|
|
46
|
-
v-if="subdescription"
|
|
56
|
+
v-if="subdescription || $scopedSlots.subdescription"
|
|
47
57
|
class="aw-action-button__subdescription"
|
|
48
58
|
>
|
|
49
|
-
{{ subdescription }}
|
|
59
|
+
<slot name="subdescription">{{ subdescription }}</slot>
|
|
50
60
|
</AwDescription>
|
|
51
61
|
</Component>
|
|
52
62
|
</template>
|
|
@@ -54,6 +64,7 @@
|
|
|
54
64
|
<script>
|
|
55
65
|
import { isAnimatedIcon } from '@AwUtils/icons/animated'
|
|
56
66
|
import linkMixin from '@AwMixins/link'
|
|
67
|
+
import { conf } from '@AwUtils/component'
|
|
57
68
|
|
|
58
69
|
export default {
|
|
59
70
|
name: 'AwActionButton',
|
|
@@ -61,6 +72,11 @@ export default {
|
|
|
61
72
|
mixins: [linkMixin],
|
|
62
73
|
|
|
63
74
|
props: {
|
|
75
|
+
tag: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: ''
|
|
78
|
+
},
|
|
79
|
+
|
|
64
80
|
icon: {
|
|
65
81
|
type: String,
|
|
66
82
|
default: ''
|
|
@@ -101,9 +117,21 @@ export default {
|
|
|
101
117
|
default: 'arrow-animated'
|
|
102
118
|
},
|
|
103
119
|
|
|
120
|
+
iconRightColor: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: ''
|
|
123
|
+
},
|
|
124
|
+
|
|
104
125
|
modifiers: {
|
|
105
126
|
type: [String, Array],
|
|
106
127
|
default: ''
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
size: {
|
|
131
|
+
type: String,
|
|
132
|
+
default() {
|
|
133
|
+
return conf(this, 'size', 'md')
|
|
134
|
+
}
|
|
107
135
|
}
|
|
108
136
|
},
|
|
109
137
|
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
'aw-animated-icon-parent': !isDisabled && isAnimatedIcon
|
|
25
25
|
},
|
|
26
26
|
isCustomTheme ? `aw-button--theme-${theme}` : '',
|
|
27
|
-
isCustomColor ? `aw-button--color-${color}` : ''
|
|
27
|
+
isCustomColor ? `aw-button--color-${color}` : '',
|
|
28
|
+
`aw-button--corners-${corners}`
|
|
28
29
|
]"
|
|
29
30
|
:disabled="isDisabled"
|
|
30
31
|
:aria-label="$attrs['aria-label'] || text || null"
|
|
@@ -125,6 +126,13 @@ export default {
|
|
|
125
126
|
}
|
|
126
127
|
},
|
|
127
128
|
|
|
129
|
+
corners: {
|
|
130
|
+
type: String,
|
|
131
|
+
default() {
|
|
132
|
+
return conf(this, 'corners', 'rounded')
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
|
|
128
136
|
// Name of icon in button. Icon placed before text
|
|
129
137
|
icon: {
|
|
130
138
|
type: String,
|
|
@@ -278,6 +278,7 @@ export default {
|
|
|
278
278
|
|
|
279
279
|
return place.timeZone ? place.timeZone.id : undefined
|
|
280
280
|
} catch (e) {
|
|
281
|
+
console.warn('AwAddress: place time zone request failed', e)
|
|
281
282
|
return undefined
|
|
282
283
|
}
|
|
283
284
|
},
|
|
@@ -293,12 +294,22 @@ export default {
|
|
|
293
294
|
}
|
|
294
295
|
})
|
|
295
296
|
.then(({ data }) => {
|
|
297
|
+
if (data.status !== 'OK') {
|
|
298
|
+
console.warn(
|
|
299
|
+
'AwAddress: Time Zone API',
|
|
300
|
+
data.status,
|
|
301
|
+
data.errorMessage || ''
|
|
302
|
+
)
|
|
303
|
+
return { timezone: undefined, timezone_name: undefined }
|
|
304
|
+
}
|
|
305
|
+
|
|
296
306
|
return {
|
|
297
307
|
timezone: data.timeZoneId,
|
|
298
308
|
timezone_name: data.timeZoneName
|
|
299
309
|
}
|
|
300
310
|
})
|
|
301
|
-
.catch(() => {
|
|
311
|
+
.catch((e) => {
|
|
312
|
+
console.warn('AwAddress: Time Zone API request failed', e)
|
|
302
313
|
return {
|
|
303
314
|
timezone: undefined,
|
|
304
315
|
timezone_name: undefined
|
|
@@ -45,25 +45,42 @@
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<template #title="{ title, titleShowable, hideTitle }">
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
:
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
<div
|
|
49
|
+
class="aw-page-header__heading"
|
|
50
|
+
:class="{
|
|
51
|
+
'aw-page-header__heading--described':
|
|
52
|
+
hasDescription && isDesktop
|
|
53
|
+
}"
|
|
53
54
|
>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
'aw-page-header__title--showable': titleShowable,
|
|
60
|
-
'aw-page-header__title--visible': !hideTitle
|
|
61
|
-
}"
|
|
55
|
+
<slot
|
|
56
|
+
name="title"
|
|
57
|
+
:title="title"
|
|
58
|
+
:titleShowable="titleShowable"
|
|
59
|
+
:hideTitle="hideTitle"
|
|
62
60
|
>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
<h1
|
|
62
|
+
v-if="title"
|
|
63
|
+
class="aw-page-header__title"
|
|
64
|
+
:class="{
|
|
65
|
+
'sr-only': !titleShowable && hideTitle,
|
|
66
|
+
'aw-page-header__title--showable': titleShowable,
|
|
67
|
+
'aw-page-header__title--visible': !hideTitle
|
|
68
|
+
}"
|
|
69
|
+
>
|
|
70
|
+
{{ title }}
|
|
71
|
+
<slot name="after-title"></slot>
|
|
72
|
+
</h1>
|
|
73
|
+
</slot>
|
|
74
|
+
|
|
75
|
+
<slot
|
|
76
|
+
v-if="hasDescription && isDesktop"
|
|
77
|
+
name="description"
|
|
78
|
+
>
|
|
79
|
+
<AwDescription tag="div">
|
|
80
|
+
{{ description }}
|
|
81
|
+
</AwDescription>
|
|
82
|
+
</slot>
|
|
83
|
+
</div>
|
|
67
84
|
</template>
|
|
68
85
|
|
|
69
86
|
<template #default>
|
|
@@ -99,12 +116,30 @@
|
|
|
99
116
|
<!-- eslint-disable prettier/prettier -->
|
|
100
117
|
<div :class="[containerClass, { 'aw-page__grid': hasAside }]">
|
|
101
118
|
<div
|
|
102
|
-
v-if="_title"
|
|
103
|
-
class="aw-page__mobile-
|
|
104
|
-
|
|
119
|
+
v-if="_title || (hasDescription && !isDesktop)"
|
|
120
|
+
class="aw-page__mobile-heading"
|
|
121
|
+
:class="{
|
|
122
|
+
'aw-page__mobile-heading--described':
|
|
123
|
+
hasDescription && !isDesktop
|
|
124
|
+
}"
|
|
105
125
|
>
|
|
106
|
-
<
|
|
107
|
-
|
|
126
|
+
<div
|
|
127
|
+
v-if="_title"
|
|
128
|
+
class="aw-page__mobile-title"
|
|
129
|
+
aria-hidden="true"
|
|
130
|
+
>
|
|
131
|
+
<slot name="mobile-title" :title="_title">
|
|
132
|
+
{{ _title }}
|
|
133
|
+
</slot>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<slot
|
|
137
|
+
v-if="hasDescription && !isDesktop"
|
|
138
|
+
name="description"
|
|
139
|
+
>
|
|
140
|
+
<AwDescription tag="div">
|
|
141
|
+
{{ description }}
|
|
142
|
+
</AwDescription>
|
|
108
143
|
</slot>
|
|
109
144
|
</div>
|
|
110
145
|
|
|
@@ -188,6 +223,11 @@ export default {
|
|
|
188
223
|
default: null
|
|
189
224
|
},
|
|
190
225
|
|
|
226
|
+
description: {
|
|
227
|
+
type: String,
|
|
228
|
+
default: ''
|
|
229
|
+
},
|
|
230
|
+
|
|
191
231
|
// Subnavigation for the page
|
|
192
232
|
subnav: {
|
|
193
233
|
type: Array,
|
|
@@ -265,6 +305,10 @@ export default {
|
|
|
265
305
|
: this.hideBottomBar
|
|
266
306
|
},
|
|
267
307
|
|
|
308
|
+
hasDescription() {
|
|
309
|
+
return !!(this.description || this.$scopedSlots.description)
|
|
310
|
+
},
|
|
311
|
+
|
|
268
312
|
hasAside() {
|
|
269
313
|
return !!this.$scopedSlots.aside
|
|
270
314
|
},
|
|
@@ -229,7 +229,7 @@ export default {
|
|
|
229
229
|
|
|
230
230
|
return acc.concat({
|
|
231
231
|
...pick(
|
|
232
|
-
'icon,iconBg,iconActive,class,expanded,target,rel,listeners,abstract,key,badge,switcher,back,isDivide,arrow,hideText',
|
|
232
|
+
'icon,iconBg,iconActive,class,expanded,target,rel,listeners,abstract,key,badge,after,switcher,back,isDivide,arrow,hideText',
|
|
233
233
|
props
|
|
234
234
|
),
|
|
235
235
|
text,
|
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
>
|
|
29
29
|
{{ item.text }}
|
|
30
30
|
</span>
|
|
31
|
+
<div v-if="item.after" class="aw-nav__child-after">
|
|
32
|
+
<Component
|
|
33
|
+
:is="item.after.is"
|
|
34
|
+
v-bind="item.after.props"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
31
37
|
<AwBadge
|
|
32
38
|
v-if="item.badge"
|
|
33
39
|
v-bind="item.badge"
|
|
@@ -74,6 +80,15 @@
|
|
|
74
80
|
>
|
|
75
81
|
{{ subchild.text }}
|
|
76
82
|
</span>
|
|
83
|
+
<div
|
|
84
|
+
v-if="subchild.after"
|
|
85
|
+
class="aw-nav__child-after"
|
|
86
|
+
>
|
|
87
|
+
<Component
|
|
88
|
+
:is="subchild.after.is"
|
|
89
|
+
v-bind="subchild.after.props"
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
77
92
|
<AwBadge
|
|
78
93
|
v-if="subchild.badge"
|
|
79
94
|
v-bind="subchild.badge"
|
|
@@ -77,7 +77,7 @@ The `AwActionIcon` component displays an icon with optional text, with customiza
|
|
|
77
77
|
|
|
78
78
|
### Custom Size (px)
|
|
79
79
|
|
|
80
|
-
You can provide a numeric value for the `size` prop to set a custom size in pixels.
|
|
80
|
+
You can provide a numeric value for the `size` prop to set a custom size in pixels. The glyph takes half of it, the corner radius 0.28 of it.
|
|
81
81
|
|
|
82
82
|
```markup
|
|
83
83
|
<AwActionIcon icon="awesio/settings" :size="30" />
|
|
@@ -153,6 +153,7 @@ export default {
|
|
|
153
153
|
- `theme` prop accepts comma-separated modifiers
|
|
154
154
|
- Each modifier adds `aw-text-field--{modifier}` class
|
|
155
155
|
- Example: `theme="compact,bordered"` → `aw-text-field--compact aw-text-field--bordered`
|
|
156
|
+
- Built-in: `filled` (grey ground without a border), `page`, `uncolor-prefix`, `uncolor-postfix`
|
|
156
157
|
|
|
157
158
|
### Structure
|
|
158
159
|
```
|
|
@@ -30,6 +30,14 @@ The `AwProgress` component displays an animated progress bar with customizable c
|
|
|
30
30
|
<AwProgress :progress="50" color="success" />
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
### Sizes
|
|
34
|
+
|
|
35
|
+
```markup
|
|
36
|
+
<AwProgress :progress="50" />
|
|
37
|
+
<AwProgress :progress="50" size="md" />
|
|
38
|
+
<AwProgress :progress="50" size="lg" />
|
|
39
|
+
```
|
|
40
|
+
|
|
33
41
|
### With Initial Value from URL
|
|
34
42
|
|
|
35
43
|
```markup
|
|
@@ -46,6 +54,7 @@ The `AwProgress` component displays an animated progress bar with customizable c
|
|
|
46
54
|
| progress | Progress value (0-100) | `Number` | `false` | `0` |
|
|
47
55
|
| prevValueParam | URL query parameter name for initial value | `String` | `false` | `'prev_progress'` |
|
|
48
56
|
| color | Progress bar color - see [Built-in Colors](/reference/colors) | `String` | `false` | `'accent'` |
|
|
57
|
+
| size | `sm` (2px line over the content), `md` (6px rounded bar), `lg` (10px rounded bar) | `String` | `false` | `'sm'` |
|
|
49
58
|
|
|
50
59
|
### Slots
|
|
51
60
|
|
|
@@ -43,6 +43,23 @@ The `AwTag` component displays a styled tag/badge with optional icon and customi
|
|
|
43
43
|
<AwTag text="Warning" color="warning" />
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
+
### Sizes
|
|
47
|
+
|
|
48
|
+
```markup
|
|
49
|
+
<AwTag text="xs" size="xs" />
|
|
50
|
+
<AwTag text="sm" size="sm" />
|
|
51
|
+
<AwTag text="md" />
|
|
52
|
+
<AwTag text="lg" size="lg" />
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Soft Theme
|
|
56
|
+
|
|
57
|
+
```markup
|
|
58
|
+
<AwTag text="Active" theme="soft" color="green" size="sm" />
|
|
59
|
+
<AwTag text="Draft" theme="soft" color="yellow" size="sm" />
|
|
60
|
+
<AwTag text="Not connected" theme="soft" color="grey" size="sm" />
|
|
61
|
+
```
|
|
62
|
+
|
|
46
63
|
### As Link
|
|
47
64
|
|
|
48
65
|
```markup
|
|
@@ -61,10 +78,14 @@ The `AwTag` component displays a styled tag/badge with optional icon and customi
|
|
|
61
78
|
| text | Tag text content | `String` | `true` | - |
|
|
62
79
|
| icon | Icon name | `String` | `false` | `null` |
|
|
63
80
|
| iconClass | CSS classes for icon | `String` / `Array` / `Object` | `false` | `null` |
|
|
81
|
+
| size | Tag size: `xs` (18px), `sm` (26px), `md` (32px), `lg` (36px) | `String` | `false` | `'md'` |
|
|
82
|
+
| theme | `solid` or `soft` (light ground, text of the paired dark color) | `String` | `false` | `'solid'` |
|
|
64
83
|
|
|
65
84
|
### Slots
|
|
66
85
|
|
|
67
|
-
|
|
86
|
+
| Name | Description | Props | Default Slot Content |
|
|
87
|
+
|------|-------------|-------|---------------------|
|
|
88
|
+
| icon | Custom content before the text | - | Icon from the `icon` prop |
|
|
68
89
|
|
|
69
90
|
### Events
|
|
70
91
|
|
|
@@ -96,7 +117,7 @@ For a complete list of available colors, see [Built-in Colors](/reference/colors
|
|
|
96
117
|
### Icon Display
|
|
97
118
|
|
|
98
119
|
Icons are displayed before the text when provided:
|
|
99
|
-
- Icon size
|
|
120
|
+
- Icon size follows the tag size: 12px for `xs`, 14px for `sm`, 16px for `md` and `lg`
|
|
100
121
|
- Icon color matches the text color (calculated from background)
|
|
101
122
|
- Use `iconClass` prop to add custom CSS classes (e.g., `animate-spin` for loading states)
|
|
102
123
|
|
|
@@ -117,7 +117,8 @@ Menu items are transformed from Vuex store with this structure:
|
|
|
117
117
|
listeners: Object, // Event listeners
|
|
118
118
|
abstract: Boolean, // Abstract menu item (no link)
|
|
119
119
|
key: String, // Unique key
|
|
120
|
-
badge:
|
|
120
|
+
badge: Object, // Badge props
|
|
121
|
+
after: Object, // Component after the text in the submenu: { is, props }
|
|
121
122
|
switcher: Boolean, // Switcher toggle
|
|
122
123
|
back: Boolean, // Back button
|
|
123
124
|
isDivide: Boolean, // Divider
|
|
@@ -45,6 +45,35 @@ The `AwActionButton` component is a button-like component with icon, text, and o
|
|
|
45
45
|
/>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
### Compact Row
|
|
49
|
+
|
|
50
|
+
```markup
|
|
51
|
+
<AwActionButton
|
|
52
|
+
size="sm"
|
|
53
|
+
modifiers="outline narrow"
|
|
54
|
+
text="Own domain"
|
|
55
|
+
description="Not connected"
|
|
56
|
+
icon="lucide/link"
|
|
57
|
+
icon-color="light-blue"
|
|
58
|
+
href="/domain"
|
|
59
|
+
/>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### As a Choice
|
|
63
|
+
|
|
64
|
+
```markup
|
|
65
|
+
<AwActionButton
|
|
66
|
+
tag="label"
|
|
67
|
+
size="sm"
|
|
68
|
+
:modifiers="['outline', 'narrow', value === 'a' ? 'active' : '']"
|
|
69
|
+
text="Option A"
|
|
70
|
+
>
|
|
71
|
+
<template #icon-right-wrapper>
|
|
72
|
+
<AwRadio :checked="value" value="a" name="choice" @change="value = $event" />
|
|
73
|
+
</template>
|
|
74
|
+
</AwActionButton>
|
|
75
|
+
```
|
|
76
|
+
|
|
48
77
|
### As Links
|
|
49
78
|
|
|
50
79
|
```markup
|
|
@@ -78,7 +107,10 @@ The `AwActionButton` component is a button-like component with icon, text, and o
|
|
|
78
107
|
| description | Description text below main text | `String` | `false` | `''` |
|
|
79
108
|
| subdescription | Subdescription text | `String` | `false` | `''` |
|
|
80
109
|
| iconRight | Trailing icon name | `String` | `false` | `'arrow-animated'` |
|
|
81
|
-
|
|
|
110
|
+
| iconRightColor | Ground color of the trailing icon; without it the icon has no ground | `String` | `false` | `''` |
|
|
111
|
+
| size | `md` or `sm` (smaller text, 40px icon, tighter paddings with `narrow`) | `String` | `false` | `'md'` |
|
|
112
|
+
| tag | HTML tag to render instead of a link or a button (e.g., `label`, `div`); attributes go to it as is | `String` | `false` | `''` |
|
|
113
|
+
| modifiers | CSS modifiers: 'outline', 'narrow', 'active' | `String` / `Array` | `false` | `''` |
|
|
82
114
|
| href | Link URL (for both internal and external links) | `String` | `false` | `undefined` |
|
|
83
115
|
| target | Link target (e.g., `_blank` for external links) | `String` | `false` | `undefined` |
|
|
84
116
|
|
|
@@ -94,6 +126,8 @@ The `AwActionButton` component is a button-like component with icon, text, and o
|
|
|
94
126
|
|------|-------------|-------|---------------------|
|
|
95
127
|
| default | Custom text content | `{ text }` | Text prop value |
|
|
96
128
|
| icon-wrapper | Custom icon wrapper | - | Default icon wrapper |
|
|
129
|
+
| icon-right-wrapper | Custom trailing content, e.g. `AwRadio` or `AwSwitcher` | - | Trailing icon |
|
|
130
|
+
| subdescription | Custom subdescription content | - | Subdescription prop value |
|
|
97
131
|
|
|
98
132
|
### Events
|
|
99
133
|
|
|
@@ -122,11 +156,17 @@ The component extends the link mixin, providing intelligent link handling:
|
|
|
122
156
|
- **Trailing Icon:** Defaults to `arrow-animated`, can be customized with `iconRight` prop
|
|
123
157
|
- **Animated Icons:** Automatically detected and styled (e.g., `arrow-animated`)
|
|
124
158
|
|
|
159
|
+
### Hover and Expanded State
|
|
160
|
+
|
|
161
|
+
- Only links, buttons and labels react to hover (darker outline); with `tag="div"` the row is static
|
|
162
|
+
- With `aria-expanded="true"` the trailing icon turns upside down
|
|
163
|
+
|
|
125
164
|
### Visual Modifiers
|
|
126
165
|
|
|
127
166
|
Available modifiers for different styles:
|
|
128
167
|
- `outline` - Outlined button style
|
|
129
168
|
- `narrow` - Reduced padding for compact layouts
|
|
169
|
+
- `active` - Dark 2px outline of the chosen option
|
|
130
170
|
- Multiple modifiers can be combined using an array: `:modifiers="['outline', 'narrow']"`
|
|
131
171
|
|
|
132
172
|
## Notes
|
|
@@ -46,6 +46,19 @@ The `AwButton` component is a versatile button with multiple themes, sizes, colo
|
|
|
46
46
|
<AwButton size="lg">Large</AwButton>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
### Corners
|
|
50
|
+
|
|
51
|
+
```markup
|
|
52
|
+
<AwButton corners="pill">Pill</AwButton>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Surface Color
|
|
56
|
+
|
|
57
|
+
```markup
|
|
58
|
+
<AwButton color="surface">On a tinted ground</AwButton>
|
|
59
|
+
<AwButton color="surface" theme="outline">With an outline</AwButton>
|
|
60
|
+
```
|
|
61
|
+
|
|
49
62
|
### With Loading State
|
|
50
63
|
|
|
51
64
|
```markup
|
|
@@ -68,6 +81,7 @@ The `AwButton` component is a versatile button with multiple themes, sizes, colo
|
|
|
68
81
|
| size | Button size (xs, sm, md, lg) | `String` | `false` | `'md'` |
|
|
69
82
|
| color | Button color - see [Built-in Colors](/reference/colors) | `String` | `false` | `'accent'` |
|
|
70
83
|
| theme | Button theme (solid, outline, icon) | `String` | `false` | `'solid'` |
|
|
84
|
+
| corners | Corner shape: `rounded` or `pill`; adds the class `aw-button--corners-{value}` | `String` | `false` | `'rounded'` |
|
|
71
85
|
| icon | Leading icon name - see [Built-in Icons](/reference/icons) | `String` | `false` | `''` |
|
|
72
86
|
| iconRight | Trailing icon name - see [Built-in Icons](/reference/icons) | `String` | `false` | `''` |
|
|
73
87
|
| loading | Show loading spinner | `Boolean` / `String` | `false` | `false` |
|
|
@@ -129,7 +129,7 @@ This component uses `AwSelectObject` slots internally. All `AwSelectObject` slot
|
|
|
129
129
|
- Session tokens are used for billing optimization
|
|
130
130
|
- Address types are filtered (removes political, intersection, sublocality types)
|
|
131
131
|
- Google branding is automatically displayed
|
|
132
|
-
- Timezone comes from the place's `timeZone` field via `Place.fetchFields` (Places API (New)), which works with a key restricted to websites. Only when the place has no time zone does the component fall back to the Time Zone API (it rejects website-restricted keys); any failure leaves `timezone` undefined
|
|
132
|
+
- Timezone comes from the place's `timeZone` field via `Place.fetchFields` (Places API (New)), which works with a key restricted to websites. Only when the place has no time zone does the component fall back to the Time Zone API (it rejects website-restricted keys); any failure, including a Time Zone API answer whose `status` is not `OK`, leaves `timezone` undefined and logs the reason with `console.warn`
|
|
133
133
|
- Component handles Google Maps script loading and initialization
|
|
134
134
|
- Search is debounced and handled by `AwSelectObject`
|
|
135
135
|
- Selected address triggers Places API details request
|
|
@@ -34,6 +34,14 @@ The `AwPage` component is a top-level page container that provides a structured
|
|
|
34
34
|
</AwPage>
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
### With Description
|
|
38
|
+
|
|
39
|
+
```markup
|
|
40
|
+
<AwPage title="Page Title" description="What the page is for">
|
|
41
|
+
<p>Page content</p>
|
|
42
|
+
</AwPage>
|
|
43
|
+
```
|
|
44
|
+
|
|
37
45
|
### With Breadcrumb
|
|
38
46
|
|
|
39
47
|
```markup
|
|
@@ -114,6 +122,7 @@ The `AwPage` component is a top-level page container that provides a structured
|
|
|
114
122
|
|------|-------------|------|----------|---------|
|
|
115
123
|
| title | Main headline on the page | `String` | `false` | `''` |
|
|
116
124
|
| metaTitle | Meta title for SEO (uses `title` if not provided) | `String` | `false` | `''` |
|
|
125
|
+
| description | Text under the title: in the header on desktop, under the mobile title on phones | `String` | `false` | `''` |
|
|
117
126
|
| titleTag | HTML tag for title element | `String` | `false` | `'h1'` |
|
|
118
127
|
| breadcrumb | Breadcrumb object with `href` and `title` | `Object` | `false` | `null` |
|
|
119
128
|
| subnav | Subnavigation items array | `Array` | `false` | `[]` |
|
|
@@ -148,6 +157,7 @@ The `AwPage` component is a top-level page container that provides a structured
|
|
|
148
157
|
| aside | Sidebar content (enables aside layout) | - | - |
|
|
149
158
|
| heading | Custom header (replaces default) | `{ titleTag, title, breadcrumb }` | Default header |
|
|
150
159
|
| title | Custom title content | `{ title, titleShowable, hideTitle }` | Default title |
|
|
160
|
+
| description | Custom content under the title | - | Description prop value |
|
|
151
161
|
| buttons | Header buttons area | - | - |
|
|
152
162
|
| subnav | Custom subnavigation | `{ subnav }` | Default `AwTabNav` component |
|
|
153
163
|
| headline-breadcrumb | Custom breadcrumb button | - | Default back button |
|
package/docs/configuration.md
CHANGED
|
@@ -82,17 +82,28 @@ export default {
|
|
|
82
82
|
|
|
83
83
|
**Default:** `'https://static.awes.io/demo/awes-background.svg'`
|
|
84
84
|
|
|
85
|
-
####
|
|
85
|
+
#### Fonts
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
The default font is Inter. The library loads it from our CDN (`https://storage2.easyweek.io/fonts/inter/`), so an app has nothing to connect.
|
|
88
|
+
|
|
89
|
+
To use another font, set `style.fontFamily` and load the font: declare `@font-face` in the app styles, or set the optional `googleFont`:
|
|
88
90
|
|
|
89
91
|
```javascript
|
|
90
92
|
export default {
|
|
91
|
-
googleFont: 'https://fonts.googleapis.com/
|
|
93
|
+
googleFont: 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap',
|
|
94
|
+
|
|
95
|
+
style: {
|
|
96
|
+
fontFamily: {
|
|
97
|
+
heading: ['Roboto', 'sans-serif'],
|
|
98
|
+
body: ['Roboto', 'sans-serif']
|
|
99
|
+
}
|
|
100
|
+
}
|
|
92
101
|
}
|
|
93
102
|
```
|
|
94
103
|
|
|
95
|
-
**Default:**
|
|
104
|
+
**Default values:**
|
|
105
|
+
- `googleFont`: `null` (Google Fonts are off)
|
|
106
|
+
- `style.fontFamily.heading`, `style.fontFamily.body`: `['Inter', 'sans-serif']`
|
|
96
107
|
|
|
97
108
|
#### Custom Styles
|
|
98
109
|
|
|
@@ -365,8 +376,6 @@ export default {
|
|
|
365
376
|
src: '/background.svg'
|
|
366
377
|
},
|
|
367
378
|
|
|
368
|
-
googleFont: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap',
|
|
369
|
-
|
|
370
379
|
style: styles.default
|
|
371
380
|
}
|
|
372
381
|
|
package/nuxt/awes.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.146.0",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"nuxt": "^2.18.1"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "330d17ea4d92b165311c06410f29d82cc7b5fd72"
|
|
120
120
|
}
|
package/tailwind.config.js
CHANGED
|
@@ -107,8 +107,8 @@ module.exports = {
|
|
|
107
107
|
unset: 'unset'
|
|
108
108
|
},
|
|
109
109
|
fontFamily: {
|
|
110
|
-
heading: ['
|
|
111
|
-
body: ['
|
|
110
|
+
heading: ['Inter', 'sans-serif'],
|
|
111
|
+
body: ['Inter', 'sans-serif']
|
|
112
112
|
},
|
|
113
113
|
fontSize: {
|
|
114
114
|
xxs: '0.5rem',
|