@retailcrm/embed-ui-v1-components 0.9.21 → 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 +3 -3
- package/README.md +3 -4
- 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 +227 -50
- package/bin/postinstall.mjs +2 -1
- package/dist/host.cjs +1204 -488
- package/dist/host.css +629 -0
- package/dist/host.d.ts +100 -20
- package/dist/host.js +1205 -489
- package/dist/remote.cjs +1210 -153
- package/dist/remote.d.ts +786 -36
- package/dist/remote.js +1212 -155
- package/docs/AI.md +19 -20
- package/docs/COMPONENTS.md +58 -59
- package/docs/FORMAT.md +6 -8
- package/docs/PROFILES.md +34 -21
- package/docs/README.md +3 -6
- package/docs/profiles/{UiAddButton.yml → components/UiAddButton.yml} +49 -2
- package/docs/profiles/{UiAlert.yml → components/UiAlert.yml} +32 -2
- package/docs/profiles/{UiAvatar.yml → components/UiAvatar.yml} +17 -3
- package/docs/profiles/{UiAvatarList.yml → components/UiAvatarList.yml} +0 -2
- package/docs/profiles/{UiButton.yml → components/UiButton.yml} +14 -1
- package/docs/profiles/components/UiCalendar.yml +190 -0
- package/docs/profiles/{UiCheckbox.yml → components/UiCheckbox.yml} +28 -2
- package/docs/profiles/{UiCollapse.yml → components/UiCollapse.yml} +57 -2
- package/docs/profiles/{UiCollapseBox.yml → components/UiCollapseBox.yml} +64 -2
- package/docs/profiles/{UiCollapseGroup.yml → components/UiCollapseGroup.yml} +0 -2
- package/docs/profiles/{UiCopyButton.yml → components/UiCopyButton.yml} +19 -2
- package/docs/profiles/{UiDate.yml → components/UiDate.yml} +20 -2
- package/docs/profiles/{UiDatePicker.yml → components/UiDatePicker.yml} +51 -2
- package/docs/profiles/{UiError.yml → components/UiError.yml} +48 -2
- package/docs/profiles/{UiField.yml → components/UiField.yml} +46 -1
- package/docs/profiles/{UiInfobox.yml → components/UiInfobox.yml} +54 -2
- package/docs/profiles/{UiLink.yml → components/UiLink.yml} +22 -2
- package/docs/profiles/{UiLoader.yml → components/UiLoader.yml} +0 -2
- package/docs/profiles/{UiMenuItem.yml → components/UiMenuItem.yml} +0 -2
- package/docs/profiles/{UiMenuItemGroup.yml → components/UiMenuItemGroup.yml} +0 -2
- package/docs/profiles/{UiModalSidebar.yml → components/UiModalSidebar.yml} +80 -2
- package/docs/profiles/components/UiModalWindow.yml +181 -0
- package/docs/profiles/{UiModalWindowSurface.yml → components/UiModalWindowSurface.yml} +0 -2
- package/docs/profiles/{UiNumberStepper.yml → components/UiNumberStepper.yml} +14 -2
- package/docs/profiles/{UiPageHeader.yml → components/UiPageHeader.yml} +39 -1
- package/docs/profiles/components/UiPopconfirm.yml +164 -0
- package/docs/profiles/{UiPopper.yml → components/UiPopper.yml} +66 -1
- package/docs/profiles/{UiPopperConnector.yml → components/UiPopperConnector.yml} +0 -2
- package/docs/profiles/{UiPopperTarget.yml → components/UiPopperTarget.yml} +0 -2
- package/docs/profiles/{UiRadio.yml → components/UiRadio.yml} +15 -2
- package/docs/profiles/{UiRadioSwitch.yml → components/UiRadioSwitch.yml} +55 -1
- package/docs/profiles/{UiRadioSwitchOption.yml → components/UiRadioSwitchOption.yml} +0 -2
- package/docs/profiles/{UiScrollBox.yml → components/UiScrollBox.yml} +45 -2
- package/docs/profiles/{UiSelect.yml → components/UiSelect.yml} +133 -1
- package/docs/profiles/{UiSelectOption.yml → components/UiSelectOption.yml} +0 -2
- package/docs/profiles/{UiSelectOptionGroup.yml → components/UiSelectOptionGroup.yml} +0 -2
- package/docs/profiles/{UiSkeleton.yml → components/UiSkeleton.yml} +11 -2
- package/docs/profiles/{UiSlider.yml → components/UiSlider.yml} +85 -2
- package/docs/profiles/{UiSwitch.yml → components/UiSwitch.yml} +50 -2
- package/docs/profiles/{UiTab.yml → components/UiTab.yml} +126 -2
- package/docs/profiles/{UiTabGroup.yml → components/UiTabGroup.yml} +0 -1
- package/docs/profiles/components/UiTable.yml +622 -0
- package/docs/profiles/{UiTableBodyCell.yml → components/UiTableBodyCell.yml} +0 -2
- package/docs/profiles/{UiTableColumn.yml → components/UiTableColumn.yml} +0 -2
- package/docs/profiles/{UiTableFooterButton.yml → components/UiTableFooterButton.yml} +0 -2
- package/docs/profiles/{UiTableFooterSection.yml → components/UiTableFooterSection.yml} +0 -2
- package/docs/profiles/{UiTableHeadCell.yml → components/UiTableHeadCell.yml} +0 -2
- package/docs/profiles/{UiTableSorter.yml → components/UiTableSorter.yml} +0 -2
- package/docs/profiles/{UiTag.yml → components/UiTag.yml} +13 -2
- package/docs/profiles/{UiTextbox.yml → components/UiTextbox.yml} +20 -1
- package/docs/profiles/{UiTimePicker.yml → components/UiTimePicker.yml} +60 -2
- package/docs/profiles/{UiToggleButton.yml → components/UiToggleButton.yml} +16 -1
- package/docs/profiles/{UiToggleGroup.yml → components/UiToggleGroup.yml} +25 -1
- package/docs/profiles/{UiToggleGroupOption.yml → components/UiToggleGroupOption.yml} +0 -2
- package/docs/profiles/{UiToolbarButton.yml → components/UiToolbarButton.yml} +15 -2
- package/docs/profiles/{UiToolbarLink.yml → components/UiToolbarLink.yml} +13 -2
- package/docs/profiles/{UiTooltip.yml → components/UiTooltip.yml} +18 -2
- package/docs/profiles/{UiTransition.yml → components/UiTransition.yml} +0 -2
- package/docs/profiles/{UiYandexMap.yml → components/UiYandexMap.yml} +24 -2
- 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 +1 -1
- package/docs/AGENT-DESIGN-GUIDELINES.md +0 -463
- 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/UiCalendar.yml +0 -76
- package/docs/profiles/UiImage.yml +0 -67
- package/docs/profiles/UiModalWindow.yml +0 -86
- package/docs/profiles/UiTable.yml +0 -300
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
page_profile: ModalSidebar
|
|
2
|
+
summary: >
|
|
3
|
+
Side-docked modal pattern for small contextual forms, local additional information,
|
|
4
|
+
or compact entity cards.
|
|
5
|
+
|
|
6
|
+
use_when:
|
|
7
|
+
- You need a small contextual form.
|
|
8
|
+
- You need local additional information connected to the current page.
|
|
9
|
+
- You need a compact entity card with a limited number of fields and settings.
|
|
10
|
+
|
|
11
|
+
examples_from_design:
|
|
12
|
+
- task card
|
|
13
|
+
- notifications
|
|
14
|
+
- new ticket
|
|
15
|
+
- scenario step editing
|
|
16
|
+
|
|
17
|
+
examples:
|
|
18
|
+
- title: Footer actions
|
|
19
|
+
code: |
|
|
20
|
+
<template>
|
|
21
|
+
<div>
|
|
22
|
+
<UiButton @click="open = true">
|
|
23
|
+
Open sidebar
|
|
24
|
+
</UiButton>
|
|
25
|
+
|
|
26
|
+
<UiModalSidebar v-model:opened="open">
|
|
27
|
+
<template #title>
|
|
28
|
+
Title
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<div class="modal-sidebar-example__body">
|
|
32
|
+
Sidebar content
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<template #footer>
|
|
36
|
+
<div class="modal-sidebar-footer">
|
|
37
|
+
<div class="modal-sidebar-footer__main">
|
|
38
|
+
<UiButton @click="save">
|
|
39
|
+
Save
|
|
40
|
+
</UiButton>
|
|
41
|
+
|
|
42
|
+
<UiButton appearance="secondary" @click="open = false">
|
|
43
|
+
Close
|
|
44
|
+
</UiButton>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<UiButton
|
|
48
|
+
aria-label="Delete"
|
|
49
|
+
appearance="tertiary"
|
|
50
|
+
class="modal-sidebar-footer__delete"
|
|
51
|
+
variant="danger"
|
|
52
|
+
@click="deleteItem"
|
|
53
|
+
>
|
|
54
|
+
<IconDelete
|
|
55
|
+
aria-hidden="true"
|
|
56
|
+
class="modal-sidebar-footer__delete-icon"
|
|
57
|
+
/>
|
|
58
|
+
</UiButton>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
</UiModalSidebar>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script lang="ts" setup>
|
|
66
|
+
import { ref } from 'vue'
|
|
67
|
+
|
|
68
|
+
import IconDelete from '@retailcrm/embed-ui-v1-components/assets/sprites/ui/delete.svg'
|
|
69
|
+
import {
|
|
70
|
+
UiButton,
|
|
71
|
+
UiModalSidebar,
|
|
72
|
+
} from '@retailcrm/embed-ui-v1-components/remote'
|
|
73
|
+
|
|
74
|
+
const open = ref(false)
|
|
75
|
+
|
|
76
|
+
const save = () => {
|
|
77
|
+
open.value = false
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const deleteItem = () => {
|
|
81
|
+
open.value = false
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<style scoped>
|
|
86
|
+
.modal-sidebar-example__body {
|
|
87
|
+
min-height: 360px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.modal-sidebar-footer {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.modal-sidebar-footer__main {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 16px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.modal-sidebar-footer__delete.ui-v1-button {
|
|
104
|
+
color: #8a96a6;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.modal-sidebar-footer__delete.ui-v1-button:hover,
|
|
108
|
+
.modal-sidebar-footer__delete.ui-v1-button:focus-visible {
|
|
109
|
+
color: #dd4040;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.modal-sidebar-footer__delete-icon {
|
|
113
|
+
display: block;
|
|
114
|
+
width: 24px;
|
|
115
|
+
height: 24px;
|
|
116
|
+
}
|
|
117
|
+
</style>
|
|
118
|
+
|
|
119
|
+
size_rules:
|
|
120
|
+
- Sidebar can use 720px width.
|
|
121
|
+
- Sidebar can use 416px width.
|
|
122
|
+
|
|
123
|
+
expected_structure:
|
|
124
|
+
- Fixed header at the top with title and close button.
|
|
125
|
+
- Header can also contain extra text, icon, button, or tag.
|
|
126
|
+
- If a sidebar opens from another sidebar, show a back arrow to return to the previous sidebar.
|
|
127
|
+
- Fixed footer at the bottom.
|
|
128
|
+
- Footer usually contains save, cancel or close, and delete actions.
|
|
129
|
+
- Footer can also contain a copy button or auxiliary text.
|
|
130
|
+
- Content can be flexible, but should stay compact.
|
|
131
|
+
- Small tables can be placed in sidebars.
|
|
132
|
+
|
|
133
|
+
recommended_components:
|
|
134
|
+
- name: UiModalSidebar
|
|
135
|
+
profile: ../components/UiModalSidebar.yml
|
|
136
|
+
- name: UiButton
|
|
137
|
+
profile: ../components/UiButton.yml
|
|
138
|
+
- name: UiTag
|
|
139
|
+
profile: ../components/UiTag.yml
|
|
140
|
+
- name: UiField
|
|
141
|
+
profile: ../components/UiField.yml
|
|
142
|
+
- name: UiTextbox
|
|
143
|
+
profile: ../components/UiTextbox.yml
|
|
144
|
+
- name: UiSelect
|
|
145
|
+
profile: ../components/UiSelect.yml
|
|
146
|
+
- name: UiTable
|
|
147
|
+
profile: ../components/UiTable.yml
|
|
148
|
+
notes: Use only for small, simple tables.
|
|
149
|
+
|
|
150
|
+
ai_notes:
|
|
151
|
+
do:
|
|
152
|
+
- Use for inspect, edit, or secondary workflows related to the current list or page.
|
|
153
|
+
- Keep the flow compact.
|
|
154
|
+
avoid:
|
|
155
|
+
- Do not use for bulky or complex interfaces.
|
|
156
|
+
- Do not use collapse blocks inside sidebars.
|
|
157
|
+
- Do not use two-column content on separate surfaces.
|
|
158
|
+
- Use a full page or modal window for bulky flows.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
page_profile: ModalWindow
|
|
2
|
+
summary: >
|
|
3
|
+
Centered modal pattern for large contextual tables or additional local settings when a sidebar is not enough.
|
|
4
|
+
|
|
5
|
+
use_when:
|
|
6
|
+
- You need a large local workflow.
|
|
7
|
+
- You need auxiliary table content.
|
|
8
|
+
- You need dense local settings that do not fit a sidebar.
|
|
9
|
+
|
|
10
|
+
examples_from_design:
|
|
11
|
+
- adding products to an order
|
|
12
|
+
- marking products in an order
|
|
13
|
+
- viewing an email from the communication list
|
|
14
|
+
- merging duplicates in the database cleanliness section
|
|
15
|
+
|
|
16
|
+
size_rules:
|
|
17
|
+
- Modal can use 960px width.
|
|
18
|
+
- Modal can use full screen with side margins.
|
|
19
|
+
|
|
20
|
+
expected_structure:
|
|
21
|
+
- Fixed header at the top with title and close button.
|
|
22
|
+
- Header can include extra text, icon, button, or tag.
|
|
23
|
+
- Fixed footer at the bottom.
|
|
24
|
+
- Footer usually contains save, cancel or close, and delete actions.
|
|
25
|
+
- Footer can also contain a copy button or auxiliary text.
|
|
26
|
+
- Content can be flexible; tables are a common modal use case.
|
|
27
|
+
- If a modal contains a table, the table stretches across the modal width.
|
|
28
|
+
- If a modal is split into sections, use large tabs instead of a regular modal header.
|
|
29
|
+
|
|
30
|
+
spacing_rules:
|
|
31
|
+
- Left, right, and bottom margins are 32px.
|
|
32
|
+
- Top margin is 24px.
|
|
33
|
+
|
|
34
|
+
recommended_components:
|
|
35
|
+
- name: UiModalWindow
|
|
36
|
+
profile: ../components/UiModalWindow.yml
|
|
37
|
+
- name: UiButton
|
|
38
|
+
profile: ../components/UiButton.yml
|
|
39
|
+
- name: UiTabGroup
|
|
40
|
+
profile: ../components/UiTabGroup.yml
|
|
41
|
+
- name: UiTab
|
|
42
|
+
profile: ../components/UiTab.yml
|
|
43
|
+
- name: UiTable
|
|
44
|
+
profile: ../components/UiTable.yml
|
|
45
|
+
- name: UiTableColumn
|
|
46
|
+
profile: ../components/UiTableColumn.yml
|
|
47
|
+
- name: UiTableFooterSection
|
|
48
|
+
profile: ../components/UiTableFooterSection.yml
|
|
49
|
+
|
|
50
|
+
ai_notes:
|
|
51
|
+
do:
|
|
52
|
+
- Use for workflows that need width, table content, or several sections.
|
|
53
|
+
- Use large tabs when modal content is split into sections.
|
|
54
|
+
avoid:
|
|
55
|
+
- Do not use a sidebar when content needs wide tables or complex controls.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
page_profile: MultiColumnPage
|
|
2
|
+
summary: >
|
|
3
|
+
Detail-page pattern for entity cards with several semantic blocks that should be visible in parallel.
|
|
4
|
+
|
|
5
|
+
use_when:
|
|
6
|
+
- You need an entity detail page with multiple related blocks.
|
|
7
|
+
- You need order, customer, or product information visible in parallel.
|
|
8
|
+
|
|
9
|
+
examples_from_design:
|
|
10
|
+
- order page
|
|
11
|
+
- customer page
|
|
12
|
+
- product view page
|
|
13
|
+
|
|
14
|
+
layout_rules:
|
|
15
|
+
- Content is placed on surfaces.
|
|
16
|
+
- The most common surface spans the full screen width.
|
|
17
|
+
- Semantic blocks can be arranged vertically and horizontally.
|
|
18
|
+
- Distance between blocks is 24px.
|
|
19
|
+
- Allowed width distributions are 100%, 50% / 50%, and 30% / 70%.
|
|
20
|
+
|
|
21
|
+
ai_notes:
|
|
22
|
+
do:
|
|
23
|
+
- Keep hierarchy operational and dense.
|
|
24
|
+
- Use parallel blocks only when users need to compare or scan them together.
|
|
25
|
+
avoid:
|
|
26
|
+
- Do not use marketing-style layouts.
|
|
27
|
+
- Do not split content into columns when a single linear form is easier to complete.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
page_profile: PageComposition
|
|
2
|
+
summary: >
|
|
3
|
+
Shared page-composition rules for RetailCRM extension screens built with
|
|
4
|
+
@retailcrm/embed-ui-v1-components.
|
|
5
|
+
|
|
6
|
+
use_after:
|
|
7
|
+
- ../../README.md
|
|
8
|
+
- ../../../AGENTS.md
|
|
9
|
+
- ../../AI.md
|
|
10
|
+
- ../components
|
|
11
|
+
|
|
12
|
+
scope:
|
|
13
|
+
- Page-composition guidance for full pages, modals, sidebars, filters, tables, and settings layouts.
|
|
14
|
+
- Complements component API profiles instead of replacing them.
|
|
15
|
+
|
|
16
|
+
shared_rules:
|
|
17
|
+
- Page title uses the large accent text style, Text large Accent 24.
|
|
18
|
+
- Page-level actions sit to the right of the title.
|
|
19
|
+
- A page can have only one Default Primary button and one Success Primary button.
|
|
20
|
+
- Additional page actions can use secondary or tertiary variants when the task needs them.
|
|
21
|
+
- When a group has multiple buttons, the primary action should represent the main flow.
|
|
22
|
+
- Secondary actions should support or cancel the primary flow.
|
|
23
|
+
- Components inside pages and blocks should be spaced by values divisible by 4px.
|
|
24
|
+
- Common spacing values are 4, 8, 12, 16, 20, 24, 28, and 32px.
|
|
25
|
+
- Content blocks commonly use 32px left, right, and bottom padding and 24px top padding.
|
|
26
|
+
- Prefer public components from @retailcrm/embed-ui-v1-components/remote.
|
|
27
|
+
- Do not invent custom chrome for pages, forms, tables, tabs, buttons, modals, or sidebars when a documented component fits.
|
|
28
|
+
|
|
29
|
+
decision_guide:
|
|
30
|
+
- need: Searchable, filterable registry.
|
|
31
|
+
use: EntityListPage
|
|
32
|
+
profile: ./EntityListPage.yml
|
|
33
|
+
- need: Entity editing or settings form.
|
|
34
|
+
use: CardSettingsPage
|
|
35
|
+
profile: ./CardSettingsPage.yml
|
|
36
|
+
- need: Several semantic blocks visible together.
|
|
37
|
+
use: MultiColumnPage
|
|
38
|
+
profile: ./MultiColumnPage.yml
|
|
39
|
+
- need: Grouped settings with independent sections.
|
|
40
|
+
use: CollapseBlockPage
|
|
41
|
+
profile: ./CollapseBlockPage.yml
|
|
42
|
+
- need: Small contextual form or compact entity card.
|
|
43
|
+
use: ModalSidebar
|
|
44
|
+
profile: ./ModalSidebar.yml
|
|
45
|
+
- need: Large local workflow, auxiliary table, or dense settings flow.
|
|
46
|
+
use: ModalWindow
|
|
47
|
+
profile: ./ModalWindow.yml
|
|
48
|
+
|
|
49
|
+
ai_notes:
|
|
50
|
+
do:
|
|
51
|
+
- Choose ModalSidebar only when the flow is compact.
|
|
52
|
+
- Choose ModalWindow or a full page when content needs wide tables, several sections, or complex controls.
|
|
53
|
+
- Keep operational CRM screens dense, scannable, and work-focused.
|
|
54
|
+
avoid:
|
|
55
|
+
- Do not turn internal CRM work screens into marketing-style layouts.
|
|
56
|
+
- Do not hide filters or primary workflow controls away from the content they affect.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@retailcrm/embed-ui-v1-components",
|
|
3
3
|
"bin": "./bin/embed-ui-v1-components.mjs",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.22-alpha.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "RetailDriverLLC <integration@retailcrm.ru>",
|
|
8
8
|
"repository": "git@github.com:retailcrm/embed-ui.git",
|