@retailcrm/embed-ui-v1-components 0.9.19 → 0.9.21
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 +8 -0
- package/README.md +5 -1
- package/bin/embed-ui-v1-components.mjs +32 -24
- package/bin/postinstall.mjs +2 -2
- package/dist/host.cjs +19 -13
- package/dist/host.css +8 -10
- package/dist/host.d.ts +52 -58
- package/dist/host.js +19 -13
- package/dist/remote.cjs +97 -94
- package/dist/remote.d.ts +20 -32
- package/dist/remote.js +97 -94
- package/docs/AGENT-DESIGN-GUIDELINES.md +463 -0
- package/docs/AI.md +89 -6
- package/docs/FORMAT.md +11 -9
- package/docs/PROFILES.md +9 -5
- package/docs/README.md +14 -5
- package/docs/assets/page-guidelines/card-settings-page.png +0 -0
- package/docs/assets/page-guidelines/collapse-block-page.png +0 -0
- package/docs/assets/page-guidelines/entity-list-page.png +0 -0
- package/docs/assets/page-guidelines/modal-sidebar.png +0 -0
- package/docs/assets/page-guidelines/modal-window.png +0 -0
- package/docs/assets/page-guidelines/multi-column-page.png +0 -0
- package/docs/profiles/UiAddButton.yml +30 -0
- package/docs/profiles/UiAlert.yml +27 -0
- package/docs/profiles/UiAvatar.yml +26 -0
- package/docs/profiles/UiAvatarList.yml +28 -0
- package/docs/profiles/UiButton.yml +1 -8
- package/docs/profiles/UiCalendar.yml +28 -0
- package/docs/profiles/UiCheckbox.yml +32 -0
- package/docs/profiles/UiCollapse.yml +34 -0
- package/docs/profiles/UiCollapseBox.yml +30 -0
- package/docs/profiles/UiCollapseGroup.yml +26 -0
- package/docs/profiles/UiCopyButton.yml +35 -0
- package/docs/profiles/UiDate.yml +28 -0
- package/docs/profiles/UiDatePicker.yml +30 -0
- package/docs/profiles/UiError.yml +45 -0
- package/docs/profiles/UiField.yml +1 -15
- package/docs/profiles/UiImage.yml +28 -0
- package/docs/profiles/UiInfobox.yml +33 -0
- package/docs/profiles/UiLink.yml +40 -0
- package/docs/profiles/UiLoader.yml +35 -0
- package/docs/profiles/UiMenuItem.yml +38 -0
- package/docs/profiles/UiMenuItemGroup.yml +27 -0
- package/docs/profiles/UiModalSidebar.yml +32 -0
- package/docs/profiles/UiModalWindow.yml +42 -0
- package/docs/profiles/UiModalWindowSurface.yml +32 -0
- package/docs/profiles/UiNumberStepper.yml +36 -0
- package/docs/profiles/UiPageHeader.yml +1 -23
- package/docs/profiles/UiPopper.yml +1 -13
- package/docs/profiles/UiPopperConnector.yml +7 -25
- package/docs/profiles/UiPopperTarget.yml +7 -25
- package/docs/profiles/UiRadio.yml +40 -0
- package/docs/profiles/UiRadioSwitch.yml +1 -32
- package/docs/profiles/UiRadioSwitchOption.yml +9 -13
- package/docs/profiles/UiScrollBox.yml +34 -0
- package/docs/profiles/UiSelect.yml +1 -44
- package/docs/profiles/UiSelectOption.yml +32 -0
- package/docs/profiles/UiSelectOptionGroup.yml +30 -0
- package/docs/profiles/UiSkeleton.yml +32 -0
- package/docs/profiles/UiSlider.yml +40 -0
- package/docs/profiles/UiSwitch.yml +38 -0
- package/docs/profiles/UiTab.yml +7 -16
- package/docs/profiles/UiTabGroup.yml +1 -30
- package/docs/profiles/UiTable.yml +148 -0
- package/docs/profiles/UiTableBodyCell.yml +28 -0
- package/docs/profiles/UiTableColumn.yml +39 -0
- package/docs/profiles/UiTableFooterButton.yml +43 -0
- package/docs/profiles/UiTableFooterSection.yml +37 -0
- package/docs/profiles/UiTableHeadCell.yml +28 -0
- package/docs/profiles/UiTableSorter.yml +29 -0
- package/docs/profiles/UiTag.yml +38 -0
- package/docs/profiles/UiTextbox.yml +1 -32
- package/docs/profiles/UiTimePicker.yml +40 -0
- package/docs/profiles/UiToggleButton.yml +1 -11
- package/docs/profiles/UiToggleGroup.yml +1 -13
- package/docs/profiles/UiToggleGroupOption.yml +9 -11
- package/docs/profiles/UiToolbarButton.yml +37 -0
- package/docs/profiles/UiToolbarLink.yml +37 -0
- package/docs/profiles/UiTooltip.yml +38 -0
- package/docs/profiles/UiTransition.yml +37 -0
- package/docs/profiles/UiYandexMap.yml +53 -0
- package/package.json +15 -15
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.
|
|
@@ -19,6 +21,8 @@ These docs are optimized for two main scenarios:
|
|
|
19
21
|
the target component profile format for AI assistants.
|
|
20
22
|
- [`STYLING.md`](./STYLING.md)
|
|
21
23
|
shared guidance for reading classes, CSS variables, and typography in profiles.
|
|
24
|
+
- [`AGENT-DESIGN-GUIDELINES.md`](./AGENT-DESIGN-GUIDELINES.md)
|
|
25
|
+
page composition rules for agents generating full RetailCRM extension screens.
|
|
22
26
|
- [`PROFILES.md`](./PROFILES.md)
|
|
23
27
|
the index of YAML component profiles.
|
|
24
28
|
|
|
@@ -53,13 +57,18 @@ The same rule applies to `.ui-v1-*` selectors in profile `styling` sections.
|
|
|
53
57
|
|
|
54
58
|
If you need to generate UI quickly:
|
|
55
59
|
|
|
56
|
-
1. [
|
|
57
|
-
2. [
|
|
58
|
-
3.
|
|
59
|
-
4. [`
|
|
60
|
+
1. [`../README.md`](../README.md)
|
|
61
|
+
2. [`../AGENTS.md`](../AGENTS.md)
|
|
62
|
+
3. [`AI.md`](./AI.md)
|
|
63
|
+
4. [`COMPONENTS.md`](./COMPONENTS.md)
|
|
64
|
+
5. the relevant profile from [`PROFILES.md`](./PROFILES.md)
|
|
65
|
+
6. [`AGENT-DESIGN-GUIDELINES.md`](./AGENT-DESIGN-GUIDELINES.md) if the task is about complete pages,
|
|
66
|
+
modals, sidebars, filters, tables, or settings layouts
|
|
67
|
+
7. [`STYLING.md`](./STYLING.md) if the task is about classes, variables, typography, or layout tuning
|
|
60
68
|
|
|
61
69
|
If you are extending the docs:
|
|
62
70
|
|
|
63
71
|
1. [`FORMAT.md`](./FORMAT.md)
|
|
64
72
|
2. [`STYLING.md`](./STYLING.md)
|
|
65
|
-
3.
|
|
73
|
+
3. [`AGENT-DESIGN-GUIDELINES.md`](./AGENT-DESIGN-GUIDELINES.md)
|
|
74
|
+
4. the existing profiles in [`PROFILES.md`](./PROFILES.md)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,6 +2,7 @@ component: UiAddButton
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiAddButton is an action-first button for add or create flows. It is close to UiButton,
|
|
4
4
|
but tuned for "create another item" scenarios and supports small descriptive additions.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiaddbutton--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -53,5 +54,34 @@ behavior:
|
|
|
53
54
|
ai_notes:
|
|
54
55
|
do:
|
|
55
56
|
- Use for create and add flows rather than generic submit actions.
|
|
57
|
+
- Use description only when it clarifies what will be added.
|
|
56
58
|
avoid:
|
|
57
59
|
- Do not replace a plain UiButton unless the add semantics are intentional.
|
|
60
|
+
|
|
61
|
+
composition:
|
|
62
|
+
works_well_with:
|
|
63
|
+
- UiButton
|
|
64
|
+
- UiPageHeader
|
|
65
|
+
- UiToolbarButton
|
|
66
|
+
patterns:
|
|
67
|
+
- title: Add item action
|
|
68
|
+
notes: Use near a list, empty state, or repeatable form section where the action creates another item.
|
|
69
|
+
- title: Page primary create
|
|
70
|
+
notes: UiButton in UiPageHeader is often better for a main create action; use UiAddButton for local add-another flows.
|
|
71
|
+
|
|
72
|
+
accessibility:
|
|
73
|
+
notes:
|
|
74
|
+
- Prefer visible text labels for interactive controls.
|
|
75
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
76
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
77
|
+
keyboard:
|
|
78
|
+
- Tab moves focus to the control when it is focusable.
|
|
79
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
80
|
+
|
|
81
|
+
styling:
|
|
82
|
+
notes:
|
|
83
|
+
- Use documented props and slots as the primary styling API.
|
|
84
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
85
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
86
|
+
root_classes:
|
|
87
|
+
- .ui-v1-add-button
|
|
@@ -2,6 +2,7 @@ component: UiAlert
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiAlert is a compact contextual message block for status, warning, success, and danger feedback.
|
|
4
4
|
It can be shown inline in normal page flow and can be closable.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uialert--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -44,5 +45,31 @@ behavior:
|
|
|
44
45
|
ai_notes:
|
|
45
46
|
do:
|
|
46
47
|
- Use UiAlert for inline feedback that should stay in normal layout flow.
|
|
48
|
+
- Keep the message close to the section or form it describes.
|
|
47
49
|
avoid:
|
|
48
50
|
- Do not use it as a replacement for modal confirmation.
|
|
51
|
+
- Do not use for field-level validation when UiField or UiError is more precise.
|
|
52
|
+
|
|
53
|
+
composition:
|
|
54
|
+
works_well_with:
|
|
55
|
+
- UiButton
|
|
56
|
+
- UiInfobox
|
|
57
|
+
- UiError
|
|
58
|
+
patterns:
|
|
59
|
+
- title: Section-level feedback
|
|
60
|
+
notes: Place above or inside the affected section, not at the page top by default.
|
|
61
|
+
- title: Recoverable error
|
|
62
|
+
notes: Pair with a retry or fix action when the user can recover immediately.
|
|
63
|
+
|
|
64
|
+
accessibility:
|
|
65
|
+
notes:
|
|
66
|
+
- Keep rendered text concise and meaningful for screen-reader users.
|
|
67
|
+
- Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
|
|
68
|
+
|
|
69
|
+
styling:
|
|
70
|
+
notes:
|
|
71
|
+
- Use documented props and slots as the primary styling API.
|
|
72
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
73
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
74
|
+
root_classes:
|
|
75
|
+
- .ui-v1-alert
|
|
@@ -2,6 +2,7 @@ component: UiAvatar
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiAvatar renders a user or entity avatar with optional name, status, and link semantics.
|
|
4
4
|
It is meant for compact identity display rather than generic image rendering.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiavatar--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -44,5 +45,30 @@ behavior:
|
|
|
44
45
|
ai_notes:
|
|
45
46
|
do:
|
|
46
47
|
- Use UiAvatar for identity display, not for general media.
|
|
48
|
+
- Provide name whenever possible so fallback identity stays meaningful.
|
|
47
49
|
avoid:
|
|
48
50
|
- Do not use it where UiImage is the better semantic fit.
|
|
51
|
+
|
|
52
|
+
composition:
|
|
53
|
+
works_well_with:
|
|
54
|
+
- UiAvatarList
|
|
55
|
+
- UiTable
|
|
56
|
+
- UiMenuItem
|
|
57
|
+
patterns:
|
|
58
|
+
- title: Table identity cell
|
|
59
|
+
notes: Pair with UiLink size="small" when an avatar appears next to a linked user or customer name.
|
|
60
|
+
- title: Menu identity row
|
|
61
|
+
notes: Use in UiMenuItem avatar slot for users, customers, or accounts.
|
|
62
|
+
|
|
63
|
+
accessibility:
|
|
64
|
+
notes:
|
|
65
|
+
- Keep rendered text concise and meaningful for screen-reader users.
|
|
66
|
+
- Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
|
|
67
|
+
|
|
68
|
+
styling:
|
|
69
|
+
notes:
|
|
70
|
+
- Use documented props and slots as the primary styling API.
|
|
71
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
72
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
73
|
+
root_classes:
|
|
74
|
+
- .ui-v1-avatar
|
|
@@ -2,6 +2,7 @@ component: UiAvatarList
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiAvatarList renders a compact list of avatars with consistent sizing. It is useful for showing
|
|
4
4
|
several users or actors in a narrow area.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiavatar--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -38,5 +39,32 @@ geometry:
|
|
|
38
39
|
ai_notes:
|
|
39
40
|
do:
|
|
40
41
|
- Use for compact grouped identity display.
|
|
42
|
+
- Keep the list short enough to scan.
|
|
41
43
|
avoid:
|
|
42
44
|
- Do not use it as a replacement for a full people list.
|
|
45
|
+
|
|
46
|
+
behavior:
|
|
47
|
+
notes:
|
|
48
|
+
- avatars prop should contain concise identity data, not full profile records.
|
|
49
|
+
- size should match the density of the surrounding table, menu, or card.
|
|
50
|
+
|
|
51
|
+
composition:
|
|
52
|
+
works_well_with:
|
|
53
|
+
- UiAvatar
|
|
54
|
+
- UiTooltip
|
|
55
|
+
patterns:
|
|
56
|
+
- title: Compact collaborators
|
|
57
|
+
notes: Use when several actors must be shown in a narrow table or header area.
|
|
58
|
+
|
|
59
|
+
accessibility:
|
|
60
|
+
notes:
|
|
61
|
+
- Keep rendered text concise and meaningful for screen-reader users.
|
|
62
|
+
- Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
|
|
63
|
+
|
|
64
|
+
styling:
|
|
65
|
+
notes:
|
|
66
|
+
- Use documented props and slots as the primary styling API.
|
|
67
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
68
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
69
|
+
root_classes:
|
|
70
|
+
- .ui-v1-avatar-list
|
|
@@ -3,6 +3,7 @@ summary: >
|
|
|
3
3
|
UiButton is the main action component in the library. It covers primary, secondary,
|
|
4
4
|
tertiary, and outlined use cases, can render as either a button or an anchor,
|
|
5
5
|
and adapts well to text-plus-icon and icon-only content.
|
|
6
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uibutton--docs
|
|
6
7
|
|
|
7
8
|
public_import:
|
|
8
9
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -211,14 +212,6 @@ composition:
|
|
|
211
212
|
- UiInfobox
|
|
212
213
|
- modal actions
|
|
213
214
|
|
|
214
|
-
examples:
|
|
215
|
-
- title: Dangerous secondary action
|
|
216
|
-
goal: Build a secondary destructive action.
|
|
217
|
-
code: |
|
|
218
|
-
<UiButton appearance="secondary" variant="danger">
|
|
219
|
-
<IconDelete aria-hidden="true" />
|
|
220
|
-
Delete
|
|
221
|
-
</UiButton>
|
|
222
215
|
|
|
223
216
|
ai_notes:
|
|
224
217
|
do:
|
|
@@ -2,6 +2,7 @@ component: UiCalendar
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCalendar is the date selection primitive behind date and date-range flows. It supports
|
|
4
4
|
single and range selection, multiple visual appearances, and locale-sensitive behavior.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicalendar--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -46,3 +47,30 @@ ai_notes:
|
|
|
46
47
|
- Use UiCalendar when inline calendar selection is the actual UI.
|
|
47
48
|
avoid:
|
|
48
49
|
- Use UiDatePicker instead if users expect textbox plus popup behavior.
|
|
50
|
+
|
|
51
|
+
composition:
|
|
52
|
+
works_well_with:
|
|
53
|
+
- UiDatePicker
|
|
54
|
+
- UiField
|
|
55
|
+
patterns:
|
|
56
|
+
- title: Inline calendar panel
|
|
57
|
+
notes: Use in dashboards or popover content when the calendar itself should remain visible.
|
|
58
|
+
- title: Date input
|
|
59
|
+
notes: Prefer UiDatePicker for normal forms and filters because it provides the textbox trigger and popper behavior.
|
|
60
|
+
|
|
61
|
+
accessibility:
|
|
62
|
+
notes:
|
|
63
|
+
- Prefer visible text labels for interactive controls.
|
|
64
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
65
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
66
|
+
keyboard:
|
|
67
|
+
- Tab moves focus to the control when it is focusable.
|
|
68
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
69
|
+
|
|
70
|
+
styling:
|
|
71
|
+
notes:
|
|
72
|
+
- Use documented props and slots as the primary styling API.
|
|
73
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
74
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
75
|
+
root_classes:
|
|
76
|
+
- .ui-v1-calendar
|
|
@@ -2,6 +2,7 @@ component: UiCheckbox
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCheckbox is a boolean or set-membership control. It supports single boolean-like usage
|
|
4
4
|
as well as model-plus-value patterns for checkbox groups.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicheckbox--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -49,5 +50,36 @@ behavior:
|
|
|
49
50
|
ai_notes:
|
|
50
51
|
do:
|
|
51
52
|
- Use for boolean choice or checkbox-group membership.
|
|
53
|
+
- Use indeterminate for parent selection such as "select all visible rows".
|
|
52
54
|
avoid:
|
|
53
55
|
- Do not use for mutually exclusive options.
|
|
56
|
+
|
|
57
|
+
composition:
|
|
58
|
+
works_well_with:
|
|
59
|
+
- UiField
|
|
60
|
+
- UiTable
|
|
61
|
+
- UiTableColumn
|
|
62
|
+
patterns:
|
|
63
|
+
- title: Form boolean
|
|
64
|
+
notes: Wrap in UiField when the checkbox needs a persistent label, hint, or validation text.
|
|
65
|
+
- title: Table row selection
|
|
66
|
+
notes: Use in the first narrow UiTableColumn for row selection; use indeterminate in the header checkbox for partial selection.
|
|
67
|
+
avoid:
|
|
68
|
+
- Do not use as a visual switch replacement when the action is an immediate on or off setting.
|
|
69
|
+
|
|
70
|
+
accessibility:
|
|
71
|
+
notes:
|
|
72
|
+
- Prefer visible text labels for interactive controls.
|
|
73
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
74
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
75
|
+
keyboard:
|
|
76
|
+
- Tab moves focus to the control when it is focusable.
|
|
77
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
78
|
+
|
|
79
|
+
styling:
|
|
80
|
+
notes:
|
|
81
|
+
- Use documented props and slots as the primary styling API.
|
|
82
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
83
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
84
|
+
root_classes:
|
|
85
|
+
- .ui-v1-checkbox
|
|
@@ -2,6 +2,7 @@ component: UiCollapse
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCollapse is a low-level show and hide container for expandable content. It controls
|
|
4
4
|
whether content is hidden or disposed and how the transition behaves.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicollapse--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -38,3 +39,36 @@ ai_notes:
|
|
|
38
39
|
- Use UiCollapse as a primitive for expandable content regions.
|
|
39
40
|
avoid:
|
|
40
41
|
- Do not use it when a full disclosure component is the actual need.
|
|
42
|
+
|
|
43
|
+
behavior:
|
|
44
|
+
notes:
|
|
45
|
+
- expanded controls visibility.
|
|
46
|
+
- collapseBehaviour controls whether collapsed content stays mounted or is disposed.
|
|
47
|
+
- duration controls transition timing.
|
|
48
|
+
|
|
49
|
+
composition:
|
|
50
|
+
works_well_with:
|
|
51
|
+
- UiCollapseBox
|
|
52
|
+
- UiCollapseGroup
|
|
53
|
+
patterns:
|
|
54
|
+
- title: Custom disclosure
|
|
55
|
+
notes: Use UiCollapse when the trigger and header are custom and only the body transition is needed.
|
|
56
|
+
- title: Standard disclosure box
|
|
57
|
+
notes: Use UiCollapseBox when the screen needs built-in header, icon, and box chrome.
|
|
58
|
+
|
|
59
|
+
accessibility:
|
|
60
|
+
notes:
|
|
61
|
+
- Prefer visible text labels for interactive controls.
|
|
62
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
63
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
64
|
+
keyboard:
|
|
65
|
+
- Tab moves focus to the control when it is focusable.
|
|
66
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
67
|
+
|
|
68
|
+
styling:
|
|
69
|
+
notes:
|
|
70
|
+
- Use documented props and slots as the primary styling API.
|
|
71
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
72
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
73
|
+
root_classes:
|
|
74
|
+
- .ui-v1-collapse
|
|
@@ -2,6 +2,7 @@ component: UiCollapseBox
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCollapseBox is a structured expandable container with built-in header, state handling,
|
|
4
4
|
and visual treatment. It is a higher-level companion to UiCollapse.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicollapsebox--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -47,5 +48,34 @@ behavior:
|
|
|
47
48
|
ai_notes:
|
|
48
49
|
do:
|
|
49
50
|
- Use UiCollapseBox for structured disclosure UI.
|
|
51
|
+
- Put the summary in the header and details in the body; avoid hiding critical required fields.
|
|
50
52
|
avoid:
|
|
51
53
|
- Do not rebuild collapse header UI manually when this component already fits.
|
|
54
|
+
|
|
55
|
+
composition:
|
|
56
|
+
works_well_with:
|
|
57
|
+
- UiCollapse
|
|
58
|
+
- UiCollapseGroup
|
|
59
|
+
- UiInfobox
|
|
60
|
+
patterns:
|
|
61
|
+
- title: Settings section
|
|
62
|
+
notes: Use for optional or advanced settings groups.
|
|
63
|
+
- title: Grouped disclosures
|
|
64
|
+
notes: Use inside UiCollapseGroup when multiple boxes should coordinate active state.
|
|
65
|
+
|
|
66
|
+
accessibility:
|
|
67
|
+
notes:
|
|
68
|
+
- Prefer visible text labels for interactive controls.
|
|
69
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
70
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
71
|
+
keyboard:
|
|
72
|
+
- Tab moves focus to the control when it is focusable.
|
|
73
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
74
|
+
|
|
75
|
+
styling:
|
|
76
|
+
notes:
|
|
77
|
+
- Use documented props and slots as the primary styling API.
|
|
78
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
79
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
80
|
+
root_classes:
|
|
81
|
+
- .ui-v1-collapse-box
|
|
@@ -2,6 +2,7 @@ component: UiCollapseGroup
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCollapseGroup coordinates several collapse boxes and tracks which box is active.
|
|
4
4
|
It is useful when multiple disclosures should behave as one grouped unit.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicollapsebox--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -37,3 +38,28 @@ geometry:
|
|
|
37
38
|
ai_notes:
|
|
38
39
|
do:
|
|
39
40
|
- Use with UiCollapseBox when grouped expansion matters.
|
|
41
|
+
avoid:
|
|
42
|
+
- Do not introduce a group for a single collapsible section.
|
|
43
|
+
|
|
44
|
+
behavior:
|
|
45
|
+
notes:
|
|
46
|
+
- activeBoxId tracks which child section is active.
|
|
47
|
+
- The component is mostly coordination logic rather than a visual container.
|
|
48
|
+
|
|
49
|
+
composition:
|
|
50
|
+
works_well_with:
|
|
51
|
+
- UiCollapseBox
|
|
52
|
+
patterns:
|
|
53
|
+
- title: Accordion-like settings
|
|
54
|
+
notes: Use when users should move between several related expandable sections.
|
|
55
|
+
|
|
56
|
+
accessibility:
|
|
57
|
+
notes:
|
|
58
|
+
- Keep visible labels and slot content meaningful.
|
|
59
|
+
- Prefer documented props and slots over custom DOM replacements so host-side accessibility behavior is preserved.
|
|
60
|
+
|
|
61
|
+
styling:
|
|
62
|
+
notes:
|
|
63
|
+
- Use documented props and slots as the primary styling API.
|
|
64
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
65
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
@@ -2,6 +2,7 @@ component: UiCopyButton
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCopyButton is an action component for copying text values with tooltip feedback.
|
|
4
4
|
It wraps copy behavior and copied-state hinting into one compact UI.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicopybutton--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -50,3 +51,37 @@ geometry:
|
|
|
50
51
|
ai_notes:
|
|
51
52
|
do:
|
|
52
53
|
- Use for copy-specific flows instead of recreating copy state manually.
|
|
54
|
+
- Provide the exact text prop that should be copied.
|
|
55
|
+
avoid:
|
|
56
|
+
- Do not use for actions whose primary purpose is not copying.
|
|
57
|
+
|
|
58
|
+
behavior:
|
|
59
|
+
notes:
|
|
60
|
+
- Shows normal hint content before copy and copied-state hint after successful copy.
|
|
61
|
+
- tooltipOptions customizes the hint surface.
|
|
62
|
+
|
|
63
|
+
composition:
|
|
64
|
+
works_well_with:
|
|
65
|
+
- UiTooltip
|
|
66
|
+
- UiButton
|
|
67
|
+
- UiTable
|
|
68
|
+
patterns:
|
|
69
|
+
- title: Copy value in a table
|
|
70
|
+
notes: Use for IDs, tokens, phones, or links where copying is a repeated row action.
|
|
71
|
+
|
|
72
|
+
accessibility:
|
|
73
|
+
notes:
|
|
74
|
+
- Prefer visible text labels for interactive controls.
|
|
75
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
76
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
77
|
+
keyboard:
|
|
78
|
+
- Tab moves focus to the control when it is focusable.
|
|
79
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
80
|
+
|
|
81
|
+
styling:
|
|
82
|
+
notes:
|
|
83
|
+
- Use documented props and slots as the primary styling API.
|
|
84
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
85
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
86
|
+
root_classes:
|
|
87
|
+
- .ui-v1-copy-button
|
package/docs/profiles/UiDate.yml
CHANGED
|
@@ -2,6 +2,7 @@ component: UiDate
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiDate is a display component for formatted date or date-time output. It is for presenting
|
|
4
4
|
date values, not for editing them.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uidate--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -36,3 +37,30 @@ geometry:
|
|
|
36
37
|
ai_notes:
|
|
37
38
|
do:
|
|
38
39
|
- Use UiDate for formatted output and UiDatePicker for input.
|
|
40
|
+
- Use withTime only when the time changes user interpretation.
|
|
41
|
+
avoid:
|
|
42
|
+
- Do not use for editable date fields or filter controls.
|
|
43
|
+
|
|
44
|
+
behavior:
|
|
45
|
+
notes:
|
|
46
|
+
- Renders semantic time output for display.
|
|
47
|
+
- locale should be explicit when the surrounding screen uses a specific locale.
|
|
48
|
+
|
|
49
|
+
composition:
|
|
50
|
+
works_well_with:
|
|
51
|
+
- UiTable
|
|
52
|
+
- UiDatePicker
|
|
53
|
+
patterns:
|
|
54
|
+
- title: Table date
|
|
55
|
+
notes: Use plain formatted output in tables; split date and time into separate lines only for compact scanning.
|
|
56
|
+
|
|
57
|
+
accessibility:
|
|
58
|
+
notes:
|
|
59
|
+
- Keep rendered text concise and meaningful for screen-reader users.
|
|
60
|
+
- Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
|
|
61
|
+
|
|
62
|
+
styling:
|
|
63
|
+
notes:
|
|
64
|
+
- Use documented props and slots as the primary styling API.
|
|
65
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
66
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
@@ -2,6 +2,7 @@ component: UiDatePicker
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiDatePicker combines textbox-like date display, popper behavior, and calendar selection.
|
|
4
4
|
It supports single-date and range flows, constraints, and quick options.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uidatepicker--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -55,5 +56,34 @@ behavior:
|
|
|
55
56
|
ai_notes:
|
|
56
57
|
do:
|
|
57
58
|
- Prefer UiDatePicker for typed or popup date input.
|
|
59
|
+
- Use textboxOptions for trigger sizing and placeholder behavior instead of custom trigger markup.
|
|
58
60
|
avoid:
|
|
59
61
|
- Do not use UiCalendar directly if a textbox trigger is expected.
|
|
62
|
+
|
|
63
|
+
composition:
|
|
64
|
+
works_well_with:
|
|
65
|
+
- UiField
|
|
66
|
+
- UiTable
|
|
67
|
+
- UiCalendar
|
|
68
|
+
patterns:
|
|
69
|
+
- title: Date filter
|
|
70
|
+
notes: Use in the filter area above UiTable for date and date-range filters; persist selected values in URL query parameters when routing exists.
|
|
71
|
+
- title: Form date input
|
|
72
|
+
notes: Wrap in UiField so label, hint, and validation are preserved.
|
|
73
|
+
|
|
74
|
+
accessibility:
|
|
75
|
+
notes:
|
|
76
|
+
- Prefer visible text labels for interactive controls.
|
|
77
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
78
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
79
|
+
keyboard:
|
|
80
|
+
- Tab moves focus to the control when it is focusable.
|
|
81
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
82
|
+
|
|
83
|
+
styling:
|
|
84
|
+
notes:
|
|
85
|
+
- Use documented props and slots as the primary styling API.
|
|
86
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
87
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
88
|
+
root_classes:
|
|
89
|
+
- .ui-v1-date-picker
|
|
@@ -2,6 +2,7 @@ component: UiError
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiError is a compact error-state component for short error messages or fallback states.
|
|
4
4
|
It is intended for concise inline error display rather than large alert copy.
|
|
5
|
+
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uierror--docs
|
|
5
6
|
|
|
6
7
|
public_import:
|
|
7
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -15,6 +16,19 @@ use_when:
|
|
|
15
16
|
avoid_when:
|
|
16
17
|
- You need a richer feedback block, use UiAlert or UiInfobox instead.
|
|
17
18
|
|
|
19
|
+
api:
|
|
20
|
+
key_props:
|
|
21
|
+
- name: message
|
|
22
|
+
notes: Fallback error text when default slot is not provided.
|
|
23
|
+
- name: align
|
|
24
|
+
notes: left or right text alignment.
|
|
25
|
+
- name: ellipsis
|
|
26
|
+
notes: Truncates long error text instead of wrapping.
|
|
27
|
+
slots:
|
|
28
|
+
- name: default
|
|
29
|
+
zone: error-content
|
|
30
|
+
creates: Error text or compact fallback content.
|
|
31
|
+
|
|
18
32
|
rendered_structure:
|
|
19
33
|
descriptive_only: true
|
|
20
34
|
root:
|
|
@@ -30,3 +44,34 @@ geometry:
|
|
|
30
44
|
ai_notes:
|
|
31
45
|
do:
|
|
32
46
|
- Use for compact error presentation.
|
|
47
|
+
- Keep the message short and specific.
|
|
48
|
+
avoid:
|
|
49
|
+
- Do not use for multi-paragraph explanations or page-level failures.
|
|
50
|
+
|
|
51
|
+
composition:
|
|
52
|
+
works_well_with:
|
|
53
|
+
- UiField
|
|
54
|
+
- UiAlert
|
|
55
|
+
patterns:
|
|
56
|
+
- title: Field or section error
|
|
57
|
+
notes: Use where the user needs to see a concise local error message.
|
|
58
|
+
- title: Page-level failure
|
|
59
|
+
notes: Use UiAlert or UiInfobox instead when the error needs explanation and actions.
|
|
60
|
+
|
|
61
|
+
behavior:
|
|
62
|
+
notes:
|
|
63
|
+
- Read key_props first to identify supported states and variants.
|
|
64
|
+
- Prefer controlled props and documented emits when synchronizing component state with screen logic.
|
|
65
|
+
|
|
66
|
+
accessibility:
|
|
67
|
+
notes:
|
|
68
|
+
- Keep rendered text concise and meaningful for screen-reader users.
|
|
69
|
+
- Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
|
|
70
|
+
|
|
71
|
+
styling:
|
|
72
|
+
notes:
|
|
73
|
+
- Use documented props and slots as the primary styling API.
|
|
74
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
75
|
+
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
76
|
+
root_classes:
|
|
77
|
+
- .ui-v1-error
|