@awes-io/ui 2.142.3 → 2.144.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/assets/css/components/_index.css +7 -1
- package/assets/css/components/action-card.css +1 -0
- package/assets/css/components/action-icon.css +2 -2
- package/assets/css/components/alert.css +28 -22
- package/assets/css/components/animation.css +52 -32
- package/assets/css/components/badge.css +1 -0
- package/assets/css/components/banner-text.css +15 -4
- package/assets/css/components/card.css +0 -1
- package/assets/css/components/content-placeholder.css +104 -0
- package/assets/css/components/dropdown.css +20 -7
- package/assets/css/components/empty-container.css +69 -1
- package/assets/css/components/filter-chosen.css +6 -0
- package/assets/css/components/filter-date-range.css +17 -1
- package/assets/css/components/filter-month.css +23 -17
- package/assets/css/components/filter-select.css +11 -0
- package/assets/css/components/icon-menu-item.css +12 -7
- package/assets/css/components/layout.css +1 -32
- package/assets/css/components/mobile-menu-nav.css +8 -4
- package/assets/css/components/modal.css +1 -1
- package/assets/css/components/number.css +12 -0
- package/assets/css/components/page-aside.css +54 -0
- package/assets/css/components/text-field.css +4 -0
- package/assets/js/css.js +1 -1
- package/assets/js/icons/mono.js +59 -91
- package/assets/js/icons/multicolor.js +1 -31
- package/components/1_atoms/AwActionIcon.vue +11 -2
- package/components/1_atoms/AwContentPlaceholder.vue +60 -0
- package/components/1_atoms/AwFlow.vue +37 -49
- 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/AwLabel.vue +1 -1
- 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 +63 -42
- package/components/2_molecules/AwBadge.vue +1 -1
- package/components/2_molecules/AwBannerText.vue +8 -2
- package/components/2_molecules/AwButton.vue +1 -1
- package/components/2_molecules/AwDescriptionInput.vue +19 -1
- package/components/2_molecules/AwEmptyContainer.vue +74 -72
- package/components/2_molecules/AwNumber.vue +180 -0
- package/components/2_molecules/AwSelect.vue +11 -4
- package/components/3_organisms/AwBottomBar.vue +22 -4
- package/components/3_organisms/AwFilterChosen.vue +73 -0
- package/components/3_organisms/AwFilterDateRange.vue +177 -0
- package/components/3_organisms/AwFilterMonth.vue +37 -40
- package/components/3_organisms/AwFilterSelect.vue +368 -0
- package/components/3_organisms/AwMultiBlockBuilder.vue +1 -1
- package/components/3_organisms/AwSubnav.vue +11 -1
- package/components/3_organisms/AwTable/AwTableBuilder.vue +20 -60
- 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/4_pages/AwPageAside.vue +108 -0
- package/components/5_layouts/AwLayoutCenter.vue +3 -8
- package/components/5_layouts/_AwMenuItemIcon.vue +9 -2
- package/components/5_layouts/_AwMobileMenuItem.vue +5 -3
- package/components/5_layouts/_AwUserMenu.vue +1 -1
- package/components/_config.js +26 -1
- package/docs/_template.md +80 -0
- package/docs/components/atoms/aw-accordion-fold.md +129 -0
- package/docs/components/atoms/aw-action-card-body.md +99 -0
- package/docs/components/atoms/aw-action-card.md +130 -0
- package/docs/components/atoms/aw-action-icon.md +126 -0
- package/docs/components/atoms/aw-avatar.md +106 -0
- package/docs/components/atoms/aw-card.md +137 -0
- package/docs/components/atoms/aw-checkbox.md +288 -0
- package/docs/components/atoms/aw-content-placeholder.md +147 -0
- package/docs/components/atoms/aw-description.md +83 -0
- package/docs/components/atoms/aw-dock.md +90 -0
- package/docs/components/atoms/aw-dropdown-button.md +94 -0
- package/docs/components/atoms/aw-dropdown.md +178 -0
- package/docs/components/atoms/aw-file.md +73 -0
- package/docs/components/atoms/aw-flow.md +140 -0
- package/docs/components/atoms/aw-grid.md +109 -0
- package/docs/components/atoms/aw-headline.md +71 -0
- package/docs/components/atoms/aw-icon-system-color.md +122 -0
- package/docs/components/atoms/aw-icon-system-mono.md +206 -0
- package/docs/components/atoms/aw-icon.md +235 -0
- package/docs/components/atoms/aw-info.md +123 -0
- package/docs/components/atoms/aw-input.md +212 -0
- package/docs/components/atoms/aw-label.md +136 -0
- package/docs/components/atoms/aw-link.md +151 -0
- package/docs/components/atoms/aw-list.md +152 -0
- package/docs/components/atoms/aw-progress.md +119 -0
- package/docs/components/atoms/aw-radio.md +182 -0
- package/docs/components/atoms/aw-refresh-wrapper.md +81 -0
- package/docs/components/atoms/aw-select-native.md +234 -0
- package/docs/components/atoms/aw-slider.md +189 -0
- package/docs/components/atoms/aw-sub-headline.md +73 -0
- package/docs/components/atoms/aw-switcher.md +192 -0
- package/docs/components/atoms/aw-tag.md +144 -0
- package/docs/components/atoms/aw-title.md +70 -0
- package/docs/components/atoms/aw-toggler.md +90 -0
- package/docs/components/layouts/aw-layout-center.md +168 -0
- package/docs/components/layouts/aw-layout-error.md +153 -0
- package/docs/components/layouts/aw-layout-provider.md +238 -0
- package/docs/components/layouts/aw-layout.md +88 -0
- package/docs/components/molecules/aw-action-button.md +138 -0
- package/docs/components/molecules/aw-alert.md +191 -0
- package/docs/components/molecules/aw-badge.md +129 -0
- package/docs/components/molecules/aw-banner-text.md +156 -0
- package/docs/components/molecules/aw-button-nav.md +111 -0
- package/docs/components/molecules/aw-button.md +193 -0
- package/docs/components/molecules/aw-description-input.md +124 -0
- package/docs/components/molecules/aw-empty-container.md +235 -0
- package/docs/components/molecules/aw-island.md +506 -0
- package/docs/components/molecules/aw-number.md +138 -0
- package/docs/components/molecules/aw-select-object.md +401 -0
- package/docs/components/molecules/aw-select.md +215 -0
- package/docs/components/molecules/aw-tab-nav.md +108 -0
- package/docs/components/molecules/aw-tel.md +129 -0
- package/docs/components/molecules/aw-textarea.md +83 -0
- package/docs/components/molecules/aw-userpic.md +115 -0
- package/docs/components/organisms/aw-address-block.md +64 -0
- package/docs/components/organisms/aw-address.md +132 -0
- package/docs/components/organisms/aw-birthday-picker.md +73 -0
- package/docs/components/organisms/aw-bottom-bar.md +66 -0
- package/docs/components/organisms/aw-calendar-days.md +115 -0
- package/docs/components/organisms/aw-calendar-nav.md +98 -0
- package/docs/components/organisms/aw-calendar-view.md +98 -0
- package/docs/components/organisms/aw-calendar.md +166 -0
- package/docs/components/organisms/aw-chart.md +154 -0
- package/docs/components/organisms/aw-chip-select.md +164 -0
- package/docs/components/organisms/aw-chip.md +126 -0
- package/docs/components/organisms/aw-code-snippet.md +94 -0
- package/docs/components/organisms/aw-code.md +132 -0
- package/docs/components/organisms/aw-context-menu.md +117 -0
- package/docs/components/organisms/aw-cropper.md +151 -0
- package/docs/components/organisms/aw-date.md +161 -0
- package/docs/components/organisms/aw-display-date.md +33 -0
- package/docs/components/organisms/aw-download-link.md +46 -0
- package/docs/components/organisms/aw-fetch-data.md +161 -0
- package/docs/components/organisms/aw-filter-chosen.md +226 -0
- package/docs/components/organisms/aw-filter-date-range.md +205 -0
- package/docs/components/organisms/aw-filter-month.md +43 -0
- package/docs/components/organisms/aw-filter-select.md +239 -0
- package/docs/components/organisms/aw-form.md +174 -0
- package/docs/components/organisms/aw-gmap-marker.md +86 -0
- package/docs/components/organisms/aw-gmap.md +90 -0
- package/docs/components/organisms/aw-image-upload.md +56 -0
- package/docs/components/organisms/aw-island-avatar.md +87 -0
- package/docs/components/organisms/aw-markdown-editor.md +104 -0
- package/docs/components/organisms/aw-modal-buttons.md +57 -0
- package/docs/components/organisms/aw-modal.md +246 -0
- package/docs/components/organisms/aw-model-edit.md +74 -0
- package/docs/components/organisms/aw-money.md +53 -0
- package/docs/components/organisms/aw-multi-block-builder.md +165 -0
- package/docs/components/organisms/aw-pagination.md +121 -0
- package/docs/components/organisms/aw-password.md +103 -0
- package/docs/components/organisms/aw-preview-card.md +45 -0
- package/docs/components/organisms/aw-search.md +116 -0
- package/docs/components/organisms/aw-subnav.md +122 -0
- package/docs/components/organisms/aw-table-builder.md +165 -0
- package/docs/components/organisms/aw-table-col.md +123 -0
- package/docs/components/organisms/aw-table-head.md +92 -0
- package/docs/components/organisms/aw-table-row.md +91 -0
- package/docs/components/organisms/aw-table.md +172 -0
- package/docs/components/organisms/aw-tags.md +54 -0
- package/docs/components/organisms/aw-toggle-show-aside.md +43 -0
- package/docs/components/organisms/aw-uploader-files.md +125 -0
- package/docs/components/organisms/aw-uploader.md +163 -0
- package/docs/components/organisms/aw-user-menu.md +87 -0
- package/docs/components/pages/aw-page-aside.md +296 -0
- package/docs/components/pages/aw-page-menu-buttons.md +172 -0
- package/docs/components/pages/aw-page-modal.md +198 -0
- package/docs/components/pages/aw-page-single.md +300 -0
- package/docs/components/pages/aw-page.md +194 -0
- package/docs/configuration.md +493 -0
- package/docs/cookbook/advanced-patterns.md +1388 -0
- package/docs/cookbook/common-patterns.md +965 -0
- package/docs/cookbook/index.md +786 -0
- package/docs/getting-started.md +596 -0
- package/docs/guides/best-practices.md +1106 -0
- package/docs/guides/data-fetching.md +852 -0
- package/docs/guides/error-handling.md +1172 -0
- package/docs/guides/forms-guide.md +1329 -0
- package/docs/guides/mobile-subnavigation.md +359 -0
- package/docs/guides/page-patterns/aside-pages.md +1418 -0
- package/docs/guides/page-patterns/dashboard-pages.md +990 -0
- package/docs/guides/page-patterns/detail-pages.md +1556 -0
- package/docs/guides/page-patterns/list-pages.md +1242 -0
- package/docs/index.md +263 -1
- package/docs/integrations.md +870 -0
- package/docs/reference/colors.md +232 -0
- package/docs/reference/icons.md +163 -0
- package/docs/reference/menu.md +462 -0
- package/docs/reference/plugins.md +970 -0
- package/docs/reference/troubleshooting.md +964 -0
- package/nuxt/awes.config.js +9 -8
- package/nuxt/index.js +2 -2
- package/nuxt/pages/more.vue +1 -1
- package/package.json +5 -3
- package/readme.md +171 -1
- package/store/awesIo.js +11 -0
- package/CHANGELOG.md +0 -4520
- package/docs/aw-accordion-fold.md +0 -46
- package/docs/aw-address.md +0 -44
- package/docs/aw-avatar.md +0 -51
- package/docs/aw-badge.md +0 -32
- package/docs/aw-button-nav.md +0 -44
- package/docs/aw-button.md +0 -50
- package/docs/aw-calendar-days.md +0 -46
- package/docs/aw-calendar-nav.md +0 -25
- package/docs/aw-calendar-view.md +0 -12
- package/docs/aw-calendar.md +0 -59
- package/docs/aw-card.md +0 -48
- package/docs/aw-chart.md +0 -51
- package/docs/aw-checkbox.md +0 -56
- package/docs/aw-chip-select.md +0 -46
- package/docs/aw-chip.md +0 -53
- package/docs/aw-code-snippet.md +0 -18
- package/docs/aw-code.md +0 -56
- package/docs/aw-content-wrapper.md +0 -40
- package/docs/aw-context-menu.md +0 -31
- package/docs/aw-cropper.md +0 -60
- package/docs/aw-dashboard-card.md +0 -37
- package/docs/aw-dashboard-donut.md +0 -30
- package/docs/aw-dashboard-line.md +0 -20
- package/docs/aw-dashboard-progress.md +0 -33
- package/docs/aw-dashboard-section.md +0 -32
- package/docs/aw-dashboard-speed.md +0 -30
- package/docs/aw-date.md +0 -52
- package/docs/aw-dropdown-button.md +0 -31
- package/docs/aw-dropdown.md +0 -69
- package/docs/aw-fetch-data.md +0 -45
- package/docs/aw-form.md +0 -52
- package/docs/aw-grid.md +0 -48
- package/docs/aw-icon.md +0 -50
- package/docs/aw-info.md +0 -53
- package/docs/aw-input.md +0 -55
- package/docs/aw-layout-default.md +0 -30
- package/docs/aw-layout-frame-center.md +0 -29
- package/docs/aw-layout-simple.md +0 -49
- package/docs/aw-link.md +0 -54
- package/docs/aw-markdown-editor.md +0 -51
- package/docs/aw-modal.md +0 -63
- package/docs/aw-multi-block-builder.md +0 -66
- package/docs/aw-page.md +0 -36
- package/docs/aw-pagination.md +0 -54
- package/docs/aw-password.md +0 -48
- package/docs/aw-radio.md +0 -54
- package/docs/aw-search.md +0 -49
- package/docs/aw-select.md +0 -93
- package/docs/aw-slider.md +0 -40
- package/docs/aw-svg-image.md +0 -19
- package/docs/aw-switcher.md +0 -51
- package/docs/aw-tab-nav.md +0 -55
- package/docs/aw-table-builder.md +0 -58
- package/docs/aw-table-col.md +0 -33
- package/docs/aw-table-head.md +0 -28
- package/docs/aw-table-row.md +0 -33
- package/docs/aw-table.md +0 -59
- package/docs/aw-tel.md +0 -47
- package/docs/aw-textarea.md +0 -47
- package/docs/aw-toggler.md +0 -41
- package/docs/aw-uploader-files.md +0 -20
- package/docs/aw-uploader.md +0 -60
- package/docs/aw-user-menu.md +0 -34
- package/docs/aw-userpic.md +0 -34
- /package/components/{3_organisms → 2_molecules}/AwTel.vue +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
class="aw-content-placeholder"
|
|
4
|
+
:class="{
|
|
5
|
+
'aw-content-placeholder--text': type === 'text',
|
|
6
|
+
'aw-content-placeholder--form': type === 'form',
|
|
7
|
+
'aw-content-placeholder--image': type === 'image',
|
|
8
|
+
'aw-content-placeholder--avatar': type === 'avatar',
|
|
9
|
+
'aw-content-placeholder--button': type === 'button'
|
|
10
|
+
}"
|
|
11
|
+
:style="{ '--ph-columns': _columns }"
|
|
12
|
+
>
|
|
13
|
+
<span v-for="i in _items" :key="i" aria-hidden="true"></span>
|
|
14
|
+
</span>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { clamp } from 'rambdax'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'AwContentPlaceholder',
|
|
22
|
+
|
|
23
|
+
props: {
|
|
24
|
+
type: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: 'form' // text, form, image, avatar, button
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
lines: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default() {
|
|
32
|
+
return this.type === 'text' ? 8 : 1
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
columns: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 1 // 1, 2, 3
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
computed: {
|
|
43
|
+
_columns() {
|
|
44
|
+
return clamp(1, 3, this.columns)
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
_lines() {
|
|
48
|
+
return this.type === 'image' || this.type === 'avatar'
|
|
49
|
+
? 1
|
|
50
|
+
: this.type === 'button'
|
|
51
|
+
? clamp(1, 2, this.lines)
|
|
52
|
+
: clamp(1, 20, this.lines)
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
_items() {
|
|
56
|
+
return this._lines * this._columns
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
@@ -1,6 +1,32 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<Component
|
|
3
|
+
:is="tag"
|
|
4
|
+
:class="{
|
|
5
|
+
flex: !inline,
|
|
6
|
+
'inline-flex': inline,
|
|
7
|
+
'flex-wrap': wrap,
|
|
8
|
+
'flex-col': vertical,
|
|
9
|
+
'justify-center': justify === 'center',
|
|
10
|
+
'justify-between': justify === 'between',
|
|
11
|
+
'justify-end': justify === 'end',
|
|
12
|
+
'justify-start': justify === '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
|
|
23
|
+
}"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</Component>
|
|
27
|
+
</template>
|
|
3
28
|
|
|
29
|
+
<script>
|
|
4
30
|
export default {
|
|
5
31
|
name: 'AwFlow',
|
|
6
32
|
|
|
@@ -15,64 +41,26 @@ export default {
|
|
|
15
41
|
default: 4
|
|
16
42
|
},
|
|
17
43
|
|
|
18
|
-
wrapChildren: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: true
|
|
21
|
-
},
|
|
22
|
-
|
|
23
44
|
justify: {
|
|
24
45
|
type: String,
|
|
25
46
|
default: ''
|
|
26
47
|
},
|
|
27
48
|
|
|
28
49
|
align: {
|
|
29
|
-
type: String
|
|
30
|
-
default: ''
|
|
50
|
+
type: String
|
|
31
51
|
},
|
|
32
52
|
|
|
33
|
-
vertical: Boolean
|
|
34
|
-
},
|
|
53
|
+
vertical: Boolean,
|
|
35
54
|
|
|
36
|
-
|
|
37
|
-
const { tag, gap, wrapChildren, vertical, align, justify } = this.$props
|
|
38
|
-
const children = this.$scopedSlots.default
|
|
39
|
-
? this.$scopedSlots.default()
|
|
40
|
-
: []
|
|
55
|
+
wrap: Boolean,
|
|
41
56
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
staticClass: 'aw-flow',
|
|
46
|
-
style: {
|
|
47
|
-
'--flow-gap-scale': gap
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
[
|
|
51
|
-
h(
|
|
52
|
-
tag,
|
|
53
|
-
{
|
|
54
|
-
staticClass: 'aw-flow__wrap',
|
|
55
|
-
class: {
|
|
56
|
-
'aw-flow__wrap--children': !wrapChildren,
|
|
57
|
-
'aw-flow__wrap--vertical': vertical,
|
|
58
|
-
'justify-center': justify === 'center',
|
|
59
|
-
'justify-end': justify === 'end',
|
|
60
|
-
'items-start': align === 'start',
|
|
61
|
-
'items-center': align === 'center',
|
|
62
|
-
'items-end': align === 'end'
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
children.reduce((acc, vNode) => {
|
|
66
|
-
const notEmpty = notEmptyNode(vNode)
|
|
67
|
-
const child = wrapChildren
|
|
68
|
-
? h(tag, { staticClass: 'aw-flow__child' }, [vNode])
|
|
69
|
-
: vNode
|
|
57
|
+
inline: Boolean
|
|
58
|
+
},
|
|
70
59
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
)
|
|
60
|
+
computed: {
|
|
61
|
+
_align() {
|
|
62
|
+
return this.align || (!this.vertical && 'center')
|
|
63
|
+
}
|
|
76
64
|
}
|
|
77
65
|
}
|
|
78
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) => {
|
|
@@ -8,7 +8,16 @@
|
|
|
8
8
|
<span
|
|
9
9
|
ref="scroller"
|
|
10
10
|
class="aw-slider__scroller"
|
|
11
|
-
:class="{
|
|
11
|
+
:class="{
|
|
12
|
+
'aw-slider__scroller--mouse-move': movedByMouse,
|
|
13
|
+
'gap-1': gap === 1,
|
|
14
|
+
'gap-2': gap === 2,
|
|
15
|
+
'gap-3': gap === 3,
|
|
16
|
+
'gap-4': gap === 4,
|
|
17
|
+
'gap-5': gap === 5,
|
|
18
|
+
'gap-6': gap === 6,
|
|
19
|
+
'gap-8': gap === 8
|
|
20
|
+
}"
|
|
12
21
|
@scroll="_setScroll"
|
|
13
22
|
>
|
|
14
23
|
<slot />
|
|
@@ -39,6 +48,11 @@ export default {
|
|
|
39
48
|
tag: {
|
|
40
49
|
type: String,
|
|
41
50
|
default: 'div'
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
gap: {
|
|
54
|
+
type: Number,
|
|
55
|
+
default: 0
|
|
42
56
|
}
|
|
43
57
|
},
|
|
44
58
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Component :is="tag" :style="tagStyle" class="aw-tag">
|
|
3
|
-
<AwIcon v-if="icon" :name="icon" size="16" />
|
|
3
|
+
<AwIcon v-if="icon" :name="icon" size="16" :class="iconClass" />
|
|
4
4
|
{{ text }}
|
|
5
5
|
</Component>
|
|
6
6
|
</template>
|
|
@@ -35,6 +35,11 @@ export default {
|
|
|
35
35
|
icon: {
|
|
36
36
|
type: String,
|
|
37
37
|
default: null
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
iconClass: {
|
|
41
|
+
type: [String, Array, Object],
|
|
42
|
+
default: null
|
|
38
43
|
}
|
|
39
44
|
},
|
|
40
45
|
|
|
@@ -1,57 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<span v-if="
|
|
26
|
-
|
|
2
|
+
<div class="aw-alert" :style="styleVariables">
|
|
3
|
+
<div>
|
|
4
|
+
<AwDescription tag="div" class="aw-alert__title">
|
|
5
|
+
<span v-if="icon || $scopedSlots.icon" class="aw-alert__icon">
|
|
6
|
+
<slot name="icon">
|
|
7
|
+
<AwIcon
|
|
8
|
+
v-if="icon"
|
|
9
|
+
:name="icon"
|
|
10
|
+
:color="iconColor"
|
|
11
|
+
size="16"
|
|
12
|
+
/>
|
|
13
|
+
</slot>
|
|
14
|
+
</span>
|
|
15
|
+
|
|
16
|
+
<span class="aw-alert__title-text">
|
|
17
|
+
<slot name="title">{{ title }}</slot>
|
|
18
|
+
|
|
19
|
+
<slot name="description">
|
|
20
|
+
<span v-if="description" class="font-normal block mt-1">
|
|
21
|
+
{{ description }}
|
|
22
|
+
</span>
|
|
23
|
+
</slot>
|
|
24
|
+
|
|
25
|
+
<span v-if="$scopedSlots.default" class="aw-alert__buttons">
|
|
26
|
+
<slot />
|
|
27
27
|
</span>
|
|
28
|
-
</
|
|
29
|
-
</
|
|
30
|
-
</
|
|
28
|
+
</span>
|
|
29
|
+
</AwDescription>
|
|
30
|
+
</div>
|
|
31
31
|
|
|
32
|
-
<div v-if="$scopedSlots.
|
|
33
|
-
<slot />
|
|
32
|
+
<div v-if="$scopedSlots.close" class="aw-alert__close">
|
|
33
|
+
<slot name="close" />
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
|
-
import { toOnColor } from '@AwUtils/styles'
|
|
39
|
+
import { toColor, toOnColor } from '@AwUtils/styles'
|
|
40
|
+
import { pathOr } from 'rambdax'
|
|
41
|
+
import { AwAlert as _config } from '@AwConfig'
|
|
42
|
+
import { conf } from '@AwUtils/component'
|
|
40
43
|
|
|
41
44
|
export default {
|
|
42
45
|
name: 'AwAlert',
|
|
43
46
|
|
|
47
|
+
_config,
|
|
48
|
+
|
|
44
49
|
props: {
|
|
45
50
|
icon: {
|
|
46
51
|
type: String,
|
|
47
52
|
default: ''
|
|
48
53
|
},
|
|
49
54
|
|
|
50
|
-
|
|
55
|
+
config: {
|
|
51
56
|
type: String,
|
|
52
57
|
default: 'default'
|
|
53
58
|
},
|
|
54
59
|
|
|
60
|
+
color: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ''
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
onColor: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ''
|
|
68
|
+
},
|
|
69
|
+
|
|
55
70
|
iconColor: {
|
|
56
71
|
type: String,
|
|
57
72
|
default: ''
|
|
@@ -69,19 +84,25 @@ export default {
|
|
|
69
84
|
},
|
|
70
85
|
|
|
71
86
|
computed: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
87
|
+
styleVariables() {
|
|
88
|
+
const CONFIG = conf(this, 'configColors')
|
|
75
89
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
90
|
+
let color = pathOr('', `${this.config}.color`, CONFIG)
|
|
91
|
+
let onColor = pathOr('', `${this.config}.onColor`, CONFIG)
|
|
92
|
+
|
|
93
|
+
if (this.color) {
|
|
94
|
+
color = this.color
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (this.onColor) {
|
|
98
|
+
onColor = this.onColor
|
|
99
|
+
}
|
|
79
100
|
|
|
80
|
-
styleVariables() {
|
|
81
101
|
return {
|
|
82
|
-
'--aw-alert-color':
|
|
83
|
-
|
|
84
|
-
|
|
102
|
+
'--aw-alert-color': toColor(color),
|
|
103
|
+
'--aw-alert-on-color': onColor
|
|
104
|
+
? toOnColor(onColor)
|
|
105
|
+
: toOnColor(color)
|
|
85
106
|
}
|
|
86
107
|
}
|
|
87
108
|
}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
<div class="aw-banner-text">
|
|
3
3
|
<div
|
|
4
4
|
class="aw-banner-text__icon"
|
|
5
|
-
:class="{
|
|
5
|
+
:class="{
|
|
6
|
+
'aw-banner-text__icon--rounded': rounded,
|
|
7
|
+
'aw-banner-text__icon--square': !rounded
|
|
8
|
+
}"
|
|
6
9
|
:style="{ backgroundImage: src ? `url(${src})` : null }"
|
|
7
10
|
>
|
|
8
11
|
<slot name="icon">
|
|
@@ -19,6 +22,7 @@
|
|
|
19
22
|
<AwSubHeadline class="aw-banner-text__title">
|
|
20
23
|
<slot name="title">{{ title }}</slot>
|
|
21
24
|
<AwIconSystemMono
|
|
25
|
+
v-if="titleArrow"
|
|
22
26
|
name="angle"
|
|
23
27
|
rotate="180"
|
|
24
28
|
class="aw-banner-text__title-arrow"
|
|
@@ -61,7 +65,9 @@ export default {
|
|
|
61
65
|
default: ''
|
|
62
66
|
},
|
|
63
67
|
|
|
64
|
-
rounded:
|
|
68
|
+
rounded: Boolean,
|
|
69
|
+
|
|
70
|
+
titleArrow: {
|
|
65
71
|
type: Boolean,
|
|
66
72
|
default: true
|
|
67
73
|
}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<slot />
|
|
4
|
-
<AwDescription
|
|
4
|
+
<AwDescription
|
|
5
|
+
v-if="text && !$scopedSlots.text"
|
|
6
|
+
key="default"
|
|
7
|
+
class="mt-2 inline-block"
|
|
8
|
+
v-html="sanitize(text)"
|
|
9
|
+
/>
|
|
10
|
+
<AwDescription
|
|
11
|
+
v-else-if="$scopedSlots.text"
|
|
12
|
+
key="textslot"
|
|
13
|
+
class="mt-2 inline-block"
|
|
14
|
+
>
|
|
15
|
+
<slot name="text"></slot>
|
|
16
|
+
</AwDescription>
|
|
5
17
|
</div>
|
|
6
18
|
</template>
|
|
7
19
|
|
|
8
20
|
<script>
|
|
21
|
+
import { sanitize } from '@AwUtils/string'
|
|
22
|
+
|
|
9
23
|
export default {
|
|
10
24
|
name: 'AwDescriptionInput',
|
|
11
25
|
|
|
@@ -14,6 +28,10 @@ export default {
|
|
|
14
28
|
type: String,
|
|
15
29
|
default: ''
|
|
16
30
|
}
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
methods: {
|
|
34
|
+
sanitize
|
|
17
35
|
}
|
|
18
36
|
}
|
|
19
37
|
</script>
|