@awes-io/ui 2.142.0 → 2.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/assets/css/components/_index.css +7 -1
- package/assets/css/components/animation.css +38 -32
- package/assets/css/components/content-placeholder.css +103 -0
- 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/layout.css +1 -32
- 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/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/AwContentPlaceholder.vue +60 -0
- package/components/1_atoms/AwFlow.vue +21 -48
- package/components/1_atoms/AwLabel.vue +1 -1
- package/components/2_molecules/AwButton.vue +1 -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/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/AwImageUpload.vue +1 -1
- package/components/3_organisms/AwMarkdownEditor.vue +0 -0
- package/components/3_organisms/AwMultiBlockBuilder.vue +1 -1
- package/components/3_organisms/AwTable/AwTableBuilder.vue +12 -60
- package/components/4_pages/AwPageAside.vue +108 -0
- package/components/5_layouts/AwLayoutCenter.vue +3 -8
- package/components/5_layouts/_AwUserMenu.vue +1 -1
- package/dist/css/aw-icons.css +26 -0
- package/dist/fonts/aw-icons.svg +18 -0
- package/dist/fonts/aw-icons.ttf +0 -0
- package/dist/fonts/aw-icons.woff +0 -0
- package/dist/fonts/aw-icons.woff2 +0 -0
- package/docs/_template.md +80 -0
- package/docs/components/atoms/aw-accordion-fold.md +91 -0
- package/docs/components/atoms/aw-action-card-body.md +67 -0
- package/docs/components/atoms/aw-action-card.md +94 -0
- package/docs/components/atoms/aw-action-icon.md +88 -0
- package/docs/components/atoms/aw-avatar.md +106 -0
- package/docs/components/atoms/aw-card.md +112 -0
- package/docs/components/atoms/aw-checkbox.md +112 -0
- package/docs/components/atoms/aw-content-placeholder.md +116 -0
- package/docs/components/atoms/aw-description.md +83 -0
- package/docs/components/atoms/aw-dock.md +84 -0
- package/docs/components/atoms/aw-dropdown-button.md +94 -0
- package/docs/components/atoms/aw-dropdown.md +128 -0
- package/docs/components/atoms/aw-file.md +73 -0
- package/docs/components/atoms/aw-flow.md +92 -0
- package/docs/components/atoms/aw-grid.md +91 -0
- package/docs/components/atoms/aw-headline.md +71 -0
- package/docs/components/atoms/aw-icon-system-color.md +121 -0
- package/docs/components/atoms/aw-icon-system-mono.md +205 -0
- package/docs/components/atoms/aw-icon.md +235 -0
- package/docs/components/atoms/aw-info.md +85 -0
- package/docs/components/atoms/aw-input.md +120 -0
- package/docs/components/atoms/aw-label.md +83 -0
- package/docs/components/atoms/aw-link.md +99 -0
- package/docs/components/atoms/aw-list.md +88 -0
- package/docs/components/atoms/aw-progress.md +70 -0
- package/docs/components/atoms/aw-radio.md +109 -0
- package/docs/components/atoms/aw-refresh-wrapper.md +81 -0
- package/docs/components/atoms/aw-select-native.md +106 -0
- package/docs/components/atoms/aw-slider.md +82 -0
- package/docs/components/atoms/aw-sub-headline.md +73 -0
- package/docs/components/atoms/aw-switcher.md +115 -0
- package/docs/components/atoms/aw-tag.md +80 -0
- package/docs/components/atoms/aw-title.md +70 -0
- package/docs/components/atoms/aw-toggler.md +69 -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 +91 -0
- package/docs/components/molecules/aw-alert.md +96 -0
- package/docs/components/molecules/aw-badge.md +108 -0
- package/docs/components/molecules/aw-banner-text.md +90 -0
- package/docs/components/molecules/aw-button-nav.md +46 -0
- package/docs/components/molecules/aw-button.md +123 -0
- package/docs/components/molecules/aw-description-input.md +67 -0
- package/docs/components/molecules/aw-empty-container.md +86 -0
- package/docs/components/molecules/aw-island.md +234 -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 +225 -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 +253 -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 +1493 -0
- package/docs/guides/page-patterns/list-pages.md +1094 -0
- package/docs/index.md +263 -1
- package/docs/integrations.md +870 -0
- package/docs/reference/menu.md +462 -0
- package/docs/reference/plugins.md +970 -0
- package/docs/reference/troubleshooting.md +945 -0
- package/nuxt/awes.config.js +9 -8
- package/nuxt/icons.css +26 -0
- package/nuxt/index.js +2 -2
- package/nuxt/pages/more.vue +1 -1
- package/package.json +5 -3
- package/readme.md +171 -1
- 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-timeline-builder.md +0 -50
- 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,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: BottomBar component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwBottomBar /> component displays a fixed bottom action bar - UI Vue component for AwesCode UI.
|
|
6
|
+
title: BottomBar
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwBottomBar
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwBottomBar` component displays a fixed action bar at the bottom of the screen, commonly used for mobile navigation or persistent actions.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
- Fixed bottom positioning
|
|
18
|
+
- Action buttons
|
|
19
|
+
- Mobile-optimized
|
|
20
|
+
- Responsive visibility
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
### Basic Example
|
|
25
|
+
|
|
26
|
+
```markup
|
|
27
|
+
<AwBottomBar>
|
|
28
|
+
<AwButton>Save</AwButton>
|
|
29
|
+
<AwButton color="mono">Cancel</AwButton>
|
|
30
|
+
</AwBottomBar>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### With Navigation
|
|
34
|
+
|
|
35
|
+
```markup
|
|
36
|
+
<AwBottomBar>
|
|
37
|
+
<AwButton href="/" icon="awesio/home">Home</AwButton>
|
|
38
|
+
<AwButton href="/search" icon="awesio/search">Search</AwButton>
|
|
39
|
+
<AwButton href="/profile" icon="awesio/user">Profile</AwButton>
|
|
40
|
+
</AwBottomBar>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## API
|
|
44
|
+
|
|
45
|
+
### Props
|
|
46
|
+
|
|
47
|
+
| Name | Description | Type | Required | Default |
|
|
48
|
+
|------|-------------|------|----------|---------|
|
|
49
|
+
| visible | Show/hide bar | `Boolean` | `false` | `true` |
|
|
50
|
+
|
|
51
|
+
### Slots
|
|
52
|
+
|
|
53
|
+
| Name | Description | Props | Default Slot Content |
|
|
54
|
+
|------|-------------|-------|---------------------|
|
|
55
|
+
| default | Bar content | - | - |
|
|
56
|
+
|
|
57
|
+
## Related Components
|
|
58
|
+
|
|
59
|
+
- [AwPageMenuButtons](aw-page-menu-buttons.md) - Page action buttons
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as organism
|
|
64
|
+
- Fixed to bottom of viewport
|
|
65
|
+
- Adds padding to body to prevent content overlap
|
|
66
|
+
- Typically used on mobile devices
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Calendar Days component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwCalendarDays /> component is used to render Calendar Days - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Calendar Days
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwCalendarDays
|
|
10
|
+
|
|
11
|
+
**Category:** Organism (Internal) | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwCalendarDays` component is an internal calendar sub-component that renders a grid of days for a given month and year. It's used internally by `AwCalendar` and `AwDate` components.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwCalendarDays` provides a calendar days grid with:
|
|
18
|
+
- 42-day grid (6 weeks × 7 days)
|
|
19
|
+
- Day highlighting and styling
|
|
20
|
+
- Disabled day support
|
|
21
|
+
- Today highlighting
|
|
22
|
+
- Custom day class functions
|
|
23
|
+
- Functional component for performance
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
This component is typically used internally by `AwCalendar` and `AwDate`. Direct usage is not recommended unless building custom calendar components.
|
|
28
|
+
|
|
29
|
+
### Internal Usage
|
|
30
|
+
|
|
31
|
+
```markup
|
|
32
|
+
<AwCalendarDays
|
|
33
|
+
:year="2024"
|
|
34
|
+
:month="0"
|
|
35
|
+
:first-day="1"
|
|
36
|
+
:day-class="getDayClass"
|
|
37
|
+
:day-disabled="isDayDisabled"
|
|
38
|
+
:show-today="true"
|
|
39
|
+
/>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
### Props
|
|
45
|
+
|
|
46
|
+
| Name | Description | Type | Required | Default |
|
|
47
|
+
|------|-------------|------|----------|---------|
|
|
48
|
+
| year | Year to display (4 digits) | `Number` | `false` | Current year |
|
|
49
|
+
| month | Month to display (0-11) | `Number` | `false` | Current month |
|
|
50
|
+
| firstDay | First day of week (0=Sunday, 1=Monday) | `Number` | `false` | `null` (from config) |
|
|
51
|
+
| dayClass | Function returning CSS classes for day | `Function` | `false` | `() => null` |
|
|
52
|
+
| dayDisabled | Function returning disabled state for day | `Function` | `false` | `() => null` |
|
|
53
|
+
| showToday | Highlight today's date | `Boolean` | `false` | `false` |
|
|
54
|
+
|
|
55
|
+
**Day Class Function:**
|
|
56
|
+
```javascript
|
|
57
|
+
dayClass(date) {
|
|
58
|
+
// date is a Date object
|
|
59
|
+
// return string, array, or object for Vue class binding
|
|
60
|
+
return 'custom-class'
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Day Disabled Function:**
|
|
65
|
+
```javascript
|
|
66
|
+
dayDisabled(date) {
|
|
67
|
+
// date is a Date object
|
|
68
|
+
// return true to disable, false to enable
|
|
69
|
+
return date.getDay() === 0 // Disable Sundays
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Slots
|
|
74
|
+
|
|
75
|
+
| Name | Description | Props | Default Slot Content |
|
|
76
|
+
|------|-------------|-------|---------------------|
|
|
77
|
+
| default | Custom day cell rendering | `{ date, day, month, isOutside, isToday }` | Default day cell |
|
|
78
|
+
| before | Content before day grid | - | - |
|
|
79
|
+
| after | Content after day grid | - | - |
|
|
80
|
+
|
|
81
|
+
### Events
|
|
82
|
+
|
|
83
|
+
This component does not emit events directly (uses parent component's click handlers).
|
|
84
|
+
|
|
85
|
+
### Config Options
|
|
86
|
+
|
|
87
|
+
The component uses default configuration from `@AwConfig`. You can override these defaults in your project's `awes.config.js`:
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
export default {
|
|
91
|
+
AwCalendar: {
|
|
92
|
+
firstDay: 1 // Monday
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Related Components
|
|
98
|
+
|
|
99
|
+
- `AwCalendar` - Main calendar component
|
|
100
|
+
- `AwCalendarNav` - Calendar navigation component
|
|
101
|
+
- `AwCalendarWeekdays` - Weekday headers component
|
|
102
|
+
- `AwCalendarDay` - Individual day cell component
|
|
103
|
+
|
|
104
|
+
## Notes
|
|
105
|
+
|
|
106
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
107
|
+
- Component is functional (stateless) for optimal performance
|
|
108
|
+
- Always renders 42 days (6 weeks) to maintain consistent size
|
|
109
|
+
- Days outside current month are marked with `isOutside` flag
|
|
110
|
+
- Uses `getCalendarDates` utility function to generate date array
|
|
111
|
+
- Day cells are rendered using `AwCalendarDay` component
|
|
112
|
+
- Outside days get `aw-calendar__day_outside` class
|
|
113
|
+
- Today gets `aw-calendar__day_today` class when `showToday` is true
|
|
114
|
+
- Component uses config for `firstDay` if not provided as prop
|
|
115
|
+
- Days are clickable and emit events through parent component
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Calendar Nav component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwCalendarNav /> component is used to render Calendar Nav - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Calendar Nav
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwCalendarNav
|
|
10
|
+
|
|
11
|
+
**Category:** Organism (Internal) | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwCalendarNav` component is an internal calendar sub-component that renders navigation controls (previous/next buttons) and displays the current month and year. It's used internally by `AwCalendar` and `AwDate` components.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwCalendarNav` provides calendar navigation with:
|
|
18
|
+
- Previous/next month buttons
|
|
19
|
+
- Current month and year display
|
|
20
|
+
- Disabled state support
|
|
21
|
+
- Internationalized month names
|
|
22
|
+
- Icon-based navigation buttons
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
This component is typically used internally by `AwCalendar` and `AwDate`. Direct usage is not recommended unless building custom calendar components.
|
|
27
|
+
|
|
28
|
+
### Internal Usage
|
|
29
|
+
|
|
30
|
+
```markup
|
|
31
|
+
<AwCalendarNav
|
|
32
|
+
:month="0"
|
|
33
|
+
:year="2024"
|
|
34
|
+
:disabled-prev="false"
|
|
35
|
+
:disabled-next="false"
|
|
36
|
+
@click:prev="shiftMonth(-1)"
|
|
37
|
+
@click:next="shiftMonth(1)"
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## API
|
|
42
|
+
|
|
43
|
+
### Props
|
|
44
|
+
|
|
45
|
+
| Name | Description | Type | Required | Default |
|
|
46
|
+
|------|-------------|------|----------|---------|
|
|
47
|
+
| month | Month to display (0-11) | `Number` | `false` | - |
|
|
48
|
+
| year | Year to display (4 digits) | `Number` | `false` | - |
|
|
49
|
+
| months | Custom month names array or function | `Array` / `Function` | `false` | `null` |
|
|
50
|
+
| disabledPrev | Disable previous button | `Boolean` | `false` | `false` |
|
|
51
|
+
| disabledNext | Disable next button | `Boolean` | `false` | `false` |
|
|
52
|
+
|
|
53
|
+
**Months Format:**
|
|
54
|
+
- Array: `['January', 'February', ...]`
|
|
55
|
+
- Function: Day.js locale function (e.g., `dayjs.localeData().months()`)
|
|
56
|
+
|
|
57
|
+
### Slots
|
|
58
|
+
|
|
59
|
+
This component does not have slots.
|
|
60
|
+
|
|
61
|
+
### Events
|
|
62
|
+
|
|
63
|
+
| Name | Payload | Description |
|
|
64
|
+
|------|---------|-------------|
|
|
65
|
+
| click:prev | - | Emitted when previous button is clicked |
|
|
66
|
+
| click:next | - | Emitted when next button is clicked |
|
|
67
|
+
|
|
68
|
+
### Config Options
|
|
69
|
+
|
|
70
|
+
The component uses default configuration from `@AwConfig`. You can override these defaults in your project's `awes.config.js`:
|
|
71
|
+
|
|
72
|
+
```javascript
|
|
73
|
+
export default {
|
|
74
|
+
AwCalendar: {
|
|
75
|
+
months: ['January', 'February', 'March', ...]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Related Components
|
|
81
|
+
|
|
82
|
+
- `AwCalendar` - Main calendar component
|
|
83
|
+
- `AwCalendarDays` - Calendar days grid component
|
|
84
|
+
- `AwCalendarWeekdays` - Weekday headers component
|
|
85
|
+
- `AwButton` - Button component used for navigation
|
|
86
|
+
- `AwIconSystemMono` - Icon component used for arrows
|
|
87
|
+
|
|
88
|
+
## Notes
|
|
89
|
+
|
|
90
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
91
|
+
- Navigation buttons only show if corresponding event listeners are present
|
|
92
|
+
- Month names are automatically internationalized using Day.js locale
|
|
93
|
+
- Falls back to config months if Day.js locale is not available
|
|
94
|
+
- Previous button shows left arrow icon
|
|
95
|
+
- Next button shows right arrow icon (rotated 180°)
|
|
96
|
+
- Title spacing adjusts based on which buttons are visible
|
|
97
|
+
- Component uses `AwButton` with `theme="icon"` for navigation buttons
|
|
98
|
+
- Month and year are displayed as plain text (format: "Month Year")
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Calendar View component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwCalendarView /> component is used to render Calendar View - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Calendar View
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwCalendarView
|
|
10
|
+
|
|
11
|
+
**Category:** Organism (Internal) | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwCalendarView` component is an internal calendar sub-component that renders a simplified calendar view without navigation. It displays weekday headers and a days grid, and emits date click events.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwCalendarView` provides a simplified calendar view with:
|
|
18
|
+
- Weekday headers
|
|
19
|
+
- Days grid
|
|
20
|
+
- Date click handling
|
|
21
|
+
- Custom day styling
|
|
22
|
+
- Disabled day support
|
|
23
|
+
- No navigation controls
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
This component is typically used internally or for custom calendar implementations that don't need navigation.
|
|
28
|
+
|
|
29
|
+
### Basic Example
|
|
30
|
+
|
|
31
|
+
```markup
|
|
32
|
+
<AwCalendarView
|
|
33
|
+
:month="0"
|
|
34
|
+
:year="2024"
|
|
35
|
+
:first-day="1"
|
|
36
|
+
:day-class="getDayClass"
|
|
37
|
+
:day-disabled="isDayDisabled"
|
|
38
|
+
@click:date="handleDateClick"
|
|
39
|
+
/>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
### Props
|
|
45
|
+
|
|
46
|
+
All props from `AwCalendarDays` are supported, plus:
|
|
47
|
+
|
|
48
|
+
| Name | Description | Type | Required | Default |
|
|
49
|
+
|------|-------------|------|----------|---------|
|
|
50
|
+
| firstDay | First day of week (0=Sunday, 1=Monday) | `Number` | `false` | From config |
|
|
51
|
+
|
|
52
|
+
**Inherited from AwCalendarDays:**
|
|
53
|
+
- `year`, `month`, `dayClass`, `dayDisabled`, `showToday`
|
|
54
|
+
|
|
55
|
+
### Slots
|
|
56
|
+
|
|
57
|
+
All slots from `AwCalendarDays` are supported:
|
|
58
|
+
|
|
59
|
+
| Name | Description | Props | Default Slot Content |
|
|
60
|
+
|------|-------------|-------|---------------------|
|
|
61
|
+
| day | Custom day cell rendering | `{ date, day, month, isOutside, isToday }` | Default day cell |
|
|
62
|
+
| day-outside | Custom rendering for days outside month | `{ date, day, month }` | Default day cell |
|
|
63
|
+
| day-inside | Custom rendering for days inside month | `{ date, day, month, isToday }` | Default day cell |
|
|
64
|
+
|
|
65
|
+
### Events
|
|
66
|
+
|
|
67
|
+
| Name | Payload | Description |
|
|
68
|
+
|------|---------|-------------|
|
|
69
|
+
| click:date | `Date` | Emitted when a date is clicked |
|
|
70
|
+
|
|
71
|
+
### Config Options
|
|
72
|
+
|
|
73
|
+
The component uses default configuration from `@AwConfig`. You can override these defaults in your project's `awes.config.js`:
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
export default {
|
|
77
|
+
AwCalendar: {
|
|
78
|
+
firstDay: 1 // Monday
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Related Components
|
|
84
|
+
|
|
85
|
+
- `AwCalendar` - Main calendar component with navigation
|
|
86
|
+
- `AwCalendarDays` - Calendar days grid component
|
|
87
|
+
- `AwCalendarWeekdays` - Weekday headers component
|
|
88
|
+
|
|
89
|
+
## Notes
|
|
90
|
+
|
|
91
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
92
|
+
- Component name is empty in source (internal use)
|
|
93
|
+
- Uses `getDateFromEvent` utility to extract date from click event
|
|
94
|
+
- Date clicks are detected via event delegation
|
|
95
|
+
- All day slots are proxied to parent component
|
|
96
|
+
- Component is simpler than `AwCalendar` (no navigation)
|
|
97
|
+
- Uses same day rendering logic as `AwCalendarDays`
|
|
98
|
+
- Date object is extracted from clicked element's `data-time` attribute
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Calendar component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwCalendar /> component is used to render Calendar - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Calendar
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwCalendar
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwCalendar` component is a date picker calendar that displays a month view with navigation, weekday headers, and date selection. It supports single date, multiple dates, and date range selection.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwCalendar` provides a calendar solution with:
|
|
18
|
+
- Month view with navigation
|
|
19
|
+
- Single date, multiple dates, or date range selection
|
|
20
|
+
- Min/max date constraints
|
|
21
|
+
- Custom disabled date filtering
|
|
22
|
+
- Day.js integration for date handling
|
|
23
|
+
- Customizable weekday start (first day of week)
|
|
24
|
+
- Today highlighting
|
|
25
|
+
- Custom header and footer slots
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Basic Example
|
|
30
|
+
|
|
31
|
+
```markup
|
|
32
|
+
<AwCalendar v-model="selectedDate" />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Date Range
|
|
36
|
+
|
|
37
|
+
```markup
|
|
38
|
+
<AwCalendar v-model="dateRange" range />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Multiple Dates
|
|
42
|
+
|
|
43
|
+
```markup
|
|
44
|
+
<AwCalendar v-model="selectedDates" />
|
|
45
|
+
<!-- v-model is array -->
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### With Min/Max Dates
|
|
49
|
+
|
|
50
|
+
```markup
|
|
51
|
+
<AwCalendar
|
|
52
|
+
v-model="selectedDate"
|
|
53
|
+
:min="minDate"
|
|
54
|
+
:max="maxDate"
|
|
55
|
+
/>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### With Disabled Days
|
|
59
|
+
|
|
60
|
+
```markup
|
|
61
|
+
<AwCalendar
|
|
62
|
+
v-model="selectedDate"
|
|
63
|
+
:disabled-days="(date) => date.day() === 0 || date.day() === 6"
|
|
64
|
+
/>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Custom Format
|
|
68
|
+
|
|
69
|
+
```markup
|
|
70
|
+
<AwCalendar
|
|
71
|
+
v-model="selectedDate"
|
|
72
|
+
parse-format="YYYY-MM-DD"
|
|
73
|
+
output-format="toDate"
|
|
74
|
+
/>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Custom Header
|
|
78
|
+
|
|
79
|
+
```markup
|
|
80
|
+
<AwCalendar v-model="selectedDate">
|
|
81
|
+
<template #header="{ viewDate, shiftMonth }">
|
|
82
|
+
<div class="custom-header">
|
|
83
|
+
<AwButton @click="shiftMonth(-1)">Prev</AwButton>
|
|
84
|
+
<span>{{ viewDate.format('MMMM YYYY') }}</span>
|
|
85
|
+
<AwButton @click="shiftMonth(1)">Next</AwButton>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
</AwCalendar>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## API
|
|
92
|
+
|
|
93
|
+
### Props
|
|
94
|
+
|
|
95
|
+
| Name | Description | Type | Required | Default |
|
|
96
|
+
|------|-------------|------|----------|---------|
|
|
97
|
+
| value | Selected date(s) or range | `String` / `Number` / `Object` / `Date` / `Array` / `Object` | `false` | `null` |
|
|
98
|
+
| parseFormat | Custom parse format for string dates (e.g., `'YYYY-MM-DD[T]HH:mm:sszz'`) | `String` | `false` | `''` |
|
|
99
|
+
| outputFormat | Output format: `'toDayjs'`, `'toDate'`, `'toJSON'`, or format string | `String` | `false` | `'toDate'` |
|
|
100
|
+
| min | Minimum available date | `String` / `Number` / `Object` / `Date` | `false` | `null` |
|
|
101
|
+
| max | Maximum available date | `String` / `Number` / `Object` / `Date` | `false` | `null` |
|
|
102
|
+
| disabledDays | Function to filter disabled dates | `Function` | `false` | `() => false` |
|
|
103
|
+
| range | Enable date range selection | `Boolean` | `false` | `false` |
|
|
104
|
+
| firstDay | First day of week (0 = Sunday) | `Number` | `false` | `1` |
|
|
105
|
+
| showToday | Highlight today's date | `Boolean` | `false` | `true` |
|
|
106
|
+
|
|
107
|
+
**Range Value Format:**
|
|
108
|
+
```javascript
|
|
109
|
+
{ start: Date, end: Date }
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Multiple Dates Format:**
|
|
113
|
+
```javascript
|
|
114
|
+
[Date, Date, ...]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Slots
|
|
118
|
+
|
|
119
|
+
| Name | Description | Props | Default Slot Content |
|
|
120
|
+
|------|-------------|-------|---------------------|
|
|
121
|
+
| header | Custom header (replaces navigation) | `{ viewDate, isDisabledPrev, isDisabledNext, shiftMonth }` | Default `AwCalendarNav` component |
|
|
122
|
+
| footer | Footer content | - | - |
|
|
123
|
+
| day | Custom day cell rendering | `{ date, dayjs, isSelected, isDisabled, isToday, isInRange, isStart, isEnd }` | Default day cell |
|
|
124
|
+
| day-outside | Custom rendering for days outside current month | `{ date, dayjs }` | Default day cell |
|
|
125
|
+
| day-inside | Custom rendering for days inside current month | `{ date, dayjs, isSelected, isDisabled, isToday, isInRange, isStart, isEnd }` | Default day cell |
|
|
126
|
+
|
|
127
|
+
### Events
|
|
128
|
+
|
|
129
|
+
| Name | Payload | Description |
|
|
130
|
+
|------|---------|-------------|
|
|
131
|
+
| input | `Date` / `Array` / `Object` | Emitted when date is selected (format depends on `outputFormat`) |
|
|
132
|
+
|
|
133
|
+
### Config Options
|
|
134
|
+
|
|
135
|
+
The component uses default configuration from `@AwConfig`. You can override these defaults in your project's `awes.config.js`:
|
|
136
|
+
|
|
137
|
+
```javascript
|
|
138
|
+
export default {
|
|
139
|
+
AwCalendar: {
|
|
140
|
+
firstDay: 1, // Monday
|
|
141
|
+
weekdaysShort: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
142
|
+
months: ['January', 'February', ...]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Related Components
|
|
148
|
+
|
|
149
|
+
- `AwDate` - Date input with calendar dropdown
|
|
150
|
+
- `AwCalendarNav` - Calendar navigation component
|
|
151
|
+
- `AwCalendarDays` - Calendar days grid component
|
|
152
|
+
- `AwCalendarWeekdays` - Weekday headers component
|
|
153
|
+
|
|
154
|
+
## Notes
|
|
155
|
+
|
|
156
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
157
|
+
- Uses Day.js for date manipulation and formatting
|
|
158
|
+
- When `range` is true, value should be `{ start, end }` object
|
|
159
|
+
- When value is array, supports multiple date selection
|
|
160
|
+
- `disabledDays` function receives Day.js object, return `true` to disable
|
|
161
|
+
- `parseFormat` is used when parsing string dates
|
|
162
|
+
- `outputFormat` determines what type is emitted in `input` event
|
|
163
|
+
- Navigation buttons are automatically disabled at min/max dates
|
|
164
|
+
- Component uses calendar mixin for shared date logic
|
|
165
|
+
- Hover effect shows range preview when selecting range
|
|
166
|
+
- Today is highlighted by default (can be disabled)
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Chart component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwChart /> component is used to render Chart - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Chart
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwChart
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwChart` component is a wrapper for ApexCharts.js that provides interactive charts and graphs. It dynamically loads the ApexCharts library and renders charts based on configuration options.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwChart` provides a charting solution with:
|
|
18
|
+
- ApexCharts.js integration
|
|
19
|
+
- Dynamic library loading
|
|
20
|
+
- Reactive chart updates
|
|
21
|
+
- Multiple chart types support
|
|
22
|
+
- Customizable options
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Basic Example
|
|
27
|
+
|
|
28
|
+
```markup
|
|
29
|
+
<AwChart :options="chartOptions" />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Line Chart
|
|
33
|
+
|
|
34
|
+
```markup
|
|
35
|
+
<AwChart
|
|
36
|
+
:options="{
|
|
37
|
+
series: [{
|
|
38
|
+
name: 'Sales',
|
|
39
|
+
data: [30, 40, 35, 50, 49, 60, 70]
|
|
40
|
+
}],
|
|
41
|
+
chart: {
|
|
42
|
+
type: 'line'
|
|
43
|
+
},
|
|
44
|
+
xaxis: {
|
|
45
|
+
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul']
|
|
46
|
+
}
|
|
47
|
+
}"
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Bar Chart
|
|
52
|
+
|
|
53
|
+
```markup
|
|
54
|
+
<AwChart
|
|
55
|
+
:options="{
|
|
56
|
+
series: [{
|
|
57
|
+
name: 'Revenue',
|
|
58
|
+
data: [400, 430, 448, 470, 540, 580, 690]
|
|
59
|
+
}],
|
|
60
|
+
chart: {
|
|
61
|
+
type: 'bar'
|
|
62
|
+
},
|
|
63
|
+
xaxis: {
|
|
64
|
+
categories: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
65
|
+
}
|
|
66
|
+
}"
|
|
67
|
+
/>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Pie Chart
|
|
71
|
+
|
|
72
|
+
```markup
|
|
73
|
+
<AwChart
|
|
74
|
+
:options="{
|
|
75
|
+
series: [44, 55, 13, 43, 22],
|
|
76
|
+
chart: {
|
|
77
|
+
type: 'pie'
|
|
78
|
+
},
|
|
79
|
+
labels: ['Team A', 'Team B', 'Team C', 'Team D', 'Team E']
|
|
80
|
+
}"
|
|
81
|
+
/>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### With Custom Library Version
|
|
85
|
+
|
|
86
|
+
```markup
|
|
87
|
+
<AwChart
|
|
88
|
+
:options="chartOptions"
|
|
89
|
+
lib-version="3.35.0"
|
|
90
|
+
/>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## API
|
|
94
|
+
|
|
95
|
+
### Props
|
|
96
|
+
|
|
97
|
+
| Name | Description | Type | Required | Default |
|
|
98
|
+
|------|-------------|------|----------|---------|
|
|
99
|
+
| options | ApexCharts configuration object | `Object` | `true` | - |
|
|
100
|
+
| libVersion | ApexCharts library version | `String` | `false` | `'latest'` |
|
|
101
|
+
|
|
102
|
+
**Options Object:**
|
|
103
|
+
See [ApexCharts Documentation](https://apexcharts.com/docs/) for complete options reference.
|
|
104
|
+
|
|
105
|
+
**Required Options:**
|
|
106
|
+
```javascript
|
|
107
|
+
{
|
|
108
|
+
series: [{ // Required: data series
|
|
109
|
+
name: 'Series 1',
|
|
110
|
+
data: [1, 2, 3, 4, 5]
|
|
111
|
+
}],
|
|
112
|
+
chart: {
|
|
113
|
+
type: 'line' // Chart type: line, bar, pie, etc.
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Slots
|
|
119
|
+
|
|
120
|
+
This component does not have slots.
|
|
121
|
+
|
|
122
|
+
### Events
|
|
123
|
+
|
|
124
|
+
This component does not emit custom events.
|
|
125
|
+
|
|
126
|
+
### Config Options
|
|
127
|
+
|
|
128
|
+
The component uses default configuration from `@AwConfig`. You can override these defaults in your project's `awes.config.js`:
|
|
129
|
+
|
|
130
|
+
```javascript
|
|
131
|
+
export default {
|
|
132
|
+
AwChart: {
|
|
133
|
+
libVersion: 'latest' // ApexCharts library version
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Related Components
|
|
139
|
+
|
|
140
|
+
- Dashboard components (AwDashboardLine, AwDashboardDonut, etc.) - Pre-configured chart components
|
|
141
|
+
|
|
142
|
+
## Notes
|
|
143
|
+
|
|
144
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
145
|
+
- Uses ApexCharts.js library (not Chart.js)
|
|
146
|
+
- Library is loaded dynamically from CDN (jsdelivr)
|
|
147
|
+
- Chart automatically updates when `options` prop changes
|
|
148
|
+
- Chart is destroyed on component destroy
|
|
149
|
+
- Chart is destroyed on route navigation
|
|
150
|
+
- `series` property is required in options
|
|
151
|
+
- See [ApexCharts documentation](https://apexcharts.com/docs/) for all chart types and options
|
|
152
|
+
- Library version can be specified (defaults to 'latest')
|
|
153
|
+
- Uses `loadjs` for dynamic script loading
|
|
154
|
+
- Chart instance is stored internally and can be accessed via ref (not recommended)
|