@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,296 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: PageAside component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwPageAside /> component is used to render page with aside sidebar - UI Vue component for AwesCode UI.
|
|
6
|
+
title: PageAside
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwPageAside
|
|
10
|
+
|
|
11
|
+
**Category:** Page | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwPageAside` component is a specialized page layout wrapper that adds a persistent sidebar (aside) section to the standard `AwPage` component. It provides responsive behavior with the aside appearing as a separate column on desktop and as a card on mobile.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwPageAside` provides a page layout with aside sidebar:
|
|
18
|
+
- Responsive aside positioning (sidebar on desktop, card on mobile)
|
|
19
|
+
- Sticky aside buttons at the bottom
|
|
20
|
+
- Pass-through support for all `AwPage` props and slots
|
|
21
|
+
- Desktop/mobile breakpoint customization
|
|
22
|
+
- Optional aside line separator
|
|
23
|
+
- Mobile aside can be hidden
|
|
24
|
+
- Bottom bar spacing awareness
|
|
25
|
+
- `isDesktop` prop in all slots for responsive content
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Basic Example
|
|
30
|
+
|
|
31
|
+
```markup
|
|
32
|
+
<AwPageAside title="Page with Aside">
|
|
33
|
+
<template #default>
|
|
34
|
+
<p>Main content goes here</p>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<template #aside>
|
|
38
|
+
<AwCard title="Sidebar">
|
|
39
|
+
<p>Sidebar content</p>
|
|
40
|
+
</AwCard>
|
|
41
|
+
</template>
|
|
42
|
+
</AwPageAside>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### With Aside Buttons
|
|
46
|
+
|
|
47
|
+
```markup
|
|
48
|
+
<AwPageAside title="Edit Form">
|
|
49
|
+
<template #default>
|
|
50
|
+
<AwForm url="/api/submit">
|
|
51
|
+
<!-- form fields -->
|
|
52
|
+
</AwForm>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<template #aside>
|
|
56
|
+
<AwCard title="Info">
|
|
57
|
+
<p>Additional information</p>
|
|
58
|
+
</AwCard>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template #aside-buttons>
|
|
62
|
+
<AwButton cta>Save</AwButton>
|
|
63
|
+
<AwButton theme="outline">Cancel</AwButton>
|
|
64
|
+
</template>
|
|
65
|
+
</AwPageAside>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Custom Desktop Breakpoint
|
|
69
|
+
|
|
70
|
+
```markup
|
|
71
|
+
<AwPageAside
|
|
72
|
+
title="Responsive Page"
|
|
73
|
+
desktop-from="xl"
|
|
74
|
+
>
|
|
75
|
+
<template #default>
|
|
76
|
+
<p>Main content</p>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<template #aside>
|
|
80
|
+
<p>Sidebar switches to desktop mode at xl breakpoint</p>
|
|
81
|
+
</template>
|
|
82
|
+
</AwPageAside>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### With Line Separator
|
|
86
|
+
|
|
87
|
+
```markup
|
|
88
|
+
<AwPageAside
|
|
89
|
+
title="Page Title"
|
|
90
|
+
modifiers="line"
|
|
91
|
+
>
|
|
92
|
+
<template #default>
|
|
93
|
+
<p>Main content</p>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<template #aside>
|
|
97
|
+
<p>Aside with vertical line separator</p>
|
|
98
|
+
</template>
|
|
99
|
+
</AwPageAside>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Hide Mobile Aside
|
|
103
|
+
|
|
104
|
+
```markup
|
|
105
|
+
<AwPageAside
|
|
106
|
+
title="Page Title"
|
|
107
|
+
hide-mobile-aside
|
|
108
|
+
>
|
|
109
|
+
<template #default>
|
|
110
|
+
<p>Main content</p>
|
|
111
|
+
</template>
|
|
112
|
+
|
|
113
|
+
<template #aside>
|
|
114
|
+
<p>This aside only appears on desktop</p>
|
|
115
|
+
</template>
|
|
116
|
+
</AwPageAside>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Custom Mobile Aside
|
|
120
|
+
|
|
121
|
+
```markup
|
|
122
|
+
<AwPageAside title="Custom Mobile">
|
|
123
|
+
<template #default>
|
|
124
|
+
<p>Main content</p>
|
|
125
|
+
</template>
|
|
126
|
+
|
|
127
|
+
<template #aside="{ isDesktop }">
|
|
128
|
+
<div v-if="isDesktop">
|
|
129
|
+
<!-- Desktop aside layout -->
|
|
130
|
+
<AwCard title="Desktop Sidebar">...</AwCard>
|
|
131
|
+
</div>
|
|
132
|
+
<div v-else>
|
|
133
|
+
<!-- Mobile aside layout -->
|
|
134
|
+
<AwAccordionFold title="More Info">...</AwAccordionFold>
|
|
135
|
+
</div>
|
|
136
|
+
</template>
|
|
137
|
+
|
|
138
|
+
<template #mobile-aside="{ isDesktop }">
|
|
139
|
+
<AwCard v-if="!isDesktop" class="custom-mobile-card">
|
|
140
|
+
<slot name="aside" />
|
|
141
|
+
</AwCard>
|
|
142
|
+
</template>
|
|
143
|
+
</AwPageAside>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Pass-Through AwPage Props
|
|
147
|
+
|
|
148
|
+
```markup
|
|
149
|
+
<AwPageAside
|
|
150
|
+
title="Page Title"
|
|
151
|
+
:breadcrumb="{ href: '/back', title: 'Back' }"
|
|
152
|
+
:subnav="tabs"
|
|
153
|
+
container="small"
|
|
154
|
+
>
|
|
155
|
+
<template #buttons>
|
|
156
|
+
<AwButton>Action</AwButton>
|
|
157
|
+
</template>
|
|
158
|
+
|
|
159
|
+
<template #default>
|
|
160
|
+
<p>Main content</p>
|
|
161
|
+
</template>
|
|
162
|
+
|
|
163
|
+
<template #aside>
|
|
164
|
+
<p>Sidebar</p>
|
|
165
|
+
</template>
|
|
166
|
+
</AwPageAside>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## API
|
|
170
|
+
|
|
171
|
+
### Props
|
|
172
|
+
|
|
173
|
+
| Name | Description | Type | Required | Default |
|
|
174
|
+
|------|-------------|------|----------|---------|
|
|
175
|
+
| desktopFrom | Screen breakpoint for desktop layout | `String` | `false` | `'lg'` |
|
|
176
|
+
| modifiers | CSS modifier classes (e.g., `'line'` for separator) | `String` / `Object` | `false` | `''` |
|
|
177
|
+
| hideMobileAside | Hide aside section on mobile | `Boolean` | `false` | `false` |
|
|
178
|
+
|
|
179
|
+
**Breakpoint Options:** `'sm'`, `'md'`, `'lg'`, `'xl'`, `'2xl'`
|
|
180
|
+
|
|
181
|
+
**All `AwPage` props** are also supported and passed through via `v-bind="$attrs"`:
|
|
182
|
+
- `title` - Page title
|
|
183
|
+
- `breadcrumb` - Breadcrumb navigation
|
|
184
|
+
- `subnav` - Subnavigation tabs
|
|
185
|
+
- `container` - Container size
|
|
186
|
+
- `fullscreen` - Fullscreen mode
|
|
187
|
+
- etc.
|
|
188
|
+
|
|
189
|
+
See [AwPage documentation](./aw-page.md#props) for complete list.
|
|
190
|
+
|
|
191
|
+
### Slots
|
|
192
|
+
|
|
193
|
+
| Name | Description | Props | Default Slot Content |
|
|
194
|
+
|------|-------------|-------|---------------------|
|
|
195
|
+
| default | Main page content | `{ isDesktop }` | - |
|
|
196
|
+
| aside | Aside sidebar content | `{ isDesktop }` | - |
|
|
197
|
+
| aside-buttons | Buttons at bottom of aside (sticky) | - | - |
|
|
198
|
+
| mobile-aside | Custom mobile aside wrapper | `{ isDesktop }` | AwCard wrapper |
|
|
199
|
+
| bottom | Content below main content | - | - |
|
|
200
|
+
|
|
201
|
+
**Pass-through slots from AwPage:**
|
|
202
|
+
- `heading` - Custom page header
|
|
203
|
+
- `title` - Custom title content
|
|
204
|
+
- `buttons` - Header buttons
|
|
205
|
+
- `subnav` - Custom subnavigation
|
|
206
|
+
- `headline-breadcrumb` - Custom breadcrumb
|
|
207
|
+
- `after-breadcrumb` - Content after breadcrumb
|
|
208
|
+
- `mobile-title` - Mobile title display
|
|
209
|
+
- `bottom-bar` - Custom bottom bar
|
|
210
|
+
|
|
211
|
+
All slots receive `isDesktop` prop for responsive rendering.
|
|
212
|
+
|
|
213
|
+
### Events
|
|
214
|
+
|
|
215
|
+
All events from `AwPage` are passed through (e.g., `update:fullscreen`).
|
|
216
|
+
|
|
217
|
+
### Data Properties
|
|
218
|
+
|
|
219
|
+
| Name | Description | Type |
|
|
220
|
+
|------|-------------|------|
|
|
221
|
+
| hideBottomBar | Whether bottom bar is hidden (computed from AwPage) | `Boolean` |
|
|
222
|
+
|
|
223
|
+
### Computed Properties
|
|
224
|
+
|
|
225
|
+
| Name | Description |
|
|
226
|
+
|------|-------------|
|
|
227
|
+
| isDesktop | Whether current screen size is desktop (based on `desktopFrom` prop) |
|
|
228
|
+
| _slots | Filtered slots object excluding self-managed slots |
|
|
229
|
+
|
|
230
|
+
### Methods
|
|
231
|
+
|
|
232
|
+
| Name | Parameters | Description |
|
|
233
|
+
|------|------------|-------------|
|
|
234
|
+
| _wathcBottomBar | - | Updates hideBottomBar state from AwPage reference |
|
|
235
|
+
|
|
236
|
+
### Head
|
|
237
|
+
|
|
238
|
+
Component adds `aw-page-aside-page-body` class to `<body>` element for styling.
|
|
239
|
+
|
|
240
|
+
## Related Components
|
|
241
|
+
|
|
242
|
+
- [AwPage](./aw-page.md) - Base page component used internally
|
|
243
|
+
- [AwPageSingle](./aw-page-single.md) - Single column page layout
|
|
244
|
+
- [AwCard](../atoms/aw-card.md) - Card component used for mobile aside wrapper
|
|
245
|
+
- [AwButton](../molecules/aw-button.md) - Button component for aside actions
|
|
246
|
+
|
|
247
|
+
## Notes
|
|
248
|
+
|
|
249
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as a page component
|
|
250
|
+
- Component wraps `AwPage` and passes through all props via `$attrs`
|
|
251
|
+
- Desktop/mobile layout switches based on `$screen[desktopFrom]` breakpoint
|
|
252
|
+
- On desktop, aside appears as a fixed-width sidebar on the right
|
|
253
|
+
- On mobile, aside appears as a card below main content (unless `hideMobileAside` is true)
|
|
254
|
+
- Aside buttons are sticky at the bottom on both desktop and mobile
|
|
255
|
+
- Bottom spacing adjusts automatically when bottom bar is present (`4rem` padding)
|
|
256
|
+
- Uses CSS custom property `--page-aside-buttons-bottom` for spacing control
|
|
257
|
+
- Component filters out `default`, `aside`, and `aside-buttons` slots before passing to AwPage
|
|
258
|
+
- The `modifiers` prop with value `'line'` adds `.aw-page-aside__aside--line` class
|
|
259
|
+
- Uses `$refs.page` to access internal AwPage component state
|
|
260
|
+
- Bottom bar visibility is watched in `created` and `updated` lifecycle hooks
|
|
261
|
+
- All pass-through slots maintain their scoped slot data plus `isDesktop` prop
|
|
262
|
+
- Component uses `inheritAttrs: false` to control attribute inheritance
|
|
263
|
+
- Body class is set via Nuxt's `head()` method for global styling
|
|
264
|
+
|
|
265
|
+
## Layout Structure
|
|
266
|
+
|
|
267
|
+
**Desktop Layout:**
|
|
268
|
+
```
|
|
269
|
+
┌─────────────────────────────────────────────┐
|
|
270
|
+
│ AwPage Wrapper (Main Content) │
|
|
271
|
+
│ ┌─────────────────────────────────────────┐ │ ┌─────────────┐
|
|
272
|
+
│ │ Page Header │ │ │ Aside │
|
|
273
|
+
│ ├─────────────────────────────────────────┤ │ │ Content │
|
|
274
|
+
│ │ Main Content │ │ │ │
|
|
275
|
+
│ │ │ │ │ │
|
|
276
|
+
│ │ │ │ │ │
|
|
277
|
+
│ └─────────────────────────────────────────┘ │ ├─────────────┤
|
|
278
|
+
│ │ │ Buttons │
|
|
279
|
+
└─────────────────────────────────────────────┘ └─────────────┘
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Mobile Layout:**
|
|
283
|
+
```
|
|
284
|
+
┌─────────────────────────────────────────────┐
|
|
285
|
+
│ Page Header │
|
|
286
|
+
├─────────────────────────────────────────────┤
|
|
287
|
+
│ Main Content │
|
|
288
|
+
│ │
|
|
289
|
+
│ │
|
|
290
|
+
├─────────────────────────────────────────────┤
|
|
291
|
+
│ Mobile Aside (Card) │
|
|
292
|
+
│ │
|
|
293
|
+
├─────────────────────────────────────────────┤
|
|
294
|
+
│ Aside Buttons (Sticky) │
|
|
295
|
+
└─────────────────────────────────────────────┘
|
|
296
|
+
```
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: PageMenuButtons component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwPageMenuButtons /> component renders page action buttons with responsive behavior - UI Vue component for AwesCode UI.
|
|
6
|
+
title: PageMenuButtons
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwPageMenuButtons
|
|
10
|
+
|
|
11
|
+
**Category:** Page | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwPageMenuButtons` component displays page action buttons with responsive behavior. On desktop, buttons are shown expanded; on mobile, CTA buttons become fixed floating buttons and others go into a context menu dropdown.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwPageMenuButtons` provides responsive page actions with:
|
|
18
|
+
- Desktop: Full buttons displayed expanded
|
|
19
|
+
- Mobile: CTA buttons as fixed floating buttons, others in dropdown
|
|
20
|
+
- Context menu for non-CTA buttons
|
|
21
|
+
- Download button handling with loading states
|
|
22
|
+
- Teleport/portal support for fixed buttons
|
|
23
|
+
- Scroll-based expand/collapse animation
|
|
24
|
+
- Conditional visibility support
|
|
25
|
+
- Tooltip support
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Basic Example
|
|
30
|
+
|
|
31
|
+
```markup
|
|
32
|
+
<AwPageMenuButtons
|
|
33
|
+
:items="[
|
|
34
|
+
{ text: 'Save', cta: true, href: '/save' },
|
|
35
|
+
{ text: 'Edit', href: '/edit', icon: 'edit' },
|
|
36
|
+
{ text: 'Delete', href: '/delete', icon: 'trash' }
|
|
37
|
+
]"
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Download Button
|
|
42
|
+
|
|
43
|
+
```markup
|
|
44
|
+
<AwPageMenuButtons
|
|
45
|
+
:items="[
|
|
46
|
+
{ text: 'Download PDF', download: 'pdf', href: '/api/download', icon: 'download', cta: true }
|
|
47
|
+
]"
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### With Conditional Visibility
|
|
52
|
+
|
|
53
|
+
```markup
|
|
54
|
+
<AwPageMenuButtons
|
|
55
|
+
:items="[
|
|
56
|
+
{ text: 'Edit', cta: true, href: '/edit', show: (vm) => vm.$can('edit', 'post') },
|
|
57
|
+
{ text: 'Delete', href: '/delete', show: false }
|
|
58
|
+
]"
|
|
59
|
+
/>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Custom Breakpoint
|
|
63
|
+
|
|
64
|
+
```markup
|
|
65
|
+
<AwPageMenuButtons
|
|
66
|
+
:items="buttons"
|
|
67
|
+
breakpoint="xl"
|
|
68
|
+
teleport-fixed-to=".custom-container"
|
|
69
|
+
/>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## API
|
|
73
|
+
|
|
74
|
+
### Props
|
|
75
|
+
|
|
76
|
+
| Name | Description | Type | Required | Default |
|
|
77
|
+
|------|-------------|------|----------|---------|
|
|
78
|
+
| items | Array of button configurations | `Array` | `false` | `[]` |
|
|
79
|
+
| breakpoint | Screen breakpoint for expanded/collapsed state | `String` | `false` | `'lg'` |
|
|
80
|
+
| teleportFixedTo | Target selector for fixed buttons teleport | `String` | `false` | `'body'` |
|
|
81
|
+
| expandOffset | Max scroll distance for expanded fixed buttons (px) | `Number` | `false` | `150` |
|
|
82
|
+
| showContextMenuTextFrom | Breakpoint to show context menu text | `String` | `false` | `'lg'` |
|
|
83
|
+
| iconVertical | Vertical icon orientation in context menu | `Boolean` | `false` | `false` |
|
|
84
|
+
|
|
85
|
+
### Button Item Structure
|
|
86
|
+
|
|
87
|
+
Each item in the `items` array can have these properties:
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
{
|
|
91
|
+
text: String, // Button text
|
|
92
|
+
icon: String, // Icon name
|
|
93
|
+
href: String, // Link URL
|
|
94
|
+
cta: Boolean, // Call-to-action (primary button, shows as fixed on mobile)
|
|
95
|
+
download: String, // File type for download ('pdf', 'csv', etc.)
|
|
96
|
+
tooltip: String, // Tooltip text
|
|
97
|
+
show: Boolean|Function, // Visibility (can be function receiving component instance)
|
|
98
|
+
listeners: Object, // Custom event listeners
|
|
99
|
+
// ... any other AwButton props
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Slots
|
|
104
|
+
|
|
105
|
+
This component does not have slots.
|
|
106
|
+
|
|
107
|
+
### Events
|
|
108
|
+
|
|
109
|
+
This component does not emit custom events.
|
|
110
|
+
|
|
111
|
+
### Injected Context
|
|
112
|
+
|
|
113
|
+
The component injects optional `teleportButtonsTo` from parent for teleport target.
|
|
114
|
+
|
|
115
|
+
## Responsive Behavior
|
|
116
|
+
|
|
117
|
+
### Desktop (breakpoint+)
|
|
118
|
+
|
|
119
|
+
- All buttons displayed as full `AwButton` components
|
|
120
|
+
- CTA buttons and regular buttons shown in expanded state
|
|
121
|
+
- Context menu shows non-CTA buttons in dropdown
|
|
122
|
+
|
|
123
|
+
### Mobile (< breakpoint)
|
|
124
|
+
|
|
125
|
+
- CTA buttons teleported as fixed floating buttons at bottom
|
|
126
|
+
- Non-CTA buttons only in context menu dropdown
|
|
127
|
+
- Fixed buttons collapse based on scroll position
|
|
128
|
+
|
|
129
|
+
## Download Handling
|
|
130
|
+
|
|
131
|
+
Buttons with `download` property automatically:
|
|
132
|
+
- Prevent default click behavior
|
|
133
|
+
- Show loading state during download
|
|
134
|
+
- Use `downloadFile` utility for file downloads
|
|
135
|
+
- Require `$axios` instance
|
|
136
|
+
|
|
137
|
+
Example:
|
|
138
|
+
```markup
|
|
139
|
+
{
|
|
140
|
+
text: 'Export',
|
|
141
|
+
download: 'xlsx',
|
|
142
|
+
href: '/api/export',
|
|
143
|
+
cta: true
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Scroll Behavior
|
|
148
|
+
|
|
149
|
+
Fixed buttons expand/collapse based on scroll position:
|
|
150
|
+
- `expandOffset > 0`: Buttons expand when scroll < offset
|
|
151
|
+
- `expandOffset === -1`: Buttons never expand (always collapsed)
|
|
152
|
+
- `expandOffset === 150` (default): Expand in top 150px
|
|
153
|
+
|
|
154
|
+
Button text visibility is controlled by scroll position on mobile.
|
|
155
|
+
|
|
156
|
+
## Related Components
|
|
157
|
+
|
|
158
|
+
- `AwPage` - Main page component
|
|
159
|
+
- `AwPageSingle` - Often used with page menu buttons
|
|
160
|
+
- `AwButton` - Button component used for rendering
|
|
161
|
+
- `AwContextMenu` - Dropdown menu for non-CTA buttons
|
|
162
|
+
|
|
163
|
+
## Notes
|
|
164
|
+
|
|
165
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as page component
|
|
166
|
+
- Uses Teleport (vue2-teleport) for fixed buttons
|
|
167
|
+
- Fixed buttons set CSS variable `--page-fixed-buttons-height` on body
|
|
168
|
+
- CTA buttons transformed to icon buttons on mobile (size lg, theme solid)
|
|
169
|
+
- Context menu positioned at bottom-end with 8px offset
|
|
170
|
+
- Visibility functions receive component instance for conditional logic
|
|
171
|
+
- Download functionality requires axios integration
|
|
172
|
+
- Tooltip directive support for all buttons
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: PageModal component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwPageModal /> component renders a modal page overlay with multiple themes - UI Vue component for AwesCode UI.
|
|
6
|
+
title: PageModal
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwPageModal
|
|
10
|
+
|
|
11
|
+
**Category:** Page | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwPageModal` component provides a modal/dialog page overlay with multiple display themes: default (centered modal), fullscreen, and aside (side panel). It includes header, content area, and optional button footer.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwPageModal` provides modal page display with:
|
|
18
|
+
- Three themes: default, fullscreen, aside
|
|
19
|
+
- Header with title, breadcrumb, and close button
|
|
20
|
+
- Scrollable content area
|
|
21
|
+
- Optional button footer
|
|
22
|
+
- Body scroll locking
|
|
23
|
+
- Click-outside-to-close support
|
|
24
|
+
- Back button integration
|
|
25
|
+
- Responsive design
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Basic Example
|
|
30
|
+
|
|
31
|
+
```markup
|
|
32
|
+
<AwPageModal title="Edit User">
|
|
33
|
+
<AwForm url="/api/users/1">
|
|
34
|
+
<AwInput name="name" label="Name" />
|
|
35
|
+
<AwInput name="email" label="Email" />
|
|
36
|
+
</AwForm>
|
|
37
|
+
</AwPageModal>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Fullscreen Theme
|
|
41
|
+
|
|
42
|
+
```markup
|
|
43
|
+
<AwPageModal
|
|
44
|
+
title="Document Editor"
|
|
45
|
+
theme="fullscreen"
|
|
46
|
+
container="small"
|
|
47
|
+
>
|
|
48
|
+
<AwMarkdownEditor v-model="content" />
|
|
49
|
+
</AwPageModal>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Aside Theme (Side Panel)
|
|
53
|
+
|
|
54
|
+
```markup
|
|
55
|
+
<AwPageModal
|
|
56
|
+
title="Filters"
|
|
57
|
+
theme="aside"
|
|
58
|
+
@close="$router.back()"
|
|
59
|
+
>
|
|
60
|
+
<AwForm>
|
|
61
|
+
<AwSelect name="category" label="Category" />
|
|
62
|
+
<AwSelect name="status" label="Status" />
|
|
63
|
+
</AwForm>
|
|
64
|
+
</AwPageModal>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### With Breadcrumb and Buttons
|
|
68
|
+
|
|
69
|
+
```markup
|
|
70
|
+
<AwPageModal
|
|
71
|
+
title="Order Details"
|
|
72
|
+
:breadcrumb="{ href: '/orders', title: 'Orders' }"
|
|
73
|
+
>
|
|
74
|
+
<template #default="{ closeModal }">
|
|
75
|
+
<OrderDetails :order="order" />
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<template #buttons>
|
|
79
|
+
<AwButton @click="saveOrder">Save</AwButton>
|
|
80
|
+
<AwButton color="mono" @click="$router.back()">Cancel</AwButton>
|
|
81
|
+
</template>
|
|
82
|
+
</AwPageModal>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## API
|
|
86
|
+
|
|
87
|
+
### Props
|
|
88
|
+
|
|
89
|
+
| Name | Description | Type | Required | Default |
|
|
90
|
+
|------|-------------|------|----------|---------|
|
|
91
|
+
| title | Modal title | `String` | `false` | `''` |
|
|
92
|
+
| breadcrumb | Breadcrumb object with href | `Object` | `false` | `null` |
|
|
93
|
+
| theme | Modal theme | `String` | `false` | `'default'` |
|
|
94
|
+
| container | Content container size (fullscreen only) | `String` | `false` | `null` |
|
|
95
|
+
|
|
96
|
+
**Theme Validator:** `'default'`, `'fullscreen'`, `'aside'`
|
|
97
|
+
|
|
98
|
+
**Container Options (fullscreen only):**
|
|
99
|
+
- `'small'` - Narrower content area
|
|
100
|
+
- `'full'` - Full-width content area
|
|
101
|
+
- `null` - Default width
|
|
102
|
+
|
|
103
|
+
**Breadcrumb Structure:**
|
|
104
|
+
```javascript
|
|
105
|
+
{
|
|
106
|
+
href: String, // Back link URL
|
|
107
|
+
title: String // Back button title (for aria-label)
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Also inherits all props from `AwPage` component.
|
|
112
|
+
|
|
113
|
+
### Slots
|
|
114
|
+
|
|
115
|
+
| Name | Description | Props | Default Slot Content |
|
|
116
|
+
|------|-------------|-------|---------------------|
|
|
117
|
+
| default | Modal content | `{ closeModal }` | - |
|
|
118
|
+
| headline-title | Custom title rendering | `{ title }` | Title text |
|
|
119
|
+
| headline-after-title | Content after title | - | - |
|
|
120
|
+
| buttons | Button footer area | - | - |
|
|
121
|
+
|
|
122
|
+
### Events
|
|
123
|
+
|
|
124
|
+
| Name | Payload | Description |
|
|
125
|
+
|------|---------|-------------|
|
|
126
|
+
| close | - | Emitted when modal should close |
|
|
127
|
+
|
|
128
|
+
**Note:** If no `close` listener is provided, the component automatically calls `$router.back()` on close.
|
|
129
|
+
|
|
130
|
+
## Themes
|
|
131
|
+
|
|
132
|
+
### Default Theme
|
|
133
|
+
|
|
134
|
+
Centered modal overlay with backdrop:
|
|
135
|
+
- Centered on screen
|
|
136
|
+
- Click backdrop to close
|
|
137
|
+
- Medium-sized dialog
|
|
138
|
+
- Suitable for forms and small content
|
|
139
|
+
|
|
140
|
+
### Fullscreen Theme
|
|
141
|
+
|
|
142
|
+
Full-screen modal:
|
|
143
|
+
- Covers entire viewport
|
|
144
|
+
- No backdrop
|
|
145
|
+
- Container size options
|
|
146
|
+
- Suitable for editors and large content
|
|
147
|
+
|
|
148
|
+
### Aside Theme
|
|
149
|
+
|
|
150
|
+
Side panel that slides in from right:
|
|
151
|
+
- Appears on right side
|
|
152
|
+
- Backdrop with click-to-close
|
|
153
|
+
- Narrower than default
|
|
154
|
+
- Suitable for filters and sidebars
|
|
155
|
+
|
|
156
|
+
## Close Behavior
|
|
157
|
+
|
|
158
|
+
The modal can be closed by:
|
|
159
|
+
1. Click close button (×) in header
|
|
160
|
+
2. Click breadcrumb back arrow
|
|
161
|
+
3. Click outside modal (backdrop) - only in default/aside themes
|
|
162
|
+
4. Custom close handler via `@close` event
|
|
163
|
+
|
|
164
|
+
If no `close` event handler is provided, `$router.back()` is called automatically.
|
|
165
|
+
|
|
166
|
+
## Body Scroll Lock
|
|
167
|
+
|
|
168
|
+
The component automatically:
|
|
169
|
+
- Disables body scrolling when mounted
|
|
170
|
+
- Re-enables body scrolling when destroyed
|
|
171
|
+
- Reserves scrollbar gap to prevent layout shift
|
|
172
|
+
|
|
173
|
+
## Accessibility
|
|
174
|
+
|
|
175
|
+
- `role="dialog"` on modal container
|
|
176
|
+
- `role="document"` on dialog content
|
|
177
|
+
- Close button has `aria-label` and `title`
|
|
178
|
+
- Breadcrumb link has `aria-label`
|
|
179
|
+
- Tabindex management for focus
|
|
180
|
+
|
|
181
|
+
## Related Components
|
|
182
|
+
|
|
183
|
+
- `AwPage` - Base page component
|
|
184
|
+
- `AwModal` - Standard modal component
|
|
185
|
+
- `AwPageSingle` - Single page layout
|
|
186
|
+
|
|
187
|
+
## Notes
|
|
188
|
+
|
|
189
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as page component
|
|
190
|
+
- Uses body-scroll-lock library to prevent background scrolling
|
|
191
|
+
- Inherits props from AwPage component (title, breadcrumb, container)
|
|
192
|
+
- Container prop only affects fullscreen theme
|
|
193
|
+
- Default theme shows centered modal dialog
|
|
194
|
+
- Aside theme slides in from right side
|
|
195
|
+
- Fullscreen theme uses AwIconSystemMono for icons
|
|
196
|
+
- Close button always visible in top-right
|
|
197
|
+
- Breadcrumb back arrow only shows if breadcrumb.href is provided
|
|
198
|
+
- Button footer (buttons slot) adds padding to content area
|