@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,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: ChipSelect component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwChipSelect /> component is used to render ChipSelect - UI Vue component for AwesCode UI.
|
|
6
|
+
title: ChipSelect
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwChipSelect
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwChipSelect` component is a select dropdown that displays the selected value as a chip and shows options in a dropdown menu. It's designed for selecting from a list of chip-style options.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwChipSelect` provides a chip-based select solution with:
|
|
18
|
+
- Chip display for selected value
|
|
19
|
+
- Dropdown menu with chip options
|
|
20
|
+
- Loading state support
|
|
21
|
+
- Readonly/disabled states
|
|
22
|
+
- Keyboard navigation
|
|
23
|
+
- Custom option rendering
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
### Basic Example
|
|
28
|
+
|
|
29
|
+
```markup
|
|
30
|
+
<AwChipSelect
|
|
31
|
+
v-model="selected"
|
|
32
|
+
:options="[
|
|
33
|
+
{ id: 1, text: 'Option 1', color: 'success' },
|
|
34
|
+
{ id: 2, text: 'Option 2', color: 'error' },
|
|
35
|
+
{ id: 3, text: 'Option 3', color: 'accent' }
|
|
36
|
+
]"
|
|
37
|
+
/>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### With Loading State
|
|
41
|
+
|
|
42
|
+
```markup
|
|
43
|
+
<AwChipSelect
|
|
44
|
+
v-model="selected"
|
|
45
|
+
:options="options"
|
|
46
|
+
:loading="isLoading"
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Readonly Mode
|
|
51
|
+
|
|
52
|
+
```markup
|
|
53
|
+
<AwChipSelect
|
|
54
|
+
v-model="selected"
|
|
55
|
+
:options="options"
|
|
56
|
+
readonly
|
|
57
|
+
/>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Without Text (Icon Only)
|
|
61
|
+
|
|
62
|
+
```markup
|
|
63
|
+
<AwChipSelect
|
|
64
|
+
v-model="selected"
|
|
65
|
+
:options="options"
|
|
66
|
+
no-text
|
|
67
|
+
/>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Filled Style
|
|
71
|
+
|
|
72
|
+
```markup
|
|
73
|
+
<AwChipSelect
|
|
74
|
+
v-model="selected"
|
|
75
|
+
:options="options"
|
|
76
|
+
filled
|
|
77
|
+
/>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Custom Selected Display
|
|
81
|
+
|
|
82
|
+
```markup
|
|
83
|
+
<AwChipSelect v-model="selected" :options="options">
|
|
84
|
+
<template #selected="{ selected }">
|
|
85
|
+
<AwChip :text="selected.text" :color="selected.color">
|
|
86
|
+
<template #right>
|
|
87
|
+
<AwBadge :text="selected.count" />
|
|
88
|
+
</template>
|
|
89
|
+
</AwChip>
|
|
90
|
+
</template>
|
|
91
|
+
</AwChipSelect>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Custom Option Display
|
|
95
|
+
|
|
96
|
+
```markup
|
|
97
|
+
<AwChipSelect v-model="selected" :options="options">
|
|
98
|
+
<template #option="{ id, text, color, select }">
|
|
99
|
+
<AwChip :text="text" :color="color" @click="select(id)">
|
|
100
|
+
Custom option
|
|
101
|
+
</AwChip>
|
|
102
|
+
</template>
|
|
103
|
+
</AwChipSelect>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## API
|
|
107
|
+
|
|
108
|
+
### Props
|
|
109
|
+
|
|
110
|
+
| Name | Description | Type | Required | Default |
|
|
111
|
+
|------|-------------|------|----------|---------|
|
|
112
|
+
| value | Selected option ID | `Number` / `String` | `false` | `null` |
|
|
113
|
+
| options | Array of option objects | `Array` | `true` | - |
|
|
114
|
+
| readonly | Prevent selection changes | `Boolean` | `false` | `false` |
|
|
115
|
+
| disabled | Disable the component | `Boolean` | `false` | `false` |
|
|
116
|
+
| loading | Show loading spinner | `Boolean` | `false` | `false` |
|
|
117
|
+
| noText | Hide text in selected chip | `Boolean` | `false` | `false` |
|
|
118
|
+
| filled | Use filled chip style | `Boolean` | `false` | `false` |
|
|
119
|
+
|
|
120
|
+
**Option Object Format:**
|
|
121
|
+
```javascript
|
|
122
|
+
{
|
|
123
|
+
id: 1, // Required: unique identifier
|
|
124
|
+
text: 'Option 1', // Optional: display text
|
|
125
|
+
color: 'success', // Optional: chip color
|
|
126
|
+
icon: 'awesio/check', // Optional: icon name
|
|
127
|
+
// ... other chip props
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Slots
|
|
132
|
+
|
|
133
|
+
| Name | Description | Props | Default Slot Content |
|
|
134
|
+
|------|-------------|-------|---------------------|
|
|
135
|
+
| selected | Custom selected chip display | `{ selected }` | Default chip with selected option |
|
|
136
|
+
| option | Custom option chip display | `{ id, text, ...props, index, select }` | Default chip with option data |
|
|
137
|
+
|
|
138
|
+
### Events
|
|
139
|
+
|
|
140
|
+
| Name | Payload | Description |
|
|
141
|
+
|------|---------|-------------|
|
|
142
|
+
| input | `Number` / `String` | Emitted when option is selected (option ID) |
|
|
143
|
+
|
|
144
|
+
### Mixins
|
|
145
|
+
|
|
146
|
+
- `arrowFocusMixin` - Provides keyboard navigation support
|
|
147
|
+
|
|
148
|
+
## Related Components
|
|
149
|
+
|
|
150
|
+
- `AwChip` - Chip component used for display
|
|
151
|
+
- `AwDropdown` - Dropdown component for menu
|
|
152
|
+
- `AwDropdownButton` - Dropdown button component
|
|
153
|
+
|
|
154
|
+
## Notes
|
|
155
|
+
|
|
156
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
157
|
+
- Options array must contain objects with `id` property
|
|
158
|
+
- Selected option is found by matching `id` with `value`
|
|
159
|
+
- When `noText` is true, text is omitted from selected chip
|
|
160
|
+
- Loading state shows spinner in chip
|
|
161
|
+
- Dropdown closes when component is disabled/readonly
|
|
162
|
+
- Keyboard navigation: Arrow keys to navigate, Enter to select
|
|
163
|
+
- Component uses `AwDropdown` with custom positioning
|
|
164
|
+
- All chip props can be passed in option objects
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Chip component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwChip /> component is used to render Chip - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Chip
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwChip
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwChip` component is a small, compact element used to display labels, tags, or status indicators. It supports icons, images, colors, and custom content slots.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwChip` provides a flexible chip/tag component with:
|
|
18
|
+
- Icon or image decoration
|
|
19
|
+
- Color customization
|
|
20
|
+
- Filled or outlined styles
|
|
21
|
+
- Loading/rotation animation support
|
|
22
|
+
- Custom slot support for flexible content
|
|
23
|
+
- Functional component for optimal performance
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
### Basic Example
|
|
28
|
+
|
|
29
|
+
```markup
|
|
30
|
+
<AwChip text="Label" />
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### With Icon
|
|
34
|
+
|
|
35
|
+
```markup
|
|
36
|
+
<AwChip text="Active" icon="awesio/check" color="success" />
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### With Image
|
|
40
|
+
|
|
41
|
+
```markup
|
|
42
|
+
<AwChip text="User" image="/path/to/avatar.jpg" />
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Filled Style
|
|
46
|
+
|
|
47
|
+
```markup
|
|
48
|
+
<AwChip text="Tag" color="accent" filled />
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### With Loading Animation
|
|
52
|
+
|
|
53
|
+
```markup
|
|
54
|
+
<AwChip text="Processing" icon="progress" :rotate="true" />
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Custom Content
|
|
58
|
+
|
|
59
|
+
```markup
|
|
60
|
+
<AwChip>
|
|
61
|
+
<template #left>
|
|
62
|
+
<AwIcon name="star" />
|
|
63
|
+
</template>
|
|
64
|
+
Custom content
|
|
65
|
+
<template #right>
|
|
66
|
+
<AwButton theme="icon" @click="remove">×</AwButton>
|
|
67
|
+
</template>
|
|
68
|
+
</AwChip>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## API
|
|
72
|
+
|
|
73
|
+
### Props
|
|
74
|
+
|
|
75
|
+
| Name | Description | Type | Required | Default |
|
|
76
|
+
|------|-------------|------|----------|---------|
|
|
77
|
+
| text | Text label | `String` | `false` | `''` |
|
|
78
|
+
| icon | Icon name to render in decor element | `String` | `false` | `''` |
|
|
79
|
+
| color | Border, icon and close icon color | `String` | `false` | `''` |
|
|
80
|
+
| image | Decor element background image URL | `String` | `false` | `''` |
|
|
81
|
+
| filled | Indicates if chip has filled background | `Boolean` | `false` | `false` |
|
|
82
|
+
| rotate | Toggles rotate animation (for loading icons) | `Boolean` | `false` | `false` |
|
|
83
|
+
|
|
84
|
+
**Color Options:** Any valid color class (e.g., `'success'`, `'error'`, `'accent'`, `'mono'`)
|
|
85
|
+
|
|
86
|
+
### Slots
|
|
87
|
+
|
|
88
|
+
| Name | Description | Props | Default Slot Content |
|
|
89
|
+
|------|-------------|-------|---------------------|
|
|
90
|
+
| default | Text content | - | Text prop value |
|
|
91
|
+
| left | Content on the left side of text | - | Decor element (icon/image) |
|
|
92
|
+
| center | Text wrapper | - | Text span |
|
|
93
|
+
| right | Content on the right side of text | - | - |
|
|
94
|
+
|
|
95
|
+
### Events
|
|
96
|
+
|
|
97
|
+
This component does not emit any events (functional component).
|
|
98
|
+
|
|
99
|
+
### Config Options
|
|
100
|
+
|
|
101
|
+
The component has internal config for icon rotation:
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
{
|
|
105
|
+
progress: {
|
|
106
|
+
rotate: true // Auto-rotate progress icons
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Related Components
|
|
112
|
+
|
|
113
|
+
- `AwIcon` - Icon component used in chip decor
|
|
114
|
+
- `AwIconSystemMono` - System icon component
|
|
115
|
+
- `AwBadge` - Badge component (similar use case)
|
|
116
|
+
|
|
117
|
+
## Notes
|
|
118
|
+
|
|
119
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
120
|
+
- Component is functional (stateless) for optimal performance
|
|
121
|
+
- Icons are automatically detected as system icons (mono) or regular icons
|
|
122
|
+
- When `image` is provided, it's used as background image for decor element
|
|
123
|
+
- `filled` prop changes background color instead of border color
|
|
124
|
+
- Rotation animation is useful for loading states (e.g., progress spinner)
|
|
125
|
+
- Default slot content replaces `text` prop if provided
|
|
126
|
+
- Color classes follow Tailwind CSS naming convention
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Code Snippet component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwCodeSnippet /> component is used to render Code Snippet - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Code Snippet
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwCodeSnippet
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwCodeSnippet` component displays syntax-highlighted code with a copy-to-clipboard button. It uses Prism.js for syntax highlighting and supports multiple programming languages.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwCodeSnippet` provides a code display solution with:
|
|
18
|
+
- Syntax highlighting via Prism.js
|
|
19
|
+
- Copy-to-clipboard functionality
|
|
20
|
+
- Multiple language support
|
|
21
|
+
- Scrollable code blocks
|
|
22
|
+
- Functional component for optimal performance
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Basic Example
|
|
27
|
+
|
|
28
|
+
```markup
|
|
29
|
+
<AwCodeSnippet code="const x = 1;" language="javascript" />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Vue Template
|
|
33
|
+
|
|
34
|
+
```markup
|
|
35
|
+
<AwCodeSnippet
|
|
36
|
+
:code="vueCode"
|
|
37
|
+
language="markup"
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### JavaScript
|
|
42
|
+
|
|
43
|
+
```markup
|
|
44
|
+
<AwCodeSnippet
|
|
45
|
+
code="function hello() { console.log('Hello'); }"
|
|
46
|
+
language="javascript"
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### CSS
|
|
51
|
+
|
|
52
|
+
```markup
|
|
53
|
+
<AwCodeSnippet
|
|
54
|
+
code=".class { color: red; }"
|
|
55
|
+
language="css"
|
|
56
|
+
/>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## API
|
|
60
|
+
|
|
61
|
+
### Props
|
|
62
|
+
|
|
63
|
+
| Name | Description | Type | Required | Default |
|
|
64
|
+
|------|-------------|------|----------|---------|
|
|
65
|
+
| code | Code content to display | `String` | `false` | `''` |
|
|
66
|
+
| language | Programming language for syntax highlighting | `String` | `false` | `'markup'` |
|
|
67
|
+
|
|
68
|
+
**Supported Languages:**
|
|
69
|
+
All Prism.js supported languages (markup, css, javascript, json, python, php, etc.)
|
|
70
|
+
|
|
71
|
+
### Slots
|
|
72
|
+
|
|
73
|
+
This component does not have slots (functional component).
|
|
74
|
+
|
|
75
|
+
### Events
|
|
76
|
+
|
|
77
|
+
This component does not emit events (functional component).
|
|
78
|
+
|
|
79
|
+
## Related Components
|
|
80
|
+
|
|
81
|
+
- `AwCode` - Code input component (different use case)
|
|
82
|
+
- `AwButton` - Button component used for copy button
|
|
83
|
+
|
|
84
|
+
## Notes
|
|
85
|
+
|
|
86
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
87
|
+
- Component is functional (stateless) for optimal performance
|
|
88
|
+
- Uses Prism.js for syntax highlighting
|
|
89
|
+
- Copy button uses `clipboard-copy` library
|
|
90
|
+
- Code is wrapped in `<pre><code>` elements
|
|
91
|
+
- Language class is applied to code element (`language-{language}`)
|
|
92
|
+
- Copy button is positioned absolutely in top-right corner
|
|
93
|
+
- Component handles Prism.js errors gracefully
|
|
94
|
+
- Code block is scrollable when content overflows
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: Code component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwCode /> component is used to render Code - UI Vue component for AwesCode UI.
|
|
6
|
+
title: Code
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwCode
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwCode` component is a multi-field code input component designed for entering verification codes, PINs, or other structured numeric codes. It displays multiple input fields based on a pattern and handles automatic focus management.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwCode` provides a code input solution with:
|
|
18
|
+
- Pattern-based field layout (e.g., `'XXXX-XX'`)
|
|
19
|
+
- Automatic focus navigation between fields
|
|
20
|
+
- Paste support for complete codes
|
|
21
|
+
- Error handling and validation
|
|
22
|
+
- Compact mode for smaller displays
|
|
23
|
+
- Numeric input only
|
|
24
|
+
- Auto-advance on input
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### Basic Example
|
|
29
|
+
|
|
30
|
+
```markup
|
|
31
|
+
<AwCode pattern="XXXXXX" v-model="code" />
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### With Separator
|
|
35
|
+
|
|
36
|
+
```markup
|
|
37
|
+
<AwCode pattern="XXXX-XX" v-model="code" />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Compact Mode
|
|
41
|
+
|
|
42
|
+
```markup
|
|
43
|
+
<AwCode pattern="XXXXXX" v-model="code" compact />
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### With Error
|
|
47
|
+
|
|
48
|
+
```markup
|
|
49
|
+
<AwCode
|
|
50
|
+
pattern="XXXXXX"
|
|
51
|
+
v-model="code"
|
|
52
|
+
:error="codeError"
|
|
53
|
+
/>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### With Validation
|
|
57
|
+
|
|
58
|
+
```markup
|
|
59
|
+
<AwCode
|
|
60
|
+
pattern="XXXXXX"
|
|
61
|
+
v-model="code"
|
|
62
|
+
@change="validateCode"
|
|
63
|
+
/>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## API
|
|
67
|
+
|
|
68
|
+
### Props
|
|
69
|
+
|
|
70
|
+
| Name | Description | Type | Required | Default |
|
|
71
|
+
|------|-------------|------|----------|---------|
|
|
72
|
+
| pattern | Pattern string (X = input field, - = separator) | `String` | `false` | `'XXXXXX'` |
|
|
73
|
+
| compact | Enable compact mode (smaller fields) | `Boolean` | `false` | `true` |
|
|
74
|
+
| className | Custom CSS class | `String` | `false` | `'aw-text-field'` |
|
|
75
|
+
| value | Input value (v-model) | `String` | `false` | `''` |
|
|
76
|
+
| disabled | Disable all fields | `Boolean` | `false` | `false` |
|
|
77
|
+
| error | Error message to display | `String` | `false` | `''` |
|
|
78
|
+
|
|
79
|
+
**Pattern Format:**
|
|
80
|
+
- `X` = Input field (numeric)
|
|
81
|
+
- `-` = Separator (displayed as dash, not input)
|
|
82
|
+
- Example: `'XXXX-XX'` creates 4 fields, dash, 2 fields
|
|
83
|
+
|
|
84
|
+
### Slots
|
|
85
|
+
|
|
86
|
+
| Name | Description | Props | Default Slot Content |
|
|
87
|
+
|------|-------------|-------|---------------------|
|
|
88
|
+
| error | Custom error display | - | Default error tooltip |
|
|
89
|
+
|
|
90
|
+
### Events
|
|
91
|
+
|
|
92
|
+
| Name | Payload | Description |
|
|
93
|
+
|------|---------|-------------|
|
|
94
|
+
| input | `String` | Emitted on each field input (clean value without separators) |
|
|
95
|
+
| change | `String` | Emitted when all fields are filled (complete code) |
|
|
96
|
+
| focus | `Event` | Emitted when component receives focus |
|
|
97
|
+
| invalid | `Event` | Emitted on validation error |
|
|
98
|
+
|
|
99
|
+
### Config Options
|
|
100
|
+
|
|
101
|
+
The component uses default configuration from `@AwConfig`. You can override these defaults in your project's `awes.config.js`:
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
export default {
|
|
105
|
+
AwCode: {
|
|
106
|
+
baseClass: 'aw-text-field',
|
|
107
|
+
pattern: 'XXXXXX',
|
|
108
|
+
compact: true
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Related Components
|
|
114
|
+
|
|
115
|
+
- `AwInput` - Single input field component
|
|
116
|
+
- `AwPassword` - Password input component
|
|
117
|
+
|
|
118
|
+
## Notes
|
|
119
|
+
|
|
120
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
121
|
+
- Only numeric input is accepted (digits 0-9)
|
|
122
|
+
- Separators (`-`) in pattern are displayed but not included in value
|
|
123
|
+
- Automatic focus moves to next field when current field is filled
|
|
124
|
+
- Paste support: paste complete code to fill all fields at once
|
|
125
|
+
- Backspace moves focus to previous field
|
|
126
|
+
- Arrow keys navigate between fields
|
|
127
|
+
- Error is displayed as tooltip on hover
|
|
128
|
+
- Uses `inputmode="numeric"` for mobile keyboard optimization
|
|
129
|
+
- Value is always clean (no separators) - pattern is only for display
|
|
130
|
+
- Component emits `change` only when all fields are complete
|
|
131
|
+
- Uses field mixin for standard field behavior
|
|
132
|
+
- Uses error mixin for error handling
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
metaTitle: ContextMenu component | AwesCode UI
|
|
3
|
+
meta:
|
|
4
|
+
- name: description
|
|
5
|
+
content: The <AwContextMenu /> component is used to render ContextMenu - UI Vue component for AwesCode UI.
|
|
6
|
+
title: ContextMenu
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AwContextMenu
|
|
10
|
+
|
|
11
|
+
**Category:** Organism | **Import:** Dynamic
|
|
12
|
+
|
|
13
|
+
The `AwContextMenu` component is a context menu that displays a dropdown list of menu items. It's built on top of `AwDropdown` and `AwButton`, providing a button trigger with a menu list.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
`AwContextMenu` provides a context menu solution with:
|
|
18
|
+
- Button trigger with optional text/icon
|
|
19
|
+
- Dropdown menu with list items
|
|
20
|
+
- Keyboard navigation support
|
|
21
|
+
- Popper.js positioning
|
|
22
|
+
- Customizable button appearance
|
|
23
|
+
- Vertical menu layout
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
### Basic Example
|
|
28
|
+
|
|
29
|
+
```markup
|
|
30
|
+
<AwContextMenu text="Menu">
|
|
31
|
+
<AwButton>Item 1</AwButton>
|
|
32
|
+
<AwButton>Item 2</AwButton>
|
|
33
|
+
<AwButton>Item 3</AwButton>
|
|
34
|
+
</AwContextMenu>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Icon Only
|
|
38
|
+
|
|
39
|
+
```markup
|
|
40
|
+
<AwContextMenu hide-text icon="awesio/more">
|
|
41
|
+
<AwButton>Item 1</AwButton>
|
|
42
|
+
<AwButton>Item 2</AwButton>
|
|
43
|
+
</AwContextMenu>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### With Custom Button
|
|
47
|
+
|
|
48
|
+
```markup
|
|
49
|
+
<AwContextMenu
|
|
50
|
+
text="Options"
|
|
51
|
+
color="accent"
|
|
52
|
+
button-class="custom-class"
|
|
53
|
+
>
|
|
54
|
+
<AwButton>Edit</AwButton>
|
|
55
|
+
<AwButton>Delete</AwButton>
|
|
56
|
+
</AwContextMenu>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### With Popper Options
|
|
60
|
+
|
|
61
|
+
```markup
|
|
62
|
+
<AwContextMenu
|
|
63
|
+
text="Menu"
|
|
64
|
+
:options="{ placement: 'bottom-end' }"
|
|
65
|
+
>
|
|
66
|
+
<AwButton>Item 1</AwButton>
|
|
67
|
+
<AwButton>Item 2</AwButton>
|
|
68
|
+
</AwContextMenu>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## API
|
|
72
|
+
|
|
73
|
+
### Props
|
|
74
|
+
|
|
75
|
+
| Name | Description | Type | Required | Default |
|
|
76
|
+
|------|-------------|------|----------|---------|
|
|
77
|
+
| text | Button text label | `String` | `false` | `''` |
|
|
78
|
+
| hideText | Hide button text (show icon only) | `Boolean` | `false` | `null` (auto) |
|
|
79
|
+
| color | Button color | `String` | `false` | `'mono'` |
|
|
80
|
+
| buttonClass | Additional CSS class for button | `String` | `false` | `''` |
|
|
81
|
+
| vertical | Vertical menu layout | `Boolean` | `false` | `false` |
|
|
82
|
+
| options | Popper.js options object | `Object` | `false` | `{}` |
|
|
83
|
+
|
|
84
|
+
**Popper.js Options:**
|
|
85
|
+
See [Popper.js documentation](https://popper.js.org/docs/v2/) for all available options.
|
|
86
|
+
|
|
87
|
+
### Slots
|
|
88
|
+
|
|
89
|
+
| Name | Description | Props | Default Slot Content |
|
|
90
|
+
|------|-------------|-------|---------------------|
|
|
91
|
+
| default | Menu items (should be button/link components) | - | - |
|
|
92
|
+
| icon | Custom button icon | - | Default icon |
|
|
93
|
+
|
|
94
|
+
### Events
|
|
95
|
+
|
|
96
|
+
This component does not emit custom events (uses internal state).
|
|
97
|
+
|
|
98
|
+
### Mixins
|
|
99
|
+
|
|
100
|
+
- `arrowFocusMixin` - Provides keyboard navigation support
|
|
101
|
+
|
|
102
|
+
## Related Components
|
|
103
|
+
|
|
104
|
+
- `AwDropdown` - Dropdown component used internally
|
|
105
|
+
- `AwButton` - Button component used for trigger and items
|
|
106
|
+
|
|
107
|
+
## Notes
|
|
108
|
+
|
|
109
|
+
- **Import Method:** Dynamic - Component is loaded on-demand as an organism
|
|
110
|
+
- Menu items should be button or link components
|
|
111
|
+
- Items automatically get `data-arrow-focus` attribute for keyboard navigation
|
|
112
|
+
- Button text is automatically hidden if `text` is empty and `hideText` is null
|
|
113
|
+
- Uses Popper.js for positioning (see Popper.js docs for options)
|
|
114
|
+
- Component is render-based (uses `render` function)
|
|
115
|
+
- Menu items are wrapped in `<li>` elements with `aw-cm-item` class
|
|
116
|
+
- Dropdown state is managed internally
|
|
117
|
+
- Keyboard navigation: Arrow keys to navigate, Enter to activate
|