@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,300 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: PageSingle component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwPageSingle /> component renders a single entity page with header, content, and optional preview panel - UI Vue component for AwesCode UI.
|
|
6
|
+
title: PageSingle
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwPageSingle
|
|
10
|
+
|
|
11
|
+
**Category:** Page | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwPageSingle` component provides a page layout for displaying single entities (user profile, document view, product details, etc.) with a sticky header, content area, optional preview panel, and action button support.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwPageSingle` provides single-entity page layout with:
|
|
18
|
+
- Sticky page header with breadcrumb
|
|
19
|
+
- Title and description display
|
|
20
|
+
- Content area with optional preview panel
|
|
21
|
+
- Mobile/desktop responsive layouts
|
|
22
|
+
- Fixed action button on mobile
|
|
23
|
+
- Progress indicator support
|
|
24
|
+
- Scroll-based sticky behavior
|
|
25
|
+
- Container size options
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
**⚠️ Essential: Always use `layout: 'empty'`**
|
|
30
|
+
|
|
31
|
+
Every page using `AwPageSingle` must include `layout: 'empty'` in the component export:
|
|
32
|
+
|
|
33
|
+
```javascript
|
|
34
|
+
export default {
|
|
35
|
+
layout: 'empty', // Required for AwPageSingle pages
|
|
36
|
+
// ... rest of component
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Basic Example
|
|
41
|
+
|
|
42
|
+
```markup
|
|
43
|
+
<template>
|
|
44
|
+
<AwPageSingle title="John Doe" description="User Profile">
|
|
45
|
+
<AwCard>
|
|
46
|
+
<h3>Personal Information</h3>
|
|
47
|
+
<!-- user details -->
|
|
48
|
+
</AwCard>
|
|
49
|
+
</AwPageSingle>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
export default {
|
|
54
|
+
layout: 'empty'
|
|
55
|
+
}
|
|
56
|
+
</script>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### With Preview Panel
|
|
60
|
+
|
|
61
|
+
```markup
|
|
62
|
+
<AwPageSingle
|
|
63
|
+
title="Invoice #12345"
|
|
64
|
+
description="Draft invoice"
|
|
65
|
+
:breadcrumb="{ href: '/invoices', title: 'Invoices' }"
|
|
66
|
+
>
|
|
67
|
+
<!-- Main content -->
|
|
68
|
+
<AwForm url="/api/invoices/12345">
|
|
69
|
+
<AwInput name="customer" label="Customer" />
|
|
70
|
+
<AwInput name="amount" label="Amount" />
|
|
71
|
+
</AwForm>
|
|
72
|
+
|
|
73
|
+
<!-- Preview panel -->
|
|
74
|
+
<template #preview>
|
|
75
|
+
<InvoicePreview :invoice="invoice" />
|
|
76
|
+
</template>
|
|
77
|
+
</AwPageSingle>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Preview Slot Patterns
|
|
81
|
+
|
|
82
|
+
We have two standard patterns for the `#preview` slot depending on the entity type:
|
|
83
|
+
|
|
84
|
+
#### Human Pattern (Users, Customers)
|
|
85
|
+
|
|
86
|
+
Used for people. Displays a large avatar and the person's name.
|
|
87
|
+
|
|
88
|
+
```markup
|
|
89
|
+
<template #preview>
|
|
90
|
+
<AwCard class="text-center">
|
|
91
|
+
<AwAvatar
|
|
92
|
+
:src="user.avatar"
|
|
93
|
+
:name="userName"
|
|
94
|
+
size="240"
|
|
95
|
+
class="mx-auto"
|
|
96
|
+
/>
|
|
97
|
+
<AwHeadline class="mt-4">
|
|
98
|
+
{{ userName }}
|
|
99
|
+
</AwHeadline>
|
|
100
|
+
</AwCard>
|
|
101
|
+
</template>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Item Pattern (Services, Products, Locations)
|
|
105
|
+
|
|
106
|
+
Used for non-human entities with an image. Displays a large image with rounded corners.
|
|
107
|
+
|
|
108
|
+
```markup
|
|
109
|
+
<template #preview>
|
|
110
|
+
<AwCard style="--card-padding-x: 0.5rem; --card-padding-y: 0.5rem;">
|
|
111
|
+
<AwActionIcon
|
|
112
|
+
:size="380"
|
|
113
|
+
:image="item.image ? { src: item.image, alt: item.name } : null"
|
|
114
|
+
icon="awesio/image"
|
|
115
|
+
icon-color="mono-400"
|
|
116
|
+
color="mono-800"
|
|
117
|
+
class="w-full"
|
|
118
|
+
style="--icon-size: 48px; --radius: 0.5rem;"
|
|
119
|
+
/>
|
|
120
|
+
<AwHeadline class="p-4 mt-2">
|
|
121
|
+
{{ item.name }}
|
|
122
|
+
</AwHeadline>
|
|
123
|
+
</AwCard>
|
|
124
|
+
</template>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### With Action Button
|
|
128
|
+
|
|
129
|
+
```markup
|
|
130
|
+
<AwPageSingle
|
|
131
|
+
title="Document"
|
|
132
|
+
:action="{ text: 'Save', icon: 'awesio/check', color: 'accent' }"
|
|
133
|
+
@action="saveDocument"
|
|
134
|
+
>
|
|
135
|
+
<AwMarkdownEditor v-model="content" />
|
|
136
|
+
</AwPageSingle>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### With Custom Container
|
|
140
|
+
|
|
141
|
+
```markup
|
|
142
|
+
<AwPageSingle
|
|
143
|
+
title="Wide Content"
|
|
144
|
+
container="full"
|
|
145
|
+
>
|
|
146
|
+
<AwTable :data="items" />
|
|
147
|
+
</AwPageSingle>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## API
|
|
151
|
+
|
|
152
|
+
### Props
|
|
153
|
+
|
|
154
|
+
| Name | Description | Type | Required | Default |
|
|
155
|
+
|------|-------------|------|----------|---------|
|
|
156
|
+
| title | Page title | `String` | `false` | `''` |
|
|
157
|
+
| description | Description text (mobile only) | `String` | `false` | `''` |
|
|
158
|
+
| headerDescription | Description in header (desktop) | `String` | `false` | `''` |
|
|
159
|
+
| breadcrumb | Breadcrumb configuration | `Object` | `false` | `null` |
|
|
160
|
+
| headerProgress | Progress value (0-100) | `Number` | `false` | `null` |
|
|
161
|
+
| action | Action button configuration | `Object` | `false` | `null` |
|
|
162
|
+
| container | Container size type | `String` | `false` | `null` |
|
|
163
|
+
| desktopFrom | Breakpoint for desktop layout | `String` | `false` | `'lg'` |
|
|
164
|
+
| reverse | Reverse content/preview order | `Boolean` | `false` | `false` |
|
|
165
|
+
| hideMenu | Hide page menu | `Boolean` | `false` | `false` |
|
|
166
|
+
|
|
167
|
+
**Breadcrumb Structure:**
|
|
168
|
+
```javascript
|
|
169
|
+
{
|
|
170
|
+
href: String, // Back link URL (optional, defaults to $router.back())
|
|
171
|
+
title: String // Back button aria-label
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Action Button Structure:**
|
|
176
|
+
```javascript
|
|
177
|
+
{
|
|
178
|
+
text: String, // Button text
|
|
179
|
+
icon: String, // Icon name
|
|
180
|
+
color: String, // Button color
|
|
181
|
+
before: Boolean, // Show before menu on desktop
|
|
182
|
+
// ... any other AwButton props
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Container Options:**
|
|
187
|
+
- `'default'` - Standard container with max-width
|
|
188
|
+
- `'full'` - Full-width fluid container
|
|
189
|
+
- `null` - Custom preview-based layout
|
|
190
|
+
|
|
191
|
+
### Slots
|
|
192
|
+
|
|
193
|
+
| Name | Description | Props | Default Slot Content |
|
|
194
|
+
|------|-------------|-------|---------------------|
|
|
195
|
+
| default | Main content area | - | - |
|
|
196
|
+
| preview | Preview panel (right side on desktop) | - | - |
|
|
197
|
+
| breadcrumb | Custom breadcrumb content | - | Back button |
|
|
198
|
+
| after-breadcrumb | Content after breadcrumb | - | - |
|
|
199
|
+
| buttons | Additional buttons in header | - | - |
|
|
200
|
+
| after-menu | Content after page menu | - | - |
|
|
201
|
+
|
|
202
|
+
### Events
|
|
203
|
+
|
|
204
|
+
| Name | Payload | Description |
|
|
205
|
+
|------|---------|-------------|
|
|
206
|
+
| action | - | Emitted when action button is clicked |
|
|
207
|
+
|
|
208
|
+
## Layout Behavior
|
|
209
|
+
|
|
210
|
+
### Desktop (lg+)
|
|
211
|
+
|
|
212
|
+
- Sticky header with title and action button
|
|
213
|
+
- Content and preview side-by-side (if preview slot used)
|
|
214
|
+
- Action button in header (position based on `action.before`)
|
|
215
|
+
- Description shown in header if `headerDescription` provided
|
|
216
|
+
|
|
217
|
+
### Mobile
|
|
218
|
+
|
|
219
|
+
- Title in header when scrolled (hidden at top)
|
|
220
|
+
- Content and preview stacked vertically
|
|
221
|
+
- Fixed floating action button at bottom
|
|
222
|
+
- Description shown below header if `description` provided
|
|
223
|
+
- Action button sticky at bottom
|
|
224
|
+
|
|
225
|
+
## Container Types
|
|
226
|
+
|
|
227
|
+
### Default Container
|
|
228
|
+
|
|
229
|
+
Standard centered container with max-width:
|
|
230
|
+
```markup
|
|
231
|
+
<AwPageSingle container="default">
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Full Container
|
|
235
|
+
|
|
236
|
+
Full-width fluid container:
|
|
237
|
+
```markup
|
|
238
|
+
<AwPageSingle container="full">
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Preview Container (null)
|
|
242
|
+
|
|
243
|
+
Custom two-column layout with preview:
|
|
244
|
+
```markup
|
|
245
|
+
<AwPageSingle :container="null">
|
|
246
|
+
<div>Content</div>
|
|
247
|
+
<template #preview>Preview</template>
|
|
248
|
+
</AwPageSingle>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Scroll Behavior
|
|
252
|
+
|
|
253
|
+
The component uses IntersectionObserver to track:
|
|
254
|
+
- Header sticky state (when scrolled past top)
|
|
255
|
+
- Action button sticky state on mobile
|
|
256
|
+
|
|
257
|
+
Scroll marks are placed at top and bottom of content to detect visibility.
|
|
258
|
+
|
|
259
|
+
## Reverse Layout
|
|
260
|
+
|
|
261
|
+
Use `reverse` prop to swap content/preview order:
|
|
262
|
+
```markup
|
|
263
|
+
<AwPageSingle reverse>
|
|
264
|
+
<div>Main content</div>
|
|
265
|
+
<template #preview>Preview (shows on left)</template>
|
|
266
|
+
</AwPageSingle>
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Header Progress
|
|
270
|
+
|
|
271
|
+
Show progress indicator in header:
|
|
272
|
+
```markup
|
|
273
|
+
<AwPageSingle
|
|
274
|
+
title="Document"
|
|
275
|
+
:header-progress="75"
|
|
276
|
+
>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Progress bar appears in header, useful for multi-step forms or loading states.
|
|
280
|
+
|
|
281
|
+
## Related Components
|
|
282
|
+
|
|
283
|
+
- `AwPage` - Standard page component
|
|
284
|
+
- `AwPageHeader` - Page header component (used internally)
|
|
285
|
+
- `AwPageModal` - Modal page component
|
|
286
|
+
- `AwPageMenuButtons` - Page menu buttons
|
|
287
|
+
|
|
288
|
+
## Notes
|
|
289
|
+
|
|
290
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as page component
|
|
291
|
+
- Uses `pageMixin` for common page functionality
|
|
292
|
+
- Sets body class `aw-page-single-noty` for notification positioning
|
|
293
|
+
- Automatically handles responsive breakpoints
|
|
294
|
+
- Preview panel only shows if preview slot is used
|
|
295
|
+
- Action button placement differs between mobile/desktop
|
|
296
|
+
- Back button uses `$router.back()` if no breadcrumb.href provided
|
|
297
|
+
- IntersectionObserver for scroll detection
|
|
298
|
+
- Supports Nuxt head() for body attributes
|
|
299
|
+
- Header stickiness based on scroll position
|
|
300
|
+
- Mobile action button animates based on bottom visibility
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Page component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwPage /> general container for internal pages in AwesCode UI.
|
|
6
|
+
title: Page
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwPage
|
|
10
|
+
|
|
11
|
+
**Category:** Page | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwPage` component is a top-level page container that provides a structured layout with header, breadcrumbs, title, subnavigation, content area, and optional bottom bar. It's the primary component for building pages in the application.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwPage` provides a complete page structure with:
|
|
18
|
+
- Page header with title and breadcrumb navigation
|
|
19
|
+
- Optional subnavigation tabs
|
|
20
|
+
- Flexible content container (default, small, full)
|
|
21
|
+
- Fullscreen mode support
|
|
22
|
+
- Mobile-responsive layout with sticky header
|
|
23
|
+
- Bottom bar for mobile devices
|
|
24
|
+
- Aside content area support
|
|
25
|
+
- Integration with Vuex store for navigation state
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Basic Example
|
|
30
|
+
|
|
31
|
+
```markup
|
|
32
|
+
<AwPage title="Page Title">
|
|
33
|
+
<p>Page content goes here</p>
|
|
34
|
+
</AwPage>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### With Breadcrumb
|
|
38
|
+
|
|
39
|
+
```markup
|
|
40
|
+
<AwPage
|
|
41
|
+
title="Page Title"
|
|
42
|
+
:breadcrumb="{ href: '/overview', title: 'Overview' }"
|
|
43
|
+
>
|
|
44
|
+
<p>Page content</p>
|
|
45
|
+
</AwPage>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### With Subnavigation
|
|
49
|
+
|
|
50
|
+
```markup
|
|
51
|
+
<AwPage
|
|
52
|
+
title="Page Title"
|
|
53
|
+
:subnav="[
|
|
54
|
+
{ href: '/page/tab1', title: 'Tab 1' },
|
|
55
|
+
{ href: '/page/tab2', title: 'Tab 2' }
|
|
56
|
+
]"
|
|
57
|
+
>
|
|
58
|
+
<p>Page content</p>
|
|
59
|
+
</AwPage>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### With Buttons Slot
|
|
63
|
+
|
|
64
|
+
```markup
|
|
65
|
+
<AwPage title="Page Title">
|
|
66
|
+
<template #buttons>
|
|
67
|
+
<AwButton icon="plus" cta>Create</AwButton>
|
|
68
|
+
<AwButton>Settings</AwButton>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<p>Page content</p>
|
|
72
|
+
</AwPage>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### With Custom Container
|
|
76
|
+
|
|
77
|
+
```markup
|
|
78
|
+
<AwPage title="Page Title" container="small">
|
|
79
|
+
<p>Content in small container</p>
|
|
80
|
+
</AwPage>
|
|
81
|
+
|
|
82
|
+
<AwPage title="Page Title" container="full">
|
|
83
|
+
<p>Content in full-width container</p>
|
|
84
|
+
</AwPage>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### With Aside Content
|
|
88
|
+
|
|
89
|
+
```markup
|
|
90
|
+
<AwPage title="Page Title">
|
|
91
|
+
<template #default>
|
|
92
|
+
<p>Main content</p>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<template #aside>
|
|
96
|
+
<AwCard title="Sidebar">Sidebar content</AwCard>
|
|
97
|
+
</template>
|
|
98
|
+
</AwPage>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Fullscreen Mode
|
|
102
|
+
|
|
103
|
+
```markup
|
|
104
|
+
<AwPage title="Page Title" :fullscreen="isFullscreen">
|
|
105
|
+
<p>Fullscreen content</p>
|
|
106
|
+
</AwPage>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## API
|
|
110
|
+
|
|
111
|
+
### Props
|
|
112
|
+
|
|
113
|
+
| Name | Description | Type | Required | Default |
|
|
114
|
+
|------|-------------|------|----------|---------|
|
|
115
|
+
| title | Main headline on the page | `String` | `false` | `''` |
|
|
116
|
+
| metaTitle | Meta title for SEO (uses `title` if not provided) | `String` | `false` | `''` |
|
|
117
|
+
| titleTag | HTML tag for title element | `String` | `false` | `'h1'` |
|
|
118
|
+
| breadcrumb | Breadcrumb object with `href` and `title` | `Object` | `false` | `null` |
|
|
119
|
+
| subnav | Subnavigation items array | `Array` | `false` | `[]` |
|
|
120
|
+
| fullscreen | Enable fullscreen mode | `Boolean` | `false` | `false` |
|
|
121
|
+
| container | Container size: `'default'`, `'small'`, or `'full'` | `String` | `false` | `'default'` |
|
|
122
|
+
| headerContainer | Container size for header (overrides `container`) | `String` | `false` | `null` |
|
|
123
|
+
| hideBottomBar | Hide mobile bottom bar | `Boolean` | `false` | `null` (auto) |
|
|
124
|
+
| buttonsBreakpoint | Breakpoint for button visibility | `String` | `false` | `'lg'` |
|
|
125
|
+
| breadcrumbMenu | Show menu toggle in breadcrumb area | `Boolean` | `false` | `undefined` |
|
|
126
|
+
|
|
127
|
+
**Breadcrumb Object:**
|
|
128
|
+
```javascript
|
|
129
|
+
{
|
|
130
|
+
href: '/path', // Required
|
|
131
|
+
title: 'Back' // Optional
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Subnav Items:**
|
|
136
|
+
```javascript
|
|
137
|
+
[
|
|
138
|
+
{ href: '/path', title: 'Tab Title' },
|
|
139
|
+
// ... more items
|
|
140
|
+
]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Slots
|
|
144
|
+
|
|
145
|
+
| Name | Description | Props | Default Slot Content |
|
|
146
|
+
|------|-------------|-------|---------------------|
|
|
147
|
+
| default | Main page content | - | - |
|
|
148
|
+
| aside | Sidebar content (enables aside layout) | - | - |
|
|
149
|
+
| heading | Custom header (replaces default) | `{ titleTag, title, breadcrumb }` | Default header |
|
|
150
|
+
| title | Custom title content | `{ title, titleShowable, hideTitle }` | Default title |
|
|
151
|
+
| buttons | Header buttons area | - | - |
|
|
152
|
+
| subnav | Custom subnavigation | `{ subnav }` | Default `AwTabNav` component |
|
|
153
|
+
| headline-breadcrumb | Custom breadcrumb button | - | Default back button |
|
|
154
|
+
| after-breadcrumb | Content after breadcrumb | - | - |
|
|
155
|
+
| mobile-title | Mobile title display | `{ title }` | Title text |
|
|
156
|
+
| bottom-bar | Custom bottom bar | - | Default `AwBottomBar` component |
|
|
157
|
+
|
|
158
|
+
### Events
|
|
159
|
+
|
|
160
|
+
| Name | Payload | Description |
|
|
161
|
+
|------|---------|-------------|
|
|
162
|
+
| update:fullscreen | `Boolean` | Emitted when fullscreen state changes |
|
|
163
|
+
|
|
164
|
+
### Config Options
|
|
165
|
+
|
|
166
|
+
The component uses default configuration from `@AwConfig`. You can override these defaults in your project's `awes.config.js`:
|
|
167
|
+
|
|
168
|
+
```javascript
|
|
169
|
+
export default {
|
|
170
|
+
AwPage: {
|
|
171
|
+
titleTag: 'h1' // Default HTML tag for title
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Related Components
|
|
177
|
+
|
|
178
|
+
- `AwPageHeader` - Internal header component
|
|
179
|
+
- `AwTabNav` - Tab navigation component (used for subnav)
|
|
180
|
+
- `AwBottomBar` - Bottom bar component for mobile
|
|
181
|
+
- `AwButton` - Button component for header actions
|
|
182
|
+
|
|
183
|
+
## Notes
|
|
184
|
+
|
|
185
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as a page component
|
|
186
|
+
- Breadcrumb automatically uses `backRoute` from Vuex store if available
|
|
187
|
+
- On mobile, breadcrumb area shows menu toggle if no breadcrumb is provided
|
|
188
|
+
- Header becomes sticky on mobile when scrolling
|
|
189
|
+
- Fullscreen mode uses native Fullscreen API with fallback
|
|
190
|
+
- Bottom bar is automatically hidden if breadcrumb is present
|
|
191
|
+
- Container classes: `container` (default), `container-small`, `container-fluid` (full)
|
|
192
|
+
- Component provides `teleportButtonsTo` context for button teleporting
|
|
193
|
+
- Uses `page` mixin for scroll watching and header stickiness
|
|
194
|
+
- Integrates with `$screen` for responsive behavior
|