@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.
Files changed (239) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/assets/css/components/_index.css +7 -1
  3. package/assets/css/components/animation.css +38 -32
  4. package/assets/css/components/content-placeholder.css +103 -0
  5. package/assets/css/components/empty-container.css +69 -1
  6. package/assets/css/components/filter-chosen.css +6 -0
  7. package/assets/css/components/filter-date-range.css +17 -1
  8. package/assets/css/components/filter-month.css +23 -17
  9. package/assets/css/components/filter-select.css +11 -0
  10. package/assets/css/components/layout.css +1 -32
  11. package/assets/css/components/modal.css +1 -1
  12. package/assets/css/components/number.css +12 -0
  13. package/assets/css/components/page-aside.css +54 -0
  14. package/assets/js/css.js +1 -1
  15. package/assets/js/icons/mono.js +59 -91
  16. package/assets/js/icons/multicolor.js +1 -31
  17. package/components/1_atoms/AwContentPlaceholder.vue +60 -0
  18. package/components/1_atoms/AwFlow.vue +21 -48
  19. package/components/1_atoms/AwLabel.vue +1 -1
  20. package/components/2_molecules/AwButton.vue +1 -1
  21. package/components/2_molecules/AwEmptyContainer.vue +74 -72
  22. package/components/2_molecules/AwNumber.vue +180 -0
  23. package/components/2_molecules/AwSelect.vue +11 -4
  24. package/components/3_organisms/AwFilterChosen.vue +73 -0
  25. package/components/3_organisms/AwFilterDateRange.vue +177 -0
  26. package/components/3_organisms/AwFilterMonth.vue +37 -40
  27. package/components/3_organisms/AwFilterSelect.vue +368 -0
  28. package/components/3_organisms/AwImageUpload.vue +1 -1
  29. package/components/3_organisms/AwMarkdownEditor.vue +0 -0
  30. package/components/3_organisms/AwMultiBlockBuilder.vue +1 -1
  31. package/components/3_organisms/AwTable/AwTableBuilder.vue +12 -60
  32. package/components/4_pages/AwPageAside.vue +108 -0
  33. package/components/5_layouts/AwLayoutCenter.vue +3 -8
  34. package/components/5_layouts/_AwUserMenu.vue +1 -1
  35. package/dist/css/aw-icons.css +26 -0
  36. package/dist/fonts/aw-icons.svg +18 -0
  37. package/dist/fonts/aw-icons.ttf +0 -0
  38. package/dist/fonts/aw-icons.woff +0 -0
  39. package/dist/fonts/aw-icons.woff2 +0 -0
  40. package/docs/_template.md +80 -0
  41. package/docs/components/atoms/aw-accordion-fold.md +91 -0
  42. package/docs/components/atoms/aw-action-card-body.md +67 -0
  43. package/docs/components/atoms/aw-action-card.md +94 -0
  44. package/docs/components/atoms/aw-action-icon.md +88 -0
  45. package/docs/components/atoms/aw-avatar.md +106 -0
  46. package/docs/components/atoms/aw-card.md +112 -0
  47. package/docs/components/atoms/aw-checkbox.md +112 -0
  48. package/docs/components/atoms/aw-content-placeholder.md +116 -0
  49. package/docs/components/atoms/aw-description.md +83 -0
  50. package/docs/components/atoms/aw-dock.md +84 -0
  51. package/docs/components/atoms/aw-dropdown-button.md +94 -0
  52. package/docs/components/atoms/aw-dropdown.md +128 -0
  53. package/docs/components/atoms/aw-file.md +73 -0
  54. package/docs/components/atoms/aw-flow.md +92 -0
  55. package/docs/components/atoms/aw-grid.md +91 -0
  56. package/docs/components/atoms/aw-headline.md +71 -0
  57. package/docs/components/atoms/aw-icon-system-color.md +121 -0
  58. package/docs/components/atoms/aw-icon-system-mono.md +205 -0
  59. package/docs/components/atoms/aw-icon.md +235 -0
  60. package/docs/components/atoms/aw-info.md +85 -0
  61. package/docs/components/atoms/aw-input.md +120 -0
  62. package/docs/components/atoms/aw-label.md +83 -0
  63. package/docs/components/atoms/aw-link.md +99 -0
  64. package/docs/components/atoms/aw-list.md +88 -0
  65. package/docs/components/atoms/aw-progress.md +70 -0
  66. package/docs/components/atoms/aw-radio.md +109 -0
  67. package/docs/components/atoms/aw-refresh-wrapper.md +81 -0
  68. package/docs/components/atoms/aw-select-native.md +106 -0
  69. package/docs/components/atoms/aw-slider.md +82 -0
  70. package/docs/components/atoms/aw-sub-headline.md +73 -0
  71. package/docs/components/atoms/aw-switcher.md +115 -0
  72. package/docs/components/atoms/aw-tag.md +80 -0
  73. package/docs/components/atoms/aw-title.md +70 -0
  74. package/docs/components/atoms/aw-toggler.md +69 -0
  75. package/docs/components/layouts/aw-layout-center.md +168 -0
  76. package/docs/components/layouts/aw-layout-error.md +153 -0
  77. package/docs/components/layouts/aw-layout-provider.md +238 -0
  78. package/docs/components/layouts/aw-layout.md +88 -0
  79. package/docs/components/molecules/aw-action-button.md +91 -0
  80. package/docs/components/molecules/aw-alert.md +96 -0
  81. package/docs/components/molecules/aw-badge.md +108 -0
  82. package/docs/components/molecules/aw-banner-text.md +90 -0
  83. package/docs/components/molecules/aw-button-nav.md +46 -0
  84. package/docs/components/molecules/aw-button.md +123 -0
  85. package/docs/components/molecules/aw-description-input.md +67 -0
  86. package/docs/components/molecules/aw-empty-container.md +86 -0
  87. package/docs/components/molecules/aw-island.md +234 -0
  88. package/docs/components/molecules/aw-number.md +138 -0
  89. package/docs/components/molecules/aw-select-object.md +401 -0
  90. package/docs/components/molecules/aw-select.md +215 -0
  91. package/docs/components/molecules/aw-tab-nav.md +108 -0
  92. package/docs/components/molecules/aw-tel.md +129 -0
  93. package/docs/components/molecules/aw-textarea.md +83 -0
  94. package/docs/components/molecules/aw-userpic.md +115 -0
  95. package/docs/components/organisms/aw-address-block.md +64 -0
  96. package/docs/components/organisms/aw-address.md +132 -0
  97. package/docs/components/organisms/aw-birthday-picker.md +73 -0
  98. package/docs/components/organisms/aw-bottom-bar.md +66 -0
  99. package/docs/components/organisms/aw-calendar-days.md +115 -0
  100. package/docs/components/organisms/aw-calendar-nav.md +98 -0
  101. package/docs/components/organisms/aw-calendar-view.md +98 -0
  102. package/docs/components/organisms/aw-calendar.md +166 -0
  103. package/docs/components/organisms/aw-chart.md +154 -0
  104. package/docs/components/organisms/aw-chip-select.md +164 -0
  105. package/docs/components/organisms/aw-chip.md +126 -0
  106. package/docs/components/organisms/aw-code-snippet.md +94 -0
  107. package/docs/components/organisms/aw-code.md +132 -0
  108. package/docs/components/organisms/aw-context-menu.md +117 -0
  109. package/docs/components/organisms/aw-cropper.md +151 -0
  110. package/docs/components/organisms/aw-date.md +161 -0
  111. package/docs/components/organisms/aw-display-date.md +33 -0
  112. package/docs/components/organisms/aw-download-link.md +46 -0
  113. package/docs/components/organisms/aw-fetch-data.md +161 -0
  114. package/docs/components/organisms/aw-filter-chosen.md +226 -0
  115. package/docs/components/organisms/aw-filter-date-range.md +205 -0
  116. package/docs/components/organisms/aw-filter-month.md +43 -0
  117. package/docs/components/organisms/aw-filter-select.md +225 -0
  118. package/docs/components/organisms/aw-form.md +174 -0
  119. package/docs/components/organisms/aw-gmap-marker.md +86 -0
  120. package/docs/components/organisms/aw-gmap.md +90 -0
  121. package/docs/components/organisms/aw-image-upload.md +56 -0
  122. package/docs/components/organisms/aw-island-avatar.md +87 -0
  123. package/docs/components/organisms/aw-markdown-editor.md +104 -0
  124. package/docs/components/organisms/aw-modal-buttons.md +57 -0
  125. package/docs/components/organisms/aw-modal.md +246 -0
  126. package/docs/components/organisms/aw-model-edit.md +74 -0
  127. package/docs/components/organisms/aw-money.md +53 -0
  128. package/docs/components/organisms/aw-multi-block-builder.md +165 -0
  129. package/docs/components/organisms/aw-pagination.md +121 -0
  130. package/docs/components/organisms/aw-password.md +103 -0
  131. package/docs/components/organisms/aw-preview-card.md +45 -0
  132. package/docs/components/organisms/aw-search.md +116 -0
  133. package/docs/components/organisms/aw-subnav.md +122 -0
  134. package/docs/components/organisms/aw-table-builder.md +165 -0
  135. package/docs/components/organisms/aw-table-col.md +123 -0
  136. package/docs/components/organisms/aw-table-head.md +92 -0
  137. package/docs/components/organisms/aw-table-row.md +91 -0
  138. package/docs/components/organisms/aw-table.md +172 -0
  139. package/docs/components/organisms/aw-tags.md +54 -0
  140. package/docs/components/organisms/aw-toggle-show-aside.md +43 -0
  141. package/docs/components/organisms/aw-uploader-files.md +125 -0
  142. package/docs/components/organisms/aw-uploader.md +163 -0
  143. package/docs/components/organisms/aw-user-menu.md +87 -0
  144. package/docs/components/pages/aw-page-aside.md +296 -0
  145. package/docs/components/pages/aw-page-menu-buttons.md +172 -0
  146. package/docs/components/pages/aw-page-modal.md +198 -0
  147. package/docs/components/pages/aw-page-single.md +253 -0
  148. package/docs/components/pages/aw-page.md +194 -0
  149. package/docs/configuration.md +493 -0
  150. package/docs/cookbook/advanced-patterns.md +1388 -0
  151. package/docs/cookbook/common-patterns.md +965 -0
  152. package/docs/cookbook/index.md +786 -0
  153. package/docs/getting-started.md +596 -0
  154. package/docs/guides/best-practices.md +1106 -0
  155. package/docs/guides/data-fetching.md +852 -0
  156. package/docs/guides/error-handling.md +1172 -0
  157. package/docs/guides/forms-guide.md +1329 -0
  158. package/docs/guides/mobile-subnavigation.md +359 -0
  159. package/docs/guides/page-patterns/aside-pages.md +1418 -0
  160. package/docs/guides/page-patterns/dashboard-pages.md +990 -0
  161. package/docs/guides/page-patterns/detail-pages.md +1493 -0
  162. package/docs/guides/page-patterns/list-pages.md +1094 -0
  163. package/docs/index.md +263 -1
  164. package/docs/integrations.md +870 -0
  165. package/docs/reference/menu.md +462 -0
  166. package/docs/reference/plugins.md +970 -0
  167. package/docs/reference/troubleshooting.md +945 -0
  168. package/nuxt/awes.config.js +9 -8
  169. package/nuxt/icons.css +26 -0
  170. package/nuxt/index.js +2 -2
  171. package/nuxt/pages/more.vue +1 -1
  172. package/package.json +5 -3
  173. package/readme.md +171 -1
  174. package/docs/aw-accordion-fold.md +0 -46
  175. package/docs/aw-address.md +0 -44
  176. package/docs/aw-avatar.md +0 -51
  177. package/docs/aw-badge.md +0 -32
  178. package/docs/aw-button-nav.md +0 -44
  179. package/docs/aw-button.md +0 -50
  180. package/docs/aw-calendar-days.md +0 -46
  181. package/docs/aw-calendar-nav.md +0 -25
  182. package/docs/aw-calendar-view.md +0 -12
  183. package/docs/aw-calendar.md +0 -59
  184. package/docs/aw-card.md +0 -48
  185. package/docs/aw-chart.md +0 -51
  186. package/docs/aw-checkbox.md +0 -56
  187. package/docs/aw-chip-select.md +0 -46
  188. package/docs/aw-chip.md +0 -53
  189. package/docs/aw-code-snippet.md +0 -18
  190. package/docs/aw-code.md +0 -56
  191. package/docs/aw-content-wrapper.md +0 -40
  192. package/docs/aw-context-menu.md +0 -31
  193. package/docs/aw-cropper.md +0 -60
  194. package/docs/aw-dashboard-card.md +0 -37
  195. package/docs/aw-dashboard-donut.md +0 -30
  196. package/docs/aw-dashboard-line.md +0 -20
  197. package/docs/aw-dashboard-progress.md +0 -33
  198. package/docs/aw-dashboard-section.md +0 -32
  199. package/docs/aw-dashboard-speed.md +0 -30
  200. package/docs/aw-date.md +0 -52
  201. package/docs/aw-dropdown-button.md +0 -31
  202. package/docs/aw-dropdown.md +0 -69
  203. package/docs/aw-fetch-data.md +0 -45
  204. package/docs/aw-form.md +0 -52
  205. package/docs/aw-grid.md +0 -48
  206. package/docs/aw-icon.md +0 -50
  207. package/docs/aw-info.md +0 -53
  208. package/docs/aw-input.md +0 -55
  209. package/docs/aw-layout-default.md +0 -30
  210. package/docs/aw-layout-frame-center.md +0 -29
  211. package/docs/aw-layout-simple.md +0 -49
  212. package/docs/aw-link.md +0 -54
  213. package/docs/aw-markdown-editor.md +0 -51
  214. package/docs/aw-modal.md +0 -63
  215. package/docs/aw-multi-block-builder.md +0 -66
  216. package/docs/aw-page.md +0 -36
  217. package/docs/aw-pagination.md +0 -54
  218. package/docs/aw-password.md +0 -48
  219. package/docs/aw-radio.md +0 -54
  220. package/docs/aw-search.md +0 -49
  221. package/docs/aw-select.md +0 -93
  222. package/docs/aw-slider.md +0 -40
  223. package/docs/aw-svg-image.md +0 -19
  224. package/docs/aw-switcher.md +0 -51
  225. package/docs/aw-tab-nav.md +0 -55
  226. package/docs/aw-table-builder.md +0 -58
  227. package/docs/aw-table-col.md +0 -33
  228. package/docs/aw-table-head.md +0 -28
  229. package/docs/aw-table-row.md +0 -33
  230. package/docs/aw-table.md +0 -59
  231. package/docs/aw-tel.md +0 -47
  232. package/docs/aw-textarea.md +0 -47
  233. package/docs/aw-timeline-builder.md +0 -50
  234. package/docs/aw-toggler.md +0 -41
  235. package/docs/aw-uploader-files.md +0 -20
  236. package/docs/aw-uploader.md +0 -60
  237. package/docs/aw-user-menu.md +0 -34
  238. package/docs/aw-userpic.md +0 -34
  239. /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 &lt;AwChip /&gt; 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 &lt;AwCodeSnippet /&gt; 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 &lt;AwCode /&gt; 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 &lt;AwContextMenu /&gt; 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