@retailcrm/embed-ui-v1-components 0.9.19 → 0.9.22-alpha.1
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/AGENTS.md +9 -1
- package/README.md +5 -2
- package/assets/sprites/actions/add-square-outlined.svg +8 -0
- package/assets/sprites/actions/drag.svg +8 -0
- package/bin/embed-ui-v1-components.mjs +231 -46
- package/bin/postinstall.mjs +3 -2
- package/dist/host.cjs +1223 -501
- package/dist/host.css +637 -10
- package/dist/host.d.ts +152 -78
- package/dist/host.js +1224 -502
- package/dist/remote.cjs +1358 -298
- package/dist/remote.d.ts +805 -67
- package/dist/remote.js +1360 -300
- package/docs/AI.md +99 -17
- package/docs/COMPONENTS.md +58 -59
- package/docs/FORMAT.md +10 -10
- package/docs/PROFILES.md +39 -22
- package/docs/README.md +11 -5
- package/docs/profiles/components/UiAddButton.yml +134 -0
- package/docs/profiles/components/UiAlert.yml +105 -0
- package/docs/profiles/components/UiAvatar.yml +88 -0
- package/docs/profiles/{UiAvatarList.yml → components/UiAvatarList.yml} +26 -0
- package/docs/profiles/{UiButton.yml → components/UiButton.yml} +14 -8
- package/docs/profiles/components/UiCalendar.yml +190 -0
- package/docs/profiles/components/UiCheckbox.yml +111 -0
- package/docs/profiles/components/UiCollapse.yml +129 -0
- package/docs/profiles/components/UiCollapseBox.yml +143 -0
- package/docs/profiles/{UiCollapseGroup.yml → components/UiCollapseGroup.yml} +24 -0
- package/docs/profiles/components/UiCopyButton.yml +104 -0
- package/docs/profiles/components/UiDate.yml +84 -0
- package/docs/profiles/components/UiDatePicker.yml +138 -0
- package/docs/profiles/components/UiError.yml +123 -0
- package/docs/profiles/{UiField.yml → components/UiField.yml} +46 -15
- package/docs/profiles/components/UiInfobox.yml +130 -0
- package/docs/profiles/components/UiLink.yml +111 -0
- package/docs/profiles/components/UiLoader.yml +71 -0
- package/docs/profiles/components/UiMenuItem.yml +93 -0
- package/docs/profiles/{UiMenuItemGroup.yml → components/UiMenuItemGroup.yml} +25 -0
- package/docs/profiles/components/UiModalSidebar.yml +156 -0
- package/docs/profiles/components/UiModalWindow.yml +181 -0
- package/docs/profiles/{UiModalWindowSurface.yml → components/UiModalWindowSurface.yml} +30 -0
- package/docs/profiles/components/UiNumberStepper.yml +100 -0
- package/docs/profiles/{UiPageHeader.yml → components/UiPageHeader.yml} +39 -23
- package/docs/profiles/components/UiPopconfirm.yml +164 -0
- package/docs/profiles/{UiPopper.yml → components/UiPopper.yml} +66 -13
- package/docs/profiles/{UiPopperConnector.yml → components/UiPopperConnector.yml} +5 -25
- package/docs/profiles/{UiPopperTarget.yml → components/UiPopperTarget.yml} +5 -25
- package/docs/profiles/components/UiRadio.yml +91 -0
- package/docs/profiles/{UiRadioSwitch.yml → components/UiRadioSwitch.yml} +55 -32
- package/docs/profiles/{UiRadioSwitchOption.yml → components/UiRadioSwitchOption.yml} +7 -13
- package/docs/profiles/components/UiScrollBox.yml +108 -0
- package/docs/profiles/{UiSelect.yml → components/UiSelect.yml} +133 -44
- package/docs/profiles/components/UiSelectOption.yml +74 -0
- package/docs/profiles/components/UiSelectOptionGroup.yml +66 -0
- package/docs/profiles/components/UiSkeleton.yml +82 -0
- package/docs/profiles/components/UiSlider.yml +161 -0
- package/docs/profiles/components/UiSwitch.yml +123 -0
- package/docs/profiles/components/UiTab.yml +234 -0
- package/docs/profiles/{UiTabGroup.yml → components/UiTabGroup.yml} +0 -30
- package/docs/profiles/components/UiTable.yml +622 -0
- package/docs/profiles/{UiTableBodyCell.yml → components/UiTableBodyCell.yml} +26 -0
- package/docs/profiles/components/UiTableColumn.yml +87 -0
- package/docs/profiles/components/UiTableFooterButton.yml +85 -0
- package/docs/profiles/components/UiTableFooterSection.yml +73 -0
- package/docs/profiles/{UiTableHeadCell.yml → components/UiTableHeadCell.yml} +26 -0
- package/docs/profiles/{UiTableSorter.yml → components/UiTableSorter.yml} +27 -0
- package/docs/profiles/components/UiTag.yml +90 -0
- package/docs/profiles/{UiTextbox.yml → components/UiTextbox.yml} +20 -32
- package/docs/profiles/components/UiTimePicker.yml +144 -0
- package/docs/profiles/{UiToggleButton.yml → components/UiToggleButton.yml} +16 -11
- package/docs/profiles/{UiToggleGroup.yml → components/UiToggleGroup.yml} +25 -13
- package/docs/profiles/{UiToggleGroupOption.yml → components/UiToggleGroupOption.yml} +7 -11
- package/docs/profiles/components/UiToolbarButton.yml +87 -0
- package/docs/profiles/components/UiToolbarLink.yml +80 -0
- package/docs/profiles/components/UiTooltip.yml +97 -0
- package/docs/profiles/components/UiTransition.yml +62 -0
- package/docs/profiles/components/UiYandexMap.yml +104 -0
- package/docs/profiles/pages/CardSettingsPage.yml +58 -0
- package/docs/profiles/pages/CollapseBlockPage.yml +46 -0
- package/docs/profiles/pages/EntityListPage.yml +66 -0
- package/docs/profiles/pages/ModalSidebar.yml +158 -0
- package/docs/profiles/pages/ModalWindow.yml +55 -0
- package/docs/profiles/pages/MultiColumnPage.yml +27 -0
- package/docs/profiles/pages/PageComposition.yml +56 -0
- package/package.json +15 -15
- package/docs/profiles/UiAddButton.yml +0 -57
- package/docs/profiles/UiAlert.yml +0 -48
- package/docs/profiles/UiAvatar.yml +0 -48
- package/docs/profiles/UiCalendar.yml +0 -48
- package/docs/profiles/UiCheckbox.yml +0 -53
- package/docs/profiles/UiCollapse.yml +0 -40
- package/docs/profiles/UiCollapseBox.yml +0 -51
- package/docs/profiles/UiCopyButton.yml +0 -52
- package/docs/profiles/UiDate.yml +0 -38
- package/docs/profiles/UiDatePicker.yml +0 -59
- package/docs/profiles/UiError.yml +0 -32
- package/docs/profiles/UiImage.yml +0 -39
- package/docs/profiles/UiInfobox.yml +0 -45
- package/docs/profiles/UiLink.yml +0 -51
- package/docs/profiles/UiLoader.yml +0 -38
- package/docs/profiles/UiMenuItem.yml +0 -57
- package/docs/profiles/UiModalSidebar.yml +0 -46
- package/docs/profiles/UiModalWindow.yml +0 -44
- package/docs/profiles/UiNumberStepper.yml +0 -52
- package/docs/profiles/UiRadio.yml +0 -38
- package/docs/profiles/UiScrollBox.yml +0 -31
- package/docs/profiles/UiSelectOption.yml +0 -44
- package/docs/profiles/UiSelectOptionGroup.yml +0 -38
- package/docs/profiles/UiSkeleton.yml +0 -41
- package/docs/profiles/UiSlider.yml +0 -38
- package/docs/profiles/UiSwitch.yml +0 -37
- package/docs/profiles/UiTab.yml +0 -119
- package/docs/profiles/UiTable.yml +0 -152
- package/docs/profiles/UiTableColumn.yml +0 -50
- package/docs/profiles/UiTableFooterButton.yml +0 -44
- package/docs/profiles/UiTableFooterSection.yml +0 -38
- package/docs/profiles/UiTag.yml +0 -41
- package/docs/profiles/UiTimePicker.yml +0 -46
- package/docs/profiles/UiToolbarButton.yml +0 -37
- package/docs/profiles/UiToolbarLink.yml +0 -32
- package/docs/profiles/UiTooltip.yml +0 -43
- package/docs/profiles/UiTransition.yml +0 -27
- package/docs/profiles/UiYandexMap.yml +0 -29
package/docs/AI.md
CHANGED
|
@@ -10,7 +10,6 @@ Only the public package contract is described below, without depending on the re
|
|
|
10
10
|
- Package name: `@retailcrm/embed-ui-v1-components`
|
|
11
11
|
- Purpose: UI components and UI helpers for RetailCRM JS extensions
|
|
12
12
|
- Framework: Vue 3
|
|
13
|
-
- Published Storybook: `https://retailcrm.github.io/embed-ui/v1-components/0.9.14/`
|
|
14
13
|
- Primary public entrypoints:
|
|
15
14
|
- `@retailcrm/embed-ui-v1-components/remote`
|
|
16
15
|
- `@retailcrm/embed-ui-v1-components/host`
|
|
@@ -28,11 +27,32 @@ Only the public package contract is described below, without depending on the re
|
|
|
28
27
|
|
|
29
28
|
When generating UI code, use this order:
|
|
30
29
|
|
|
31
|
-
1. read [`
|
|
32
|
-
2.
|
|
33
|
-
3.
|
|
34
|
-
4. read [`
|
|
35
|
-
|
|
30
|
+
1. read [`../README.md`](../README.md) and [`../AGENTS.md`](../AGENTS.md) for package-level usage rules;
|
|
31
|
+
2. read [`COMPONENTS.md`](./COMPONENTS.md) to identify candidate components;
|
|
32
|
+
3. open a detailed profile from [`PROFILES.md`](./PROFILES.md) if one exists;
|
|
33
|
+
4. read the relevant page profile from [`PROFILES.md`](./PROFILES.md) when the task is about complete
|
|
34
|
+
pages, modals, sidebars, filters, tables, or settings layouts;
|
|
35
|
+
5. use [`FORMAT.md`](./FORMAT.md) as the schema for what information is considered reliable;
|
|
36
|
+
6. read [`STYLING.md`](./STYLING.md) when the task is about classes, variables, typography, or visual zones;
|
|
37
|
+
7. if no profile exists yet, fall back to public type declarations and state any inference explicitly.
|
|
38
|
+
|
|
39
|
+
## Runtime Embedding References
|
|
40
|
+
|
|
41
|
+
When generating code for a CRM extension, separate UI component choice from runtime placement:
|
|
42
|
+
|
|
43
|
+
- [`targets` and contexts](../../v1-endpoint/docs/targets.md): explains that `target` is the CRM
|
|
44
|
+
embedding point, while `context` is the reactive CRM data available at that point.
|
|
45
|
+
- [`menu placements`](../../v1-endpoint/docs/menu-placements.md): explains how host/manifest menu
|
|
46
|
+
items map to remote page codes.
|
|
47
|
+
- [`page routes`](../../v1-endpoint/docs/page-routes.md): explains how page `code`, CRM route names,
|
|
48
|
+
and `definePageRunner` are connected.
|
|
49
|
+
- [`defineWidgetRunner`](../../v1-endpoint/docs/define-widget-runner.md): shows how a widget receives
|
|
50
|
+
the current `target` prop.
|
|
51
|
+
- [`definePageRunner`](../../v1-endpoint/docs/define-page-runner.md): shows how a page receives the
|
|
52
|
+
current `code` prop.
|
|
53
|
+
- [`context concept`](../../v1-contexts/docs/ru/CONCEPT.md): explains predefined CRM contexts such as
|
|
54
|
+
`order/card`, `customer/card`, `user/current`, and `settings`.
|
|
55
|
+
- [`custom context`](../../v1-contexts/docs/ru/CUSTOM.md): explains custom-field contexts.
|
|
36
56
|
|
|
37
57
|
## Default Recommendation For Common Forms
|
|
38
58
|
|
|
@@ -55,6 +75,65 @@ Typical compositions:
|
|
|
55
75
|
- `UiPageHeader` + `UiButton`
|
|
56
76
|
- `UiSelect` + `UiSelectOption`
|
|
57
77
|
|
|
78
|
+
## Default Recommendation For Full Screens
|
|
79
|
+
|
|
80
|
+
When building a complete extension screen, prioritize a working operational interface over a
|
|
81
|
+
decorative landing page.
|
|
82
|
+
|
|
83
|
+
Default screen rules:
|
|
84
|
+
|
|
85
|
+
- use [`PageComposition.yml`](./profiles/pages/PageComposition.yml) to choose between an entity list,
|
|
86
|
+
card/settings page, multi-column page, collapse-block page, modal sidebar, or modal window;
|
|
87
|
+
- use `UiPageHeader` for page identity and top-level actions;
|
|
88
|
+
- keep filters and controls near the content they affect;
|
|
89
|
+
- use `UiField` around labeled form controls;
|
|
90
|
+
- use `UiTable` for structured result lists;
|
|
91
|
+
- use `UiLink` for navigation and inline links, `UiButton` for commands;
|
|
92
|
+
- use `UiLoader` with `overlay: true` when loading should dim the covered page or module content;
|
|
93
|
+
- keep public imports on `@retailcrm/embed-ui-v1-components/remote`;
|
|
94
|
+
- avoid custom markup that recreates textbox, select, button, link, or table chrome.
|
|
95
|
+
|
|
96
|
+
## Default Recommendation For Table Screens
|
|
97
|
+
|
|
98
|
+
When building a registry, catalog, journal, search result, order list, customer list, or any
|
|
99
|
+
screen where users scan and refine datasets:
|
|
100
|
+
|
|
101
|
+
- put search and filters directly above `UiTable`;
|
|
102
|
+
- use `UiTextbox` for free-text search and `UiSelect` or compact toggle controls for finite filters;
|
|
103
|
+
- keep filters, sorting, page, and page size in GET query parameters when the host app has routing;
|
|
104
|
+
- hydrate initial filter and pagination state from the current query;
|
|
105
|
+
- reset `page` to `1` when filters or sorting change;
|
|
106
|
+
- debounce free-text search before writing query or fetching data;
|
|
107
|
+
- use `UiTableSorter` for sortable headers;
|
|
108
|
+
- use `UiTable` footer slots for summary, page-size controls, export, and pagination;
|
|
109
|
+
- compose table footer controls with `UiTableFooterSection` and `UiTableFooterButton`, not regular `UiButton`;
|
|
110
|
+
- use chevron icon assets for table footer previous/next controls instead of text glyphs;
|
|
111
|
+
- add local CSS for table footer layout and states; use [`UiTable.yml`](./profiles/components/UiTable.yml)
|
|
112
|
+
for the reference table footer example;
|
|
113
|
+
- set `size="small"` on `UiLink` inside table cells so links match table body typography.
|
|
114
|
+
|
|
115
|
+
Suggested query names:
|
|
116
|
+
|
|
117
|
+
- `q` for text search;
|
|
118
|
+
- `status`, `managerId`, `dateFrom`, `dateTo` for filters;
|
|
119
|
+
- `sort` and `direction` for sorting;
|
|
120
|
+
- `page` and `pageSize` for pagination.
|
|
121
|
+
|
|
122
|
+
## External Documentation Patterns
|
|
123
|
+
|
|
124
|
+
These references are useful when extending the profiles and examples in this package:
|
|
125
|
+
|
|
126
|
+
- [shadcn/ui Data Table source](https://github.com/shadcn-ui/ui/blob/main/apps/v4/content/docs/components/radix/data-table.mdx)
|
|
127
|
+
documents a scenario-first table build: base table, row actions, pagination, sorting,
|
|
128
|
+
filtering, visibility, row selection, and reusable table pieces.
|
|
129
|
+
- [Nuxt UI v4 Table source](https://github.com/nuxt/ui/blob/v4/docs/content/docs/2.components/table.md)
|
|
130
|
+
documents table state, sorting, pagination, loading, empty state, slots, and advanced flows.
|
|
131
|
+
- [Nuxt UI v2 Table source](https://github.com/nuxt/ui/blob/v2/docs/content/2.components/table.md)
|
|
132
|
+
is useful for explicit searchable, paginable, manual sorting, and reactive query examples.
|
|
133
|
+
- [PrimeVue DataTable docs](https://primevue.org/datatable/)
|
|
134
|
+
are useful for Vue table patterns around filtering, pagination, selection, lazy loading, empty,
|
|
135
|
+
loading, and accessibility.
|
|
136
|
+
|
|
58
137
|
## What AI Needs In A Good Component Profile
|
|
59
138
|
|
|
60
139
|
The most useful format for AI is a component profile that explicitly answers:
|
|
@@ -85,22 +164,25 @@ The preferred styling signal is:
|
|
|
85
164
|
|
|
86
165
|
## Current High-Signal Profiles
|
|
87
166
|
|
|
88
|
-
- [`UiField`](./profiles/UiField.yml)
|
|
89
|
-
- [`UiTextbox`](./profiles/UiTextbox.yml)
|
|
90
|
-
- [`UiButton`](./profiles/UiButton.yml)
|
|
91
|
-
- [`UiPageHeader`](./profiles/UiPageHeader.yml)
|
|
92
|
-
- [`UiSelect`](./profiles/UiSelect.yml)
|
|
93
|
-
- [`UiRadioSwitch`](./profiles/UiRadioSwitch.yml)
|
|
94
|
-
- [`UiTabGroup`](./profiles/UiTabGroup.yml)
|
|
95
|
-
- [`UiTab`](./profiles/UiTab.yml)
|
|
96
|
-
- [`UiPopper`](./profiles/UiPopper.yml)
|
|
97
|
-
- [`UiPopperConnector`](./profiles/UiPopperConnector.yml)
|
|
98
|
-
- [`UiPopperTarget`](./profiles/UiPopperTarget.yml)
|
|
167
|
+
- [`UiField`](./profiles/components/UiField.yml)
|
|
168
|
+
- [`UiTextbox`](./profiles/components/UiTextbox.yml)
|
|
169
|
+
- [`UiButton`](./profiles/components/UiButton.yml)
|
|
170
|
+
- [`UiPageHeader`](./profiles/components/UiPageHeader.yml)
|
|
171
|
+
- [`UiSelect`](./profiles/components/UiSelect.yml)
|
|
172
|
+
- [`UiRadioSwitch`](./profiles/components/UiRadioSwitch.yml)
|
|
173
|
+
- [`UiTabGroup`](./profiles/components/UiTabGroup.yml)
|
|
174
|
+
- [`UiTab`](./profiles/components/UiTab.yml)
|
|
175
|
+
- [`UiPopper`](./profiles/components/UiPopper.yml)
|
|
176
|
+
- [`UiPopperConnector`](./profiles/components/UiPopperConnector.yml)
|
|
177
|
+
- [`UiPopperTarget`](./profiles/components/UiPopperTarget.yml)
|
|
99
178
|
|
|
100
179
|
## Related Public Docs
|
|
101
180
|
|
|
102
181
|
- [`README.md`](./README.md)
|
|
182
|
+
- [`../README.md`](../README.md)
|
|
183
|
+
- [`../AGENTS.md`](../AGENTS.md)
|
|
103
184
|
- [`COMPONENTS.md`](./COMPONENTS.md)
|
|
104
185
|
- [`FORMAT.md`](./FORMAT.md)
|
|
105
186
|
- [`STYLING.md`](./STYLING.md)
|
|
187
|
+
- [`PROFILES.md`](./PROFILES.md)
|
|
106
188
|
- [`../AGENTS.md`](../AGENTS.md)
|
package/docs/COMPONENTS.md
CHANGED
|
@@ -10,80 +10,79 @@ Detailed AI-friendly profiles are collected in [`PROFILES.md`](./PROFILES.md).
|
|
|
10
10
|
|
|
11
11
|
## Form And Input
|
|
12
12
|
|
|
13
|
-
- [`UiField`](./profiles/UiField.yml): field wrapper with label, hint, validation state, and slot props for ARIA wiring
|
|
14
|
-
- [`UiTextbox`](./profiles/UiTextbox.yml): text or numeric input with prefix, suffix, clear action, and multiline mode
|
|
15
|
-
- [`UiCheckbox`](./profiles/UiCheckbox.yml): boolean choice
|
|
16
|
-
- [`UiRadio`](./profiles/UiRadio.yml): single choice
|
|
17
|
-
- [`UiRadioSwitch`](./profiles/UiRadioSwitch.yml): segmented single-choice switch with inline or section-card appearance
|
|
18
|
-
- [`UiRadioSwitchOption`](./profiles/UiRadioSwitchOption.yml): rich option child for UiRadioSwitch
|
|
19
|
-
- [`UiToggleGroup`](./profiles/UiToggleGroup.yml): segmented multi-select group built from toggle buttons
|
|
20
|
-
- [`UiToggleGroupOption`](./profiles/UiToggleGroupOption.yml): rich option child for UiToggleGroup
|
|
21
|
-
- [`UiSwitch`](./profiles/UiSwitch.yml): state toggle
|
|
22
|
-
- [`UiSlider`](./profiles/UiSlider.yml): ranged value selection
|
|
23
|
-
- [`UiSelect`](./profiles/UiSelect.yml): select container for single or multiple choice
|
|
24
|
-
- [`UiSelectOption`](./profiles/UiSelectOption.yml): select option
|
|
25
|
-
- [`UiSelectOptionGroup`](./profiles/UiSelectOptionGroup.yml): grouped options
|
|
26
|
-
- [`UiDatePicker`](./profiles/UiDatePicker.yml): date or date-range selection
|
|
27
|
-
- [`UiTimePicker`](./profiles/UiTimePicker.yml): time selection
|
|
28
|
-
- [`UiCalendar`](./profiles/UiCalendar.yml): calendar primitive
|
|
29
|
-
- [`UiNumberStepper`](./profiles/UiNumberStepper.yml): numeric input with increment and decrement controls
|
|
13
|
+
- [`UiField`](./profiles/components/UiField.yml): field wrapper with label, hint, validation state, and slot props for ARIA wiring
|
|
14
|
+
- [`UiTextbox`](./profiles/components/UiTextbox.yml): text or numeric input with prefix, suffix, clear action, and multiline mode
|
|
15
|
+
- [`UiCheckbox`](./profiles/components/UiCheckbox.yml): boolean choice
|
|
16
|
+
- [`UiRadio`](./profiles/components/UiRadio.yml): single choice
|
|
17
|
+
- [`UiRadioSwitch`](./profiles/components/UiRadioSwitch.yml): segmented single-choice switch with inline or section-card appearance
|
|
18
|
+
- [`UiRadioSwitchOption`](./profiles/components/UiRadioSwitchOption.yml): rich option child for UiRadioSwitch
|
|
19
|
+
- [`UiToggleGroup`](./profiles/components/UiToggleGroup.yml): segmented multi-select group built from toggle buttons
|
|
20
|
+
- [`UiToggleGroupOption`](./profiles/components/UiToggleGroupOption.yml): rich option child for UiToggleGroup
|
|
21
|
+
- [`UiSwitch`](./profiles/components/UiSwitch.yml): state toggle
|
|
22
|
+
- [`UiSlider`](./profiles/components/UiSlider.yml): ranged value selection
|
|
23
|
+
- [`UiSelect`](./profiles/components/UiSelect.yml): select container for single or multiple choice
|
|
24
|
+
- [`UiSelectOption`](./profiles/components/UiSelectOption.yml): select option
|
|
25
|
+
- [`UiSelectOptionGroup`](./profiles/components/UiSelectOptionGroup.yml): grouped options
|
|
26
|
+
- [`UiDatePicker`](./profiles/components/UiDatePicker.yml): date or date-range selection
|
|
27
|
+
- [`UiTimePicker`](./profiles/components/UiTimePicker.yml): time selection
|
|
28
|
+
- [`UiCalendar`](./profiles/components/UiCalendar.yml): calendar primitive
|
|
29
|
+
- [`UiNumberStepper`](./profiles/components/UiNumberStepper.yml): numeric input with increment and decrement controls
|
|
30
30
|
|
|
31
31
|
## Actions And Navigation
|
|
32
32
|
|
|
33
|
-
- [`UiButton`](./profiles/UiButton.yml): main action button that can render as a button or anchor
|
|
34
|
-
- [`UiToggleButton`](./profiles/UiToggleButton.yml): stateful toggle button primitive for standalone or grouped use
|
|
35
|
-
- [`UiAddButton`](./profiles/UiAddButton.yml): add action button
|
|
36
|
-
- [`UiCopyButton`](./profiles/UiCopyButton.yml): copy value action
|
|
37
|
-
- [`UiToolbarButton`](./profiles/UiToolbarButton.yml): toolbar button
|
|
38
|
-
- [`UiToolbarLink`](./profiles/UiToolbarLink.yml): toolbar link
|
|
39
|
-
- [`UiLink`](./profiles/UiLink.yml): text link
|
|
40
|
-
- [`UiMenuItem`](./profiles/UiMenuItem.yml): menu item
|
|
41
|
-
- [`UiMenuItemGroup`](./profiles/UiMenuItemGroup.yml): menu item group
|
|
42
|
-
- [`UiTabGroup`](./profiles/UiTabGroup.yml): tab navigation group with overflow handling and optional active panel
|
|
43
|
-
- [`UiTab`](./profiles/UiTab.yml): declarative tab child for UiTabGroup
|
|
33
|
+
- [`UiButton`](./profiles/components/UiButton.yml): main action button that can render as a button or anchor
|
|
34
|
+
- [`UiToggleButton`](./profiles/components/UiToggleButton.yml): stateful toggle button primitive for standalone or grouped use
|
|
35
|
+
- [`UiAddButton`](./profiles/components/UiAddButton.yml): add action button
|
|
36
|
+
- [`UiCopyButton`](./profiles/components/UiCopyButton.yml): copy value action
|
|
37
|
+
- [`UiToolbarButton`](./profiles/components/UiToolbarButton.yml): toolbar button
|
|
38
|
+
- [`UiToolbarLink`](./profiles/components/UiToolbarLink.yml): toolbar link
|
|
39
|
+
- [`UiLink`](./profiles/components/UiLink.yml): text link
|
|
40
|
+
- [`UiMenuItem`](./profiles/components/UiMenuItem.yml): menu item
|
|
41
|
+
- [`UiMenuItemGroup`](./profiles/components/UiMenuItemGroup.yml): menu item group
|
|
42
|
+
- [`UiTabGroup`](./profiles/components/UiTabGroup.yml): tab navigation group with overflow handling and optional active panel
|
|
43
|
+
- [`UiTab`](./profiles/components/UiTab.yml): declarative tab child for UiTabGroup
|
|
44
44
|
|
|
45
45
|
## Layout And Structure
|
|
46
46
|
|
|
47
|
-
- [`UiPageHeader`](./profiles/UiPageHeader.yml): page or section header with an editable title and action zone
|
|
48
|
-
- [`UiCollapse`](./profiles/UiCollapse.yml): collapsible section
|
|
49
|
-
- [`UiCollapseBox`](./profiles/UiCollapseBox.yml): collapsible container
|
|
50
|
-
- [`UiCollapseGroup`](./profiles/UiCollapseGroup.yml): multiple collapse coordination
|
|
51
|
-
- [`UiScrollBox`](./profiles/UiScrollBox.yml): scrollable container
|
|
52
|
-
- [`UiTransition`](./profiles/UiTransition.yml): transition wrapper
|
|
47
|
+
- [`UiPageHeader`](./profiles/components/UiPageHeader.yml): page or section header with an editable title and action zone
|
|
48
|
+
- [`UiCollapse`](./profiles/components/UiCollapse.yml): collapsible section
|
|
49
|
+
- [`UiCollapseBox`](./profiles/components/UiCollapseBox.yml): collapsible container
|
|
50
|
+
- [`UiCollapseGroup`](./profiles/components/UiCollapseGroup.yml): multiple collapse coordination
|
|
51
|
+
- [`UiScrollBox`](./profiles/components/UiScrollBox.yml): scrollable container
|
|
52
|
+
- [`UiTransition`](./profiles/components/UiTransition.yml): transition wrapper
|
|
53
53
|
|
|
54
54
|
## Feedback And Status
|
|
55
55
|
|
|
56
|
-
- [`UiAlert`](./profiles/UiAlert.yml): contextual alert or notification
|
|
57
|
-
- [`UiInfobox`](./profiles/UiInfobox.yml): highlighted explanatory block
|
|
58
|
-
- [`UiError`](./profiles/UiError.yml): compact error state
|
|
59
|
-
- [`UiLoader`](./profiles/UiLoader.yml): loading indicator
|
|
60
|
-
- [`UiSkeleton`](./profiles/UiSkeleton.yml): content placeholder for loading state
|
|
61
|
-
- [`UiTag`](./profiles/UiTag.yml): labels and statuses
|
|
56
|
+
- [`UiAlert`](./profiles/components/UiAlert.yml): contextual alert or notification
|
|
57
|
+
- [`UiInfobox`](./profiles/components/UiInfobox.yml): highlighted explanatory block
|
|
58
|
+
- [`UiError`](./profiles/components/UiError.yml): compact error state
|
|
59
|
+
- [`UiLoader`](./profiles/components/UiLoader.yml): loading indicator
|
|
60
|
+
- [`UiSkeleton`](./profiles/components/UiSkeleton.yml): content placeholder for loading state
|
|
61
|
+
- [`UiTag`](./profiles/components/UiTag.yml): labels and statuses
|
|
62
62
|
|
|
63
63
|
## Overlays And Modal Patterns
|
|
64
64
|
|
|
65
|
-
- [`UiModalWindow`](./profiles/UiModalWindow.yml): modal window
|
|
66
|
-
- [`UiModalWindowSurface`](./profiles/UiModalWindowSurface.yml): modal surface
|
|
67
|
-
- [`UiModalSidebar`](./profiles/UiModalSidebar.yml): sidebar modal
|
|
68
|
-
- [`UiTooltip`](./profiles/UiTooltip.yml): tooltip
|
|
69
|
-
- [`UiPopper`](./profiles/UiPopper.yml): floating layer
|
|
70
|
-
- [`UiPopperTarget`](./profiles/UiPopperTarget.yml): popper target
|
|
71
|
-
- [`UiPopperConnector`](./profiles/UiPopperConnector.yml): target-to-floating connector
|
|
65
|
+
- [`UiModalWindow`](./profiles/components/UiModalWindow.yml): modal window
|
|
66
|
+
- [`UiModalWindowSurface`](./profiles/components/UiModalWindowSurface.yml): modal surface
|
|
67
|
+
- [`UiModalSidebar`](./profiles/components/UiModalSidebar.yml): sidebar modal
|
|
68
|
+
- [`UiTooltip`](./profiles/components/UiTooltip.yml): tooltip
|
|
69
|
+
- [`UiPopper`](./profiles/components/UiPopper.yml): floating layer
|
|
70
|
+
- [`UiPopperTarget`](./profiles/components/UiPopperTarget.yml): popper target
|
|
71
|
+
- [`UiPopperConnector`](./profiles/components/UiPopperConnector.yml): target-to-floating connector
|
|
72
72
|
|
|
73
73
|
## Content And Data Display
|
|
74
74
|
|
|
75
|
-
- [`UiAvatar`](./profiles/UiAvatar.yml): avatar
|
|
76
|
-
- [`UiAvatarList`](./profiles/UiAvatarList.yml): avatar list
|
|
77
|
-
- [`UiDate`](./profiles/UiDate.yml): formatted date display
|
|
78
|
-
- [`
|
|
79
|
-
- [`
|
|
80
|
-
- [`
|
|
81
|
-
- [`
|
|
82
|
-
- [`
|
|
83
|
-
- [`
|
|
84
|
-
- [`
|
|
85
|
-
- [`
|
|
86
|
-
- [`UiYandexMap`](./profiles/UiYandexMap.yml): Yandex map component
|
|
75
|
+
- [`UiAvatar`](./profiles/components/UiAvatar.yml): avatar
|
|
76
|
+
- [`UiAvatarList`](./profiles/components/UiAvatarList.yml): avatar list
|
|
77
|
+
- [`UiDate`](./profiles/components/UiDate.yml): formatted date display
|
|
78
|
+
- [`UiTable`](./profiles/components/UiTable.yml): table root
|
|
79
|
+
- [`UiTableColumn`](./profiles/components/UiTableColumn.yml): table column declaration
|
|
80
|
+
- [`UiTableHeadCell`](./profiles/components/UiTableHeadCell.yml): table head cell primitive
|
|
81
|
+
- [`UiTableBodyCell`](./profiles/components/UiTableBodyCell.yml): table body cell primitive
|
|
82
|
+
- [`UiTableFooterSection`](./profiles/components/UiTableFooterSection.yml): table footer section container
|
|
83
|
+
- [`UiTableFooterButton`](./profiles/components/UiTableFooterButton.yml): table footer action button
|
|
84
|
+
- [`UiTableSorter`](./profiles/components/UiTableSorter.yml): table sort control primitive
|
|
85
|
+
- [`UiYandexMap`](./profiles/components/UiYandexMap.yml): Yandex map component
|
|
87
86
|
|
|
88
87
|
## Helpers
|
|
89
88
|
|
package/docs/FORMAT.md
CHANGED
|
@@ -19,6 +19,10 @@ A good profile should let an agent answer these questions without opening the so
|
|
|
19
19
|
|
|
20
20
|
Recommended filename: `<ComponentName>.yml`
|
|
21
21
|
|
|
22
|
+
Component profiles should live in `docs/profiles/components`.
|
|
23
|
+
Page-composition profiles should live in `docs/profiles/pages`.
|
|
24
|
+
Use `examples` for copyable snippets and cross-link related profiles with relative `profile` paths.
|
|
25
|
+
|
|
22
26
|
Minimal shape:
|
|
23
27
|
|
|
24
28
|
```yml
|
|
@@ -77,12 +81,6 @@ styling:
|
|
|
77
81
|
line_height: 24px
|
|
78
82
|
weight: 400
|
|
79
83
|
|
|
80
|
-
examples:
|
|
81
|
-
- title: Basic example
|
|
82
|
-
goal: What the user or the agent is trying to build.
|
|
83
|
-
code: |
|
|
84
|
-
<UiComponent />
|
|
85
|
-
|
|
86
84
|
ai_notes:
|
|
87
85
|
do:
|
|
88
86
|
- rule
|
|
@@ -220,15 +218,16 @@ Capture:
|
|
|
220
218
|
- what happens to `aria-invalid`, `aria-labelledby`, `role`, `aria-expanded`, and similar attributes;
|
|
221
219
|
- which keys affect behavior, if that behavior is documented.
|
|
222
220
|
|
|
223
|
-
## 11. `
|
|
221
|
+
## 11. `composition`
|
|
224
222
|
|
|
225
223
|
List:
|
|
226
224
|
|
|
227
225
|
- common combinations;
|
|
228
226
|
- required neighboring components;
|
|
229
227
|
- safe defaults for typical screens;
|
|
230
|
-
-
|
|
231
|
-
|
|
228
|
+
- correct and incorrect composition patterns.
|
|
229
|
+
|
|
230
|
+
Keep examples in YAML profiles focused, copyable, and aligned with the public package entrypoints.
|
|
232
231
|
|
|
233
232
|
## 12. `ai_notes`
|
|
234
233
|
|
|
@@ -244,6 +243,7 @@ A short list of rules specifically for code generation:
|
|
|
244
243
|
- Use the exact names of props, emits, and slots.
|
|
245
244
|
- For slots, describe not only the name, but also what the slot does and which content restrictions exist.
|
|
246
245
|
- For styling, distinguish between safe CSS variables and descriptive class names.
|
|
246
|
+
- Keep runnable examples in YAML profiles when they clarify safe public usage.
|
|
247
247
|
- Do not mix "how the component looks right now" with "what is publicly guaranteed".
|
|
248
248
|
- If behavior is inferred from implementation rather than public API, say that explicitly.
|
|
249
249
|
- If information is missing, state the limitation rather than inventing details.
|
|
@@ -254,7 +254,7 @@ The following data can usually be obtained automatically or semi-automatically:
|
|
|
254
254
|
|
|
255
255
|
- the list of public exports;
|
|
256
256
|
- prop, emit, method, and enum names;
|
|
257
|
-
- whether
|
|
257
|
+
- whether profile examples exist;
|
|
258
258
|
- the current root classes and layout zones from templates.
|
|
259
259
|
|
|
260
260
|
These sections almost always need manual writing:
|
package/docs/PROFILES.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AI Profiles
|
|
2
2
|
|
|
3
|
-
`PROFILES.md` is the entry point for machine-readable AI-friendly
|
|
3
|
+
`PROFILES.md` is the entry point for machine-readable AI-friendly profiles.
|
|
4
4
|
|
|
5
5
|
The current profile layer is structured like this:
|
|
6
6
|
|
|
7
7
|
- the index stays in markdown so both humans and agents can navigate it easily;
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- component profiles live in `docs/profiles/components/*.yml`;
|
|
9
|
+
- page-composition profiles live in `docs/profiles/pages/*.yml`;
|
|
10
|
+
- YAML is the source of truth for structure, props, slots, emits, composition, page patterns, and AI rules.
|
|
10
11
|
|
|
11
12
|
## Table Of Contents
|
|
12
13
|
|
|
@@ -18,9 +19,11 @@ The current profile layer is structured like this:
|
|
|
18
19
|
|
|
19
20
|
## Reading Order
|
|
20
21
|
|
|
21
|
-
1. [
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
22
|
+
1. [`../README.md`](../README.md)
|
|
23
|
+
2. [`../AGENTS.md`](../AGENTS.md)
|
|
24
|
+
3. [`AI.md`](./AI.md)
|
|
25
|
+
4. this index
|
|
26
|
+
5. the relevant `.yml` profile
|
|
24
27
|
|
|
25
28
|
## Current Coverage
|
|
26
29
|
|
|
@@ -29,23 +32,34 @@ Coverage is now expanding across the public component catalog.
|
|
|
29
32
|
Use these entrypoints:
|
|
30
33
|
|
|
31
34
|
- [`COMPONENTS.md`](./COMPONENTS.md) for the full linked component index
|
|
32
|
-
- `docs/profiles/*.yml` for per-component machine-readable profiles
|
|
35
|
+
- `docs/profiles/components/*.yml` for per-component machine-readable profiles
|
|
36
|
+
- `docs/profiles/pages/*.yml` for page, modal, sidebar, filter, table, and settings-layout profiles
|
|
33
37
|
|
|
34
38
|
Current high-signal core profiles:
|
|
35
39
|
|
|
36
|
-
- [`UiField`](./profiles/UiField.yml)
|
|
37
|
-
- [`UiTextbox`](./profiles/UiTextbox.yml)
|
|
38
|
-
- [`UiButton`](./profiles/UiButton.yml)
|
|
39
|
-
- [`UiToggleButton`](./profiles/UiToggleButton.yml)
|
|
40
|
-
- [`UiToggleGroup`](./profiles/UiToggleGroup.yml)
|
|
41
|
-
- [`UiPageHeader`](./profiles/UiPageHeader.yml)
|
|
42
|
-
- [`UiSelect`](./profiles/UiSelect.yml)
|
|
43
|
-
- [`UiRadioSwitch`](./profiles/UiRadioSwitch.yml)
|
|
44
|
-
- [`UiTabGroup`](./profiles/UiTabGroup.yml)
|
|
45
|
-
- [`UiTab`](./profiles/UiTab.yml)
|
|
46
|
-
- [`UiPopper`](./profiles/UiPopper.yml)
|
|
47
|
-
- [`UiPopperConnector`](./profiles/UiPopperConnector.yml)
|
|
48
|
-
- [`UiPopperTarget`](./profiles/UiPopperTarget.yml)
|
|
40
|
+
- [`UiField`](./profiles/components/UiField.yml)
|
|
41
|
+
- [`UiTextbox`](./profiles/components/UiTextbox.yml)
|
|
42
|
+
- [`UiButton`](./profiles/components/UiButton.yml)
|
|
43
|
+
- [`UiToggleButton`](./profiles/components/UiToggleButton.yml)
|
|
44
|
+
- [`UiToggleGroup`](./profiles/components/UiToggleGroup.yml)
|
|
45
|
+
- [`UiPageHeader`](./profiles/components/UiPageHeader.yml)
|
|
46
|
+
- [`UiSelect`](./profiles/components/UiSelect.yml)
|
|
47
|
+
- [`UiRadioSwitch`](./profiles/components/UiRadioSwitch.yml)
|
|
48
|
+
- [`UiTabGroup`](./profiles/components/UiTabGroup.yml)
|
|
49
|
+
- [`UiTab`](./profiles/components/UiTab.yml)
|
|
50
|
+
- [`UiPopper`](./profiles/components/UiPopper.yml)
|
|
51
|
+
- [`UiPopperConnector`](./profiles/components/UiPopperConnector.yml)
|
|
52
|
+
- [`UiPopperTarget`](./profiles/components/UiPopperTarget.yml)
|
|
53
|
+
|
|
54
|
+
Current page profiles:
|
|
55
|
+
|
|
56
|
+
- [`PageComposition`](./profiles/pages/PageComposition.yml)
|
|
57
|
+
- [`EntityListPage`](./profiles/pages/EntityListPage.yml)
|
|
58
|
+
- [`CardSettingsPage`](./profiles/pages/CardSettingsPage.yml)
|
|
59
|
+
- [`MultiColumnPage`](./profiles/pages/MultiColumnPage.yml)
|
|
60
|
+
- [`CollapseBlockPage`](./profiles/pages/CollapseBlockPage.yml)
|
|
61
|
+
- [`ModalSidebar`](./profiles/pages/ModalSidebar.yml)
|
|
62
|
+
- [`ModalWindow`](./profiles/pages/ModalWindow.yml)
|
|
49
63
|
|
|
50
64
|
## What To Read First
|
|
51
65
|
|
|
@@ -53,8 +67,9 @@ Current high-signal core profiles:
|
|
|
53
67
|
- `props` if you need a broader practical API view.
|
|
54
68
|
- `slots` if the task is about markup, zones, and allowed content.
|
|
55
69
|
- `emits` if the component must be wired into screen logic.
|
|
56
|
-
- `examples` if you need
|
|
70
|
+
- `examples` if you need copyable usage snippets.
|
|
57
71
|
- `ai_notes` if the agent needs safe defaults and anti-patterns.
|
|
72
|
+
- `profiles/pages/*.yml` if the task is about a full page, modal, sidebar, filter, table, or settings layout.
|
|
58
73
|
|
|
59
74
|
## Styling Reads
|
|
60
75
|
|
|
@@ -64,3 +79,5 @@ Current high-signal core profiles:
|
|
|
64
79
|
## Notes
|
|
65
80
|
|
|
66
81
|
- All new updates should be made in YAML profiles.
|
|
82
|
+
- Keep component-level details in `profiles/components`.
|
|
83
|
+
- Keep page-composition details in `profiles/pages`.
|
package/docs/README.md
CHANGED
|
@@ -10,6 +10,8 @@ These docs are optimized for two main scenarios:
|
|
|
10
10
|
|
|
11
11
|
## Documentation Map
|
|
12
12
|
|
|
13
|
+
- [`../AGENTS.md`](../AGENTS.md)
|
|
14
|
+
package-level instructions for AI assistants using the installed package.
|
|
13
15
|
- [`AI.md`](./AI.md)
|
|
14
16
|
a compact quickstart for AI agents: which entrypoint to prefer, which reading order to use,
|
|
15
17
|
and which boundaries are safe by default.
|
|
@@ -20,7 +22,7 @@ These docs are optimized for two main scenarios:
|
|
|
20
22
|
- [`STYLING.md`](./STYLING.md)
|
|
21
23
|
shared guidance for reading classes, CSS variables, and typography in profiles.
|
|
22
24
|
- [`PROFILES.md`](./PROFILES.md)
|
|
23
|
-
the index of YAML component profiles.
|
|
25
|
+
the index of YAML component and page profiles.
|
|
24
26
|
|
|
25
27
|
## Public Entrypoints
|
|
26
28
|
|
|
@@ -53,10 +55,14 @@ The same rule applies to `.ui-v1-*` selectors in profile `styling` sections.
|
|
|
53
55
|
|
|
54
56
|
If you need to generate UI quickly:
|
|
55
57
|
|
|
56
|
-
1. [
|
|
57
|
-
2. [
|
|
58
|
-
3.
|
|
59
|
-
4. [`
|
|
58
|
+
1. [`../README.md`](../README.md)
|
|
59
|
+
2. [`../AGENTS.md`](../AGENTS.md)
|
|
60
|
+
3. [`AI.md`](./AI.md)
|
|
61
|
+
4. [`COMPONENTS.md`](./COMPONENTS.md)
|
|
62
|
+
5. the relevant profile from [`PROFILES.md`](./PROFILES.md)
|
|
63
|
+
6. the relevant page profile from [`PROFILES.md`](./PROFILES.md) if the task is about complete pages,
|
|
64
|
+
modals, sidebars, filters, tables, or settings layouts
|
|
65
|
+
7. [`STYLING.md`](./STYLING.md) if the task is about classes, variables, typography, or layout tuning
|
|
60
66
|
|
|
61
67
|
If you are extending the docs:
|
|
62
68
|
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
component: UiAddButton
|
|
2
|
+
summary: >
|
|
3
|
+
UiAddButton is an action-first button for add or create flows. It is close to UiButton,
|
|
4
|
+
but tuned for "create another item" scenarios and supports small descriptive additions.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiAddButton
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiButton
|
|
13
|
+
- UiToolbarButton
|
|
14
|
+
|
|
15
|
+
examples:
|
|
16
|
+
- title: Basic add button
|
|
17
|
+
code: |
|
|
18
|
+
<template>
|
|
19
|
+
<UiAddButton>
|
|
20
|
+
Add Button
|
|
21
|
+
</UiAddButton>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts" setup>
|
|
25
|
+
import { UiAddButton } from '@retailcrm/embed-ui-v1-components/remote'
|
|
26
|
+
</script>
|
|
27
|
+
- title: Small add button (`small`)
|
|
28
|
+
code: |
|
|
29
|
+
<template>
|
|
30
|
+
<UiAddButton small>
|
|
31
|
+
Add Button
|
|
32
|
+
</UiAddButton>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script lang="ts" setup>
|
|
36
|
+
import { UiAddButton } from '@retailcrm/embed-ui-v1-components/remote'
|
|
37
|
+
</script>
|
|
38
|
+
- title: Description slot
|
|
39
|
+
code: |
|
|
40
|
+
<template>
|
|
41
|
+
<UiAddButton color="blue">
|
|
42
|
+
Add Button
|
|
43
|
+
|
|
44
|
+
<template #description>
|
|
45
|
+
Description
|
|
46
|
+
</template>
|
|
47
|
+
</UiAddButton>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script lang="ts" setup>
|
|
51
|
+
import { UiAddButton } from '@retailcrm/embed-ui-v1-components/remote'
|
|
52
|
+
</script>
|
|
53
|
+
- title: Custom height
|
|
54
|
+
code: |
|
|
55
|
+
<template>
|
|
56
|
+
<UiAddButton :height="120">Add Button</UiAddButton>
|
|
57
|
+
<UiAddButton height="50%">Add Button</UiAddButton>
|
|
58
|
+
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script lang="ts" setup>
|
|
62
|
+
import { UiAddButton } from '@retailcrm/embed-ui-v1-components/remote'
|
|
63
|
+
</script>
|
|
64
|
+
use_when:
|
|
65
|
+
- You need a dedicated create or add action.
|
|
66
|
+
- You need a compact add CTA with optional extra description.
|
|
67
|
+
|
|
68
|
+
avoid_when:
|
|
69
|
+
- You need a regular text link.
|
|
70
|
+
- You need a generic button without add semantics.
|
|
71
|
+
|
|
72
|
+
api:
|
|
73
|
+
key_props:
|
|
74
|
+
- name: color
|
|
75
|
+
- name: small
|
|
76
|
+
- name: disabled
|
|
77
|
+
- name: height
|
|
78
|
+
slots:
|
|
79
|
+
- name: icon
|
|
80
|
+
zone: leading-icon
|
|
81
|
+
creates: Leading icon area for the add action.
|
|
82
|
+
- name: description
|
|
83
|
+
zone: secondary-copy
|
|
84
|
+
creates: Optional secondary description near the main label.
|
|
85
|
+
|
|
86
|
+
rendered_structure:
|
|
87
|
+
descriptive_only: true
|
|
88
|
+
root:
|
|
89
|
+
shape: button.ui-v1-add-button
|
|
90
|
+
tag: button
|
|
91
|
+
notes: Current root is a single action button with optional icon and description zones.
|
|
92
|
+
|
|
93
|
+
geometry:
|
|
94
|
+
layout: button-like action root
|
|
95
|
+
root_display: flex
|
|
96
|
+
width_behavior: content-sized by default
|
|
97
|
+
|
|
98
|
+
behavior:
|
|
99
|
+
notes:
|
|
100
|
+
- Behaves like a clickable add action with standard button focus and click semantics.
|
|
101
|
+
|
|
102
|
+
ai_notes:
|
|
103
|
+
do:
|
|
104
|
+
- Use for create and add flows rather than generic submit actions.
|
|
105
|
+
- Use description only when it clarifies what will be added.
|
|
106
|
+
avoid:
|
|
107
|
+
- Do not replace a plain UiButton unless the add semantics are intentional.
|
|
108
|
+
|
|
109
|
+
composition:
|
|
110
|
+
works_well_with:
|
|
111
|
+
- UiButton
|
|
112
|
+
- UiPageHeader
|
|
113
|
+
- UiToolbarButton
|
|
114
|
+
patterns:
|
|
115
|
+
- title: Add item action
|
|
116
|
+
notes: Use near a list, empty state, or repeatable form section where the action creates another item.
|
|
117
|
+
- title: Page primary create
|
|
118
|
+
notes: UiButton in UiPageHeader is often better for a main create action; use UiAddButton for local add-another flows.
|
|
119
|
+
|
|
120
|
+
accessibility:
|
|
121
|
+
notes:
|
|
122
|
+
- Prefer visible text labels for interactive controls.
|
|
123
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
124
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
125
|
+
keyboard:
|
|
126
|
+
- Tab moves focus to the control when it is focusable.
|
|
127
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
128
|
+
|
|
129
|
+
styling:
|
|
130
|
+
notes:
|
|
131
|
+
- Use documented props and slots as the primary styling API.
|
|
132
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
133
|
+
root_classes:
|
|
134
|
+
- .ui-v1-add-button
|