@awes-io/ui 2.143.0 → 2.144.1
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/assets/css/components/action-card.css +1 -0
- package/assets/css/components/action-icon.css +2 -2
- package/assets/css/components/alert.css +49 -33
- package/assets/css/components/animation.css +14 -0
- package/assets/css/components/badge.css +1 -0
- package/assets/css/components/banner-text.css +15 -4
- package/assets/css/components/button.css +8 -0
- package/assets/css/components/card.css +0 -1
- package/assets/css/components/content-placeholder.css +4 -3
- package/assets/css/components/dropdown.css +20 -7
- package/assets/css/components/icon-menu-item.css +12 -7
- package/assets/css/components/mobile-menu-nav.css +8 -4
- package/assets/css/components/text-field.css +4 -0
- package/assets/css/main.css +1 -0
- package/components/1_atoms/AwActionIcon.vue +11 -2
- package/components/1_atoms/AwFlow.vue +26 -11
- package/components/1_atoms/AwGrid.vue +11 -3
- package/components/1_atoms/AwIcon/AwIcon.vue +5 -3
- package/components/1_atoms/AwIcon/AwIconSystemMono.vue +3 -2
- package/components/1_atoms/AwInput.vue +2 -2
- package/components/1_atoms/AwList.vue +3 -1
- package/components/1_atoms/AwRadio.vue +1 -1
- package/components/1_atoms/AwSlider.vue +15 -1
- package/components/1_atoms/AwTag.vue +6 -1
- package/components/2_molecules/AwAlert.vue +67 -41
- package/components/2_molecules/AwBadge.vue +1 -1
- package/components/2_molecules/AwBannerText.vue +8 -2
- package/components/2_molecules/AwButton.vue +1 -0
- package/components/2_molecules/AwDescriptionInput.vue +19 -1
- package/components/3_organisms/AwBottomBar.vue +22 -4
- package/components/3_organisms/AwSubnav.vue +11 -1
- package/components/3_organisms/AwTable/AwTableBuilder.vue +8 -0
- package/components/3_organisms/AwTable/_AwTableCellDropdown.vue +6 -1
- package/components/3_organisms/AwTable/_AwTableRow.vue +2 -1
- package/components/4_pages/AwPage.vue +1 -0
- package/components/5_layouts/_AwMenuItemIcon.vue +9 -2
- package/components/5_layouts/_AwMobileMenuItem.vue +5 -3
- package/components/_config.js +26 -1
- package/docs/components/atoms/aw-accordion-fold.md +55 -17
- package/docs/components/atoms/aw-action-card-body.md +37 -5
- package/docs/components/atoms/aw-action-card.md +47 -11
- package/docs/components/atoms/aw-action-icon.md +50 -12
- package/docs/components/atoms/aw-card.md +35 -10
- package/docs/components/atoms/aw-checkbox.md +176 -0
- package/docs/components/atoms/aw-content-placeholder.md +33 -2
- package/docs/components/atoms/aw-dock.md +20 -14
- package/docs/components/atoms/aw-dropdown.md +72 -22
- package/docs/components/atoms/aw-flow.md +71 -23
- package/docs/components/atoms/aw-grid.md +30 -12
- package/docs/components/atoms/aw-icon-system-color.md +1 -0
- package/docs/components/atoms/aw-icon-system-mono.md +1 -0
- package/docs/components/atoms/aw-icon.md +3 -3
- package/docs/components/atoms/aw-info.md +38 -0
- package/docs/components/atoms/aw-input.md +94 -2
- package/docs/components/atoms/aw-label.md +62 -9
- package/docs/components/atoms/aw-link.md +61 -9
- package/docs/components/atoms/aw-list.md +68 -4
- package/docs/components/atoms/aw-progress.md +52 -3
- package/docs/components/atoms/aw-radio.md +73 -0
- package/docs/components/atoms/aw-select-native.md +128 -0
- package/docs/components/atoms/aw-slider.md +114 -7
- package/docs/components/atoms/aw-switcher.md +77 -0
- package/docs/components/atoms/aw-tag.md +67 -3
- package/docs/components/atoms/aw-toggler.md +22 -1
- package/docs/components/molecules/aw-action-button.md +58 -11
- package/docs/components/molecules/aw-alert.md +154 -32
- package/docs/components/molecules/aw-badge.md +31 -10
- package/docs/components/molecules/aw-banner-text.md +84 -18
- package/docs/components/molecules/aw-button-nav.md +65 -0
- package/docs/components/molecules/aw-button.md +76 -6
- package/docs/components/molecules/aw-description-input.md +63 -6
- package/docs/components/molecules/aw-empty-container.md +172 -23
- package/docs/components/molecules/aw-island.md +282 -10
- package/docs/components/organisms/aw-filter-select.md +14 -0
- package/docs/components/pages/aw-page-single.md +47 -0
- package/docs/guides/page-patterns/detail-pages.md +89 -26
- package/docs/guides/page-patterns/list-pages.md +158 -10
- package/docs/reference/colors.md +232 -0
- package/docs/reference/icons.md +163 -0
- package/docs/reference/troubleshooting.md +19 -0
- package/package.json +2 -2
- package/store/awesIo.js +11 -0
- package/CHANGELOG.md +0 -4544
- package/dist/css/aw-icons.css +0 -26
- package/dist/fonts/aw-icons.svg +0 -18
- package/dist/fonts/aw-icons.ttf +0 -0
- package/dist/fonts/aw-icons.woff +0 -0
- package/dist/fonts/aw-icons.woff2 +0 -0
- package/nuxt/icons.css +0 -26
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
flex-shrink: 0;
|
|
8
8
|
|
|
9
9
|
width: var(--size);
|
|
10
|
-
|
|
10
|
+
aspect-ratio: 1 / 1;
|
|
11
11
|
padding: min(0.25rem, calc(var(--size) / 8));
|
|
12
12
|
border-radius: var(--radius);
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
img {
|
|
18
18
|
width: var(--size);
|
|
19
|
-
|
|
19
|
+
aspect-ratio: 1 / 1;
|
|
20
20
|
border-radius: var(--radius);
|
|
21
21
|
object-fit: cover;
|
|
22
22
|
}
|
|
@@ -1,49 +1,59 @@
|
|
|
1
1
|
.aw-alert {
|
|
2
|
-
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: flex-start;
|
|
4
|
+
gap: 1rem;
|
|
5
|
+
|
|
6
|
+
padding: 1rem;
|
|
3
7
|
border-radius: 0.625rem;
|
|
4
|
-
|
|
8
|
+
background: var(--aw-alert-color);
|
|
5
9
|
|
|
6
10
|
&__icon {
|
|
7
|
-
|
|
8
|
-
color: var(--aw-alert-color);
|
|
11
|
+
color: var(--aw-alert-on-color);
|
|
9
12
|
}
|
|
10
13
|
|
|
11
|
-
.aw-description {
|
|
14
|
+
/* .aw-description {
|
|
12
15
|
color: var(--c-on-surface);
|
|
13
16
|
|
|
14
17
|
a {
|
|
15
18
|
color: var(--c-on-surface);
|
|
16
19
|
}
|
|
17
|
-
}
|
|
20
|
+
} */
|
|
18
21
|
|
|
19
22
|
&__title {
|
|
20
23
|
display: flex;
|
|
21
|
-
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 0.25rem;
|
|
26
|
+
margin-inline-end: auto;
|
|
27
|
+
|
|
28
|
+
color: var(--c-on-surface);
|
|
29
|
+
font-size: 0.875rem;
|
|
30
|
+
line-height: 1.2857;
|
|
22
31
|
|
|
23
32
|
&-text {
|
|
24
33
|
font-weight: 700;
|
|
25
|
-
|
|
34
|
+
line-height: 1.1428;
|
|
26
35
|
}
|
|
27
36
|
}
|
|
28
37
|
|
|
29
38
|
&__buttons {
|
|
30
39
|
display: flex;
|
|
40
|
+
gap: 1rem;
|
|
31
41
|
|
|
32
42
|
align-items: center;
|
|
33
|
-
margin-left: 1.75rem;
|
|
34
|
-
margin-top: 0.5rem;
|
|
35
43
|
|
|
36
44
|
font-size: 0.875rem;
|
|
37
45
|
line-height: 1.125rem;
|
|
38
46
|
font-weight: 700;
|
|
39
47
|
|
|
40
48
|
:where(:is(a, button):not(.aw-button)) {
|
|
41
|
-
--btn-color: var(--aw-alert-color);
|
|
42
|
-
color: var(--aw-alert-color);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:where(:is(a, button):not(.aw-button)) {
|
|
49
|
+
--btn-color: var(--aw-alert-on-color);
|
|
50
|
+
color: var(--aw-alert-on-color);
|
|
46
51
|
text-decoration: underline;
|
|
52
|
+
|
|
53
|
+
&:hover {
|
|
54
|
+
color: var(--aw-alert-on-color);
|
|
55
|
+
opacity: 0.7;
|
|
56
|
+
}
|
|
47
57
|
}
|
|
48
58
|
|
|
49
59
|
a,
|
|
@@ -55,26 +65,32 @@
|
|
|
55
65
|
}
|
|
56
66
|
}
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
.aw-alert__title {
|
|
60
|
-
align-items: start;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&--color-default {
|
|
65
|
-
border: 0.125rem dashed var(--c-mono-800);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@screen lg {
|
|
70
|
-
.aw-alert {
|
|
68
|
+
&__close {
|
|
71
69
|
display: flex;
|
|
72
|
-
|
|
70
|
+
align-items: flex-start;
|
|
71
|
+
|
|
72
|
+
.aw-button--theme-icon {
|
|
73
|
+
--icon-color: var(--aw-alert-on-color);
|
|
74
|
+
opacity: 1;
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
&:hover,
|
|
77
|
+
&:focus-visible {
|
|
78
|
+
opacity: 0.7;
|
|
79
|
+
}
|
|
78
80
|
}
|
|
81
|
+
|
|
82
|
+
/* justify-content: flex-end;
|
|
83
|
+
font-size: 0.875rem;
|
|
84
|
+
line-height: 1.125rem;
|
|
85
|
+
font-weight: 700;
|
|
86
|
+
color: var(--aw-alert-on-color);
|
|
87
|
+
|
|
88
|
+
a,
|
|
89
|
+
button {
|
|
90
|
+
font-size: 0.875rem;
|
|
91
|
+
line-height: 1.125rem;
|
|
92
|
+
font-weight: 700;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
} */
|
|
79
95
|
}
|
|
80
96
|
}
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
display: grid;
|
|
5
5
|
grid-gap: theme('spacing.1', 0.25rem) theme('spacing.4', 1rem);
|
|
6
|
-
grid-template-areas:
|
|
7
|
-
|
|
6
|
+
grid-template-areas:
|
|
7
|
+
'icon title'
|
|
8
|
+
'icon description';
|
|
8
9
|
grid-template-columns: var(--banner-text-icon-size) auto;
|
|
9
10
|
|
|
10
11
|
&__icon {
|
|
11
12
|
grid-area: icon;
|
|
12
13
|
|
|
13
14
|
display: flex;
|
|
14
|
-
align-items:center;
|
|
15
|
+
align-items: center;
|
|
15
16
|
justify-content: center;
|
|
16
17
|
|
|
17
18
|
width: var(--banner-text-icon-size);
|
|
@@ -25,16 +26,26 @@
|
|
|
25
26
|
&--rounded {
|
|
26
27
|
border-radius: 50%;
|
|
27
28
|
}
|
|
29
|
+
|
|
30
|
+
&--square {
|
|
31
|
+
border-radius: 0.625rem;
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
&__title {
|
|
31
36
|
grid-area: title;
|
|
32
37
|
margin: 0;
|
|
38
|
+
|
|
39
|
+
&.aw-sub-headline {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: 0.25rem;
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
44
|
|
|
35
45
|
&__title-arrow {
|
|
36
46
|
font-size: 0.875em;
|
|
37
|
-
margin-
|
|
47
|
+
margin-top: 0.25rem;
|
|
48
|
+
/* margin-left: -0.25em; */
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
&__description {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
position: relative;
|
|
21
21
|
overflow: hidden;
|
|
22
|
-
background-color: rgba(var(--c-mono-
|
|
22
|
+
background-color: rgba(var(--c-mono-800-rgb), 0.6);
|
|
23
23
|
|
|
24
24
|
&::before {
|
|
25
25
|
content: '';
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
background: linear-gradient(
|
|
33
33
|
to right,
|
|
34
34
|
transparent 0%,
|
|
35
|
-
rgba(var(--c-mono-
|
|
35
|
+
rgba(var(--c-mono-800-rgb), 0.75) 15%,
|
|
36
36
|
transparent 30%
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
animation-duration: 1.5s;
|
|
40
40
|
animation-fill-mode: forwards;
|
|
41
41
|
animation-iteration-count: infinite;
|
|
42
|
-
animation-name:
|
|
42
|
+
animation-name: aw-placeholder;
|
|
43
43
|
animation-timing-function: linear;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&--image {
|
|
87
|
+
--ph-width: minmax(1rem, 100%);
|
|
87
88
|
--ph-aspect-ratio: 16 / 9;
|
|
88
89
|
}
|
|
89
90
|
|
|
@@ -55,21 +55,27 @@
|
|
|
55
55
|
margin: 0;
|
|
56
56
|
padding: 0.75rem 1.5rem;
|
|
57
57
|
border-radius: 0.625rem 0.625rem 0 0;
|
|
58
|
-
|
|
59
|
-
& + .aw-dropdown__content--mobile {
|
|
60
|
-
border-top-left-radius: 0;
|
|
61
|
-
border-top-right-radius: 0;
|
|
62
|
-
border-top: 1px solid var(--c-mono-900);
|
|
63
|
-
}
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
&__description {
|
|
61
|
+
background-color: var(--c-surface);
|
|
62
|
+
color: var(--c-mono-400);
|
|
63
|
+
|
|
67
64
|
text-align: center;
|
|
68
65
|
font-size: theme('fontSize.sm', 0.875rem);
|
|
69
|
-
|
|
66
|
+
|
|
67
|
+
margin: 0;
|
|
68
|
+
padding: 0.75rem theme('spacing.4', 1rem);
|
|
69
|
+
border-radius: 10px 10px 0 0;
|
|
70
70
|
position: relative;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
&__title + &__description {
|
|
74
|
+
border-radius: 0;
|
|
75
|
+
margin-top: -0.5rem;
|
|
76
|
+
padding-block: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
73
79
|
&__content {
|
|
74
80
|
max-height: 100%;
|
|
75
81
|
|
|
@@ -95,6 +101,13 @@
|
|
|
95
101
|
} */
|
|
96
102
|
}
|
|
97
103
|
|
|
104
|
+
&__title + &__content--mobile,
|
|
105
|
+
&__description + &__content--mobile {
|
|
106
|
+
border-top-left-radius: 0;
|
|
107
|
+
border-top-right-radius: 0;
|
|
108
|
+
border-top: 1px solid var(--c-mono-900);
|
|
109
|
+
}
|
|
110
|
+
|
|
98
111
|
&__close {
|
|
99
112
|
width: 100%;
|
|
100
113
|
margin-top: 1rem;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
.aw-icon-menu-item {
|
|
14
14
|
&__icon,
|
|
15
15
|
&__text {
|
|
16
|
-
color: var(--c-mono-
|
|
16
|
+
color: var(--c-mono-100);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
&__icon {
|
|
31
31
|
display: block;
|
|
32
|
-
color: var(--c-mono-
|
|
32
|
+
color: var(--c-mono-300);
|
|
33
33
|
transition: 60ms color;
|
|
34
34
|
|
|
35
35
|
&-block {
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
line-height: 1;
|
|
77
77
|
|
|
78
78
|
position: absolute;
|
|
79
|
-
right: 0;
|
|
80
|
-
top:
|
|
79
|
+
right: -0.75rem;
|
|
80
|
+
top: 1rem;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&__icon-badge--with-text {
|
|
@@ -111,13 +111,18 @@
|
|
|
111
111
|
|
|
112
112
|
&__icon {
|
|
113
113
|
&-block {
|
|
114
|
-
padding: 0.515625rem 0.
|
|
115
|
-
width:
|
|
114
|
+
padding: 0.515625rem 0.5rem;
|
|
115
|
+
width: 4rem;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
+
|
|
119
|
+
&__icon-badge {
|
|
120
|
+
right: 0.5rem;
|
|
121
|
+
top: 0.5rem;
|
|
122
|
+
}
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
.aw-icon-menu-item-tooltip.aw-tooltip[data-visible] {
|
|
122
127
|
z-index: 21;
|
|
123
|
-
}
|
|
128
|
+
}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
font-size: 1rem;
|
|
3
3
|
|
|
4
4
|
h3, h4 {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
gap: 0.5rem;
|
|
5
9
|
color: var(--c-mono-400);
|
|
6
10
|
font-size: 0.875rem;
|
|
7
11
|
line-height: 1rem;
|
|
@@ -24,13 +28,13 @@
|
|
|
24
28
|
.aw-mobile-menu-nav__item--divide {
|
|
25
29
|
position: relative;
|
|
26
30
|
padding-top: 2.5rem;
|
|
27
|
-
|
|
31
|
+
|
|
28
32
|
&:before {
|
|
29
33
|
@apply bg-mono-800;
|
|
30
34
|
content: '';
|
|
31
35
|
display: block;
|
|
32
36
|
height: 1px;
|
|
33
|
-
|
|
37
|
+
|
|
34
38
|
position: absolute;
|
|
35
39
|
top: calc(0.75rem - 1px);
|
|
36
40
|
left: 1.5rem;
|
|
@@ -44,13 +48,13 @@
|
|
|
44
48
|
|
|
45
49
|
.aw-mobile-menu-nav__item--divide {
|
|
46
50
|
position: relative;
|
|
47
|
-
|
|
51
|
+
|
|
48
52
|
&:before {
|
|
49
53
|
@apply bg-mono-800;
|
|
50
54
|
content: '';
|
|
51
55
|
display: block;
|
|
52
56
|
height: 1px;
|
|
53
|
-
|
|
57
|
+
|
|
54
58
|
position: absolute;
|
|
55
59
|
top: -1px;
|
|
56
60
|
left: 1.5rem;
|
|
@@ -262,6 +262,10 @@
|
|
|
262
262
|
top: theme('spacing.3', 0.75rem);
|
|
263
263
|
transform-origin: left top;
|
|
264
264
|
transition: 100ms transform ease-out-sine;
|
|
265
|
+
-webkit-user-select: none;
|
|
266
|
+
-moz-user-select: none;
|
|
267
|
+
-ms-user-select: none;
|
|
268
|
+
user-select: none;
|
|
265
269
|
}
|
|
266
270
|
|
|
267
271
|
&__label--required:after {
|
package/assets/css/main.css
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script>
|
|
21
|
+
import { isType } from 'rambdax'
|
|
21
22
|
import { toColor, toOnColor } from '@AwUtils/styles'
|
|
22
23
|
import { isAnimatedIcon } from '@AwUtils/icons/animated'
|
|
23
24
|
|
|
@@ -92,10 +93,10 @@ export default {
|
|
|
92
93
|
},
|
|
93
94
|
|
|
94
95
|
size: {
|
|
95
|
-
type: String, // xs, sm, md, lg
|
|
96
|
+
type: [String, Number], // xs, sm, md, lg or custom size in pixels
|
|
96
97
|
default: SIZE_DEFAULT,
|
|
97
98
|
validator(size) {
|
|
98
|
-
return SIZES_NAMES.includes(size)
|
|
99
|
+
return typeof size === 'number' || SIZES_NAMES.includes(size)
|
|
99
100
|
}
|
|
100
101
|
},
|
|
101
102
|
|
|
@@ -127,6 +128,14 @@ export default {
|
|
|
127
128
|
|
|
128
129
|
computed: {
|
|
129
130
|
sizeConfig() {
|
|
131
|
+
if (isType('Number', this.size)) {
|
|
132
|
+
return {
|
|
133
|
+
size: this.size + 'px',
|
|
134
|
+
iconSize: Math.floor(this.size * 0.65) + 'px',
|
|
135
|
+
radius: Math.floor(this.size * 0.2) + 'px'
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
130
139
|
const sizes = this.$screen[this.desktopFrom] ? SIZES : SIZES_MOBILE
|
|
131
140
|
|
|
132
141
|
return sizes[this.size] || sizes[SIZE_DEFAULT]
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
2
|
+
<Component
|
|
3
|
+
:is="tag"
|
|
4
4
|
:class="{
|
|
5
|
+
flex: !inline,
|
|
6
|
+
'inline-flex': inline,
|
|
5
7
|
'flex-wrap': wrap,
|
|
6
8
|
'flex-col': vertical,
|
|
9
|
+
'justify-center': justify === 'center',
|
|
7
10
|
'justify-between': justify === 'between',
|
|
8
11
|
'justify-end': justify === 'end',
|
|
9
12
|
'justify-start': justify === 'start',
|
|
10
|
-
'items-center':
|
|
11
|
-
'items-end':
|
|
12
|
-
'items-start':
|
|
13
|
+
'items-center': _align === 'center',
|
|
14
|
+
'items-end': _align === 'end',
|
|
15
|
+
'items-start': _align === 'start',
|
|
16
|
+
'gap-1': gap === 1,
|
|
17
|
+
'gap-2': gap === 2,
|
|
18
|
+
'gap-3': gap === 3,
|
|
19
|
+
'gap-4': gap === 4,
|
|
20
|
+
'gap-5': gap === 5,
|
|
21
|
+
'gap-6': gap === 6,
|
|
22
|
+
'gap-8': gap === 8
|
|
13
23
|
}"
|
|
14
24
|
>
|
|
15
25
|
<slot />
|
|
16
|
-
</
|
|
26
|
+
</Component>
|
|
17
27
|
</template>
|
|
18
28
|
|
|
19
29
|
<script>
|
|
20
|
-
import { notEmptyNode } from '@AwUtils/component'
|
|
21
|
-
|
|
22
30
|
export default {
|
|
23
31
|
name: 'AwFlow',
|
|
24
32
|
|
|
@@ -39,13 +47,20 @@ export default {
|
|
|
39
47
|
},
|
|
40
48
|
|
|
41
49
|
align: {
|
|
42
|
-
type: String
|
|
43
|
-
default: 'center'
|
|
50
|
+
type: String
|
|
44
51
|
},
|
|
45
52
|
|
|
46
53
|
vertical: Boolean,
|
|
47
54
|
|
|
48
|
-
wrap: Boolean
|
|
55
|
+
wrap: Boolean,
|
|
56
|
+
|
|
57
|
+
inline: Boolean
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
computed: {
|
|
61
|
+
_align() {
|
|
62
|
+
return this.align || (!this.vertical && 'center')
|
|
63
|
+
}
|
|
49
64
|
}
|
|
50
65
|
}
|
|
51
66
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { path } from 'rambdax'
|
|
2
|
+
import { path, isNil } from 'rambdax'
|
|
3
3
|
|
|
4
4
|
const isEmptyNode = ({ tag, text = '' }) => {
|
|
5
5
|
return !tag && !text.trim()
|
|
@@ -15,7 +15,7 @@ const makeClass = (base, option, defaultValue) => {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
return classes
|
|
18
|
-
} else if (option) {
|
|
18
|
+
} else if (!isNil(option)) {
|
|
19
19
|
return base + '-' + option
|
|
20
20
|
} else {
|
|
21
21
|
return base + '-' + defaultValue
|
|
@@ -41,6 +41,11 @@ export default {
|
|
|
41
41
|
align: {
|
|
42
42
|
type: String,
|
|
43
43
|
default: 'start'
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
span: {
|
|
47
|
+
type: [Number, Object],
|
|
48
|
+
default: null
|
|
44
49
|
}
|
|
45
50
|
},
|
|
46
51
|
|
|
@@ -54,12 +59,15 @@ export default {
|
|
|
54
59
|
'grid',
|
|
55
60
|
makeClass('grid-cols', props.col, 1),
|
|
56
61
|
makeClass('gap', props.gap, 4),
|
|
62
|
+
isNil(props.span)
|
|
63
|
+
? null
|
|
64
|
+
: makeClass('col-span', props.span, 1),
|
|
57
65
|
{
|
|
58
66
|
'items-start': props.align === 'start',
|
|
59
67
|
'items-center': props.align === 'center',
|
|
60
68
|
'items-end': props.align === 'end'
|
|
61
69
|
}
|
|
62
|
-
]
|
|
70
|
+
].filter(Boolean)
|
|
63
71
|
},
|
|
64
72
|
children.reduce((acc, child) => {
|
|
65
73
|
const isEmpty = isEmptyNode(child)
|
|
@@ -54,9 +54,11 @@ export default {
|
|
|
54
54
|
'aw-icon--animated': !!aniamtedIconContent
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
staticStyle: data.staticStyle,
|
|
58
|
+
style: {
|
|
59
|
+
...data.style,
|
|
60
|
+
...(color ? { fill: toColor(color) } : {})
|
|
61
|
+
},
|
|
60
62
|
attrs: {
|
|
61
63
|
'aria-hidden': true,
|
|
62
64
|
width: size || null,
|
|
@@ -63,8 +63,9 @@ export default {
|
|
|
63
63
|
isNil(attrs.width) &&
|
|
64
64
|
isNil(attrs.height)
|
|
65
65
|
}
|
|
66
|
-
],
|
|
67
|
-
|
|
66
|
+
].filter(Boolean),
|
|
67
|
+
staticStyle: data.staticStyle,
|
|
68
|
+
style: data.style
|
|
68
69
|
},
|
|
69
70
|
transform ? [h('g', { attrs: { transform } }, paths)] : paths
|
|
70
71
|
)
|
|
@@ -80,8 +80,8 @@ const INVALID_TYPES = [
|
|
|
80
80
|
type: ',date,datetime,time,month,week,',
|
|
81
81
|
replacer: '<AwDate />'
|
|
82
82
|
},
|
|
83
|
-
{ type: ',tel,', replacer: '<AwTel />' }
|
|
84
|
-
{ type: ',color,', replacer: '<AwColor />' }
|
|
83
|
+
{ type: ',tel,', replacer: '<AwTel />' }
|
|
84
|
+
// { type: ',color,', replacer: '<AwColor />' }
|
|
85
85
|
]
|
|
86
86
|
|
|
87
87
|
const getInvalidConfig = (type) => {
|