@retailcrm/embed-ui-v1-components 0.9.23 → 0.9.25

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.
@@ -70,5 +70,7 @@ styling:
70
70
  notes:
71
71
  - Use documented props and slots as the primary styling API.
72
72
  - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
73
+ - Selected, active, focused, pressed, and disabled option states are owned by UiSelect/UiSelectOption implementation styles.
74
+ - Do not add custom outlines or borders for selected options unless the task records a project-specific design requirement.
73
75
  root_classes:
74
76
  - .ui-v1-select-option
@@ -58,11 +58,72 @@ examples:
58
58
 
59
59
  const enabled = ref(false)
60
60
  </script>
61
+ - title: Settings row with label and hint
62
+ code: |
63
+ <template>
64
+ <div class="settings-switch-row">
65
+ <UiSwitch
66
+ :id="switchId"
67
+ v-model:value="enabled"
68
+ />
69
+
70
+ <div class="settings-switch-row__content">
71
+ <label
72
+ class="settings-switch-row__label"
73
+ :for="switchId"
74
+ >
75
+ Enable automatic assignment
76
+ </label>
77
+
78
+ <div class="settings-switch-row__hint">
79
+ New requests will be assigned to available managers.
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </template>
84
+
85
+ <script lang="ts" setup>
86
+ import { ref, useId } from 'vue'
87
+
88
+ import { UiSwitch } from '@retailcrm/embed-ui-v1-components/remote'
89
+
90
+ const enabled = ref(false)
91
+ const switchId = useId()
92
+ </script>
93
+
94
+ <style lang="less" scoped>
95
+ @import (reference) '@retailcrm/embed-ui-v1-components/assets/stylesheets/layout.less';
96
+ @import (reference) '@retailcrm/embed-ui-v1-components/assets/stylesheets/palette.less';
97
+ @import (reference) '@retailcrm/embed-ui-v1-components/assets/stylesheets/typography.less';
98
+
99
+ .settings-switch-row {
100
+ display: flex;
101
+ align-items: flex-start;
102
+ gap: 3 * @spacing-unit;
103
+ }
104
+
105
+ .settings-switch-row__content {
106
+ display: grid;
107
+ gap: @spacing-xxs;
108
+ min-width: 0;
109
+ }
110
+
111
+ .settings-switch-row__label {
112
+ color: @black-500;
113
+ .text-small-accent();
114
+ }
115
+
116
+ .settings-switch-row__hint {
117
+ color: @grey-800;
118
+ .text-small();
119
+ }
120
+ </style>
61
121
  use_when:
62
122
  - You need a compact on or off toggle.
63
123
 
64
124
  avoid_when:
65
125
  - You need checkbox-group semantics.
126
+ - You need a UiField-style labeled wrapper; pair UiSwitch with a visible label and hint text instead.
66
127
 
67
128
  api:
68
129
  key_props:
@@ -93,18 +154,23 @@ behavior:
93
154
 
94
155
  composition:
95
156
  works_well_with:
96
- - UiField
157
+ - visible label
158
+ - hint text
97
159
  patterns:
98
160
  - title: Settings row
99
- notes: Pair with a visible label and optional description so the on or off state is unambiguous.
161
+ notes: Place UiSwitch on the left, label and hint on the right, and connect UiSwitch id with label for.
100
162
  avoid:
101
163
  - Do not use without a nearby label; the switch alone does not explain what will change.
164
+ - Do not wrap UiSwitch in UiField.
102
165
 
103
166
  ai_notes:
104
167
  do:
105
168
  - Use for compact feature toggles and enable or disable settings.
169
+ - Generate an id, pass it to UiSwitch, and connect the visible label with label for.
170
+ - Put helper text below the label in the settings row, not in UiField hint.
106
171
  avoid:
107
172
  - Do not use for multi-select lists or legal acknowledgements; use UiCheckbox.
173
+ - Do not use UiField around UiSwitch.
108
174
 
109
175
  accessibility:
110
176
  notes:
@@ -10,13 +10,16 @@ public_import:
10
10
 
11
11
  related_components:
12
12
  - UiAvatar
13
+ - UiButton
13
14
  - UiCheckbox
14
15
  - UiLink
16
+ - UiPopperConnector
15
17
  - UiTableColumn
16
18
  - UiTableFooterButton
17
19
  - UiTableFooterSection
18
20
  - UiTableSorter
19
21
  - UiTag
22
+ - UiTooltip
20
23
 
21
24
  examples:
22
25
  - title: Basic table
@@ -64,6 +67,68 @@ examples:
64
67
  Sent: '#1FA971',
65
68
  }
66
69
  </script>
70
+ - title: Icon-only row action with tooltip
71
+ notes:
72
+ - Use narrow action columns for row commands.
73
+ - Keep the visible control icon-only; put the action text in aria-label and UiTooltip.
74
+ code: |
75
+ <template>
76
+ <UiTable
77
+ bordered
78
+ :rows="rows"
79
+ row-key="id"
80
+ >
81
+ <UiTableColumn label="Name">
82
+ <template #cell="{ row }">
83
+ {{ row.name }}
84
+ </template>
85
+ </UiTableColumn>
86
+
87
+ <UiTableColumn :width="48" label="" trim>
88
+ <template #cell="{ row }">
89
+ <UiPopperConnector>
90
+ <UiButton
91
+ :aria-label="`Edit ${row.name}`"
92
+ appearance="tertiary"
93
+ size="sm"
94
+ @click="edit(row)"
95
+ >
96
+ <IconEdit aria-hidden="true" />
97
+ </UiButton>
98
+
99
+ <UiTooltip>
100
+ Edit {{ row.name }}
101
+ </UiTooltip>
102
+ </UiPopperConnector>
103
+ </template>
104
+ </UiTableColumn>
105
+ </UiTable>
106
+ </template>
107
+
108
+ <script lang="ts" setup>
109
+ import IconEdit from '@retailcrm/embed-ui-v1-components/assets/sprites/ui/edit.svg'
110
+ import {
111
+ UiButton,
112
+ UiPopperConnector,
113
+ UiTable,
114
+ UiTableColumn,
115
+ UiTooltip,
116
+ } from '@retailcrm/embed-ui-v1-components/remote'
117
+
118
+ type Row = {
119
+ id: number
120
+ name: string
121
+ }
122
+
123
+ const rows: Row[] = [
124
+ { id: 101, name: 'Anna Smith' },
125
+ { id: 102, name: 'Ilya Johnson' },
126
+ ]
127
+
128
+ const edit = (row: Row) => {
129
+ console.log(row)
130
+ }
131
+ </script>
67
132
  - title: Expandable rows table
68
133
  notes:
69
134
  - Use the expand slot and cell toggle helper for expandable row details.
@@ -421,6 +486,7 @@ use_when:
421
486
 
422
487
  avoid_when:
423
488
  - You need a simple list or card layout.
489
+ - You need content inside a generic white card surface instead of a table.
424
490
 
425
491
  api:
426
492
  key_props:
@@ -491,6 +557,7 @@ geometry:
491
557
  - Root fills available width.
492
558
  - fixed=true switches table-layout from auto to fixed.
493
559
  - bordered=true adds border and corner rounding through CSS variables.
560
+ - Do not wrap UiTable in an extra white content surface; use a plain layout or scroll wrapper only when needed.
494
561
  - Filters and search controls should usually be placed above the table, not in the table root.
495
562
  - Table-scoped pagination belongs in footer slots when custom controls are needed.
496
563
 
@@ -593,6 +660,12 @@ composition:
593
660
  - Add scoped CSS for footer meta height, control-row background, pagination button size, active page state, arrow icon size, and vertical dividers.
594
661
  - Persist page and page size in URL query parameters when routing is available.
595
662
  - Reset page to 1 when filters or sorting change.
663
+ actions:
664
+ notes:
665
+ - Prefer narrow action columns with icon-only UiButton controls for row commands.
666
+ - Keep visible button text out of dense table rows; provide aria-label and matching UiTooltip text.
667
+ - Use package sprite icons and set aria-hidden on the icon itself.
668
+ - Wrap action buttons and UiTooltip in UiPopperConnector. Add UiPopperTarget only for custom non-component targets.
596
669
 
597
670
  ai_notes:
598
671
  do:
@@ -603,9 +676,12 @@ ai_notes:
603
676
  - Compose footer controls with UiTableFooterSection and UiTableFooterButton.
604
677
  - Copy the Entity list table footer example when building a realistic entity-list footer.
605
678
  - Use UiTableSorter for sortable headers.
679
+ - Use icon-only row action buttons with aria-label and UiTooltip in action columns.
606
680
  avoid:
607
681
  - Do not hide table filters in page header actions.
682
+ - Do not wrap UiTable in an additional white card, panel, or content-surface container.
608
683
  - Do not use UiButton inside table footer pagination.
684
+ - Do not put visible text buttons in dense table action columns.
609
685
  - Do not put pagination only in local state when the screen has routable result sets.
610
686
  - Do not import table internals from host or src paths.
611
687
 
@@ -60,6 +60,7 @@ ai_notes:
60
60
  do:
61
61
  - Use UiTooltip for tooltip semantics and UiPopper for lower-level floating behavior.
62
62
  - Keep tooltip content short and non-essential.
63
+ - For icon-only controls, keep tooltip text aligned with the control aria-label.
63
64
  avoid:
64
65
  - Do not put forms, tables, or multi-step interactions in tooltips.
65
66
 
@@ -20,8 +20,11 @@ expected_structure:
20
20
  - Header actions can be accompanied by text information or status labels.
21
21
  - Optional top tabs.
22
22
  - Main content sits on a white content surface.
23
+ - The white content surface owns the 24px top and 32px side/bottom padding.
24
+ - The page root wrapper should not repeat that padding.
23
25
  - Content can include text, buttons, fields, checkboxes, radio groups, switches, and other form controls.
24
26
  - A bottom save panel is optional.
27
+ - If a bottom save panel is used, its main save or apply action should be Success Primary.
25
28
 
26
29
  recommended_components:
27
30
  - name: UiPageHeader
@@ -54,5 +57,7 @@ ai_notes:
54
57
  - Keep form controls grouped by task or semantic section.
55
58
  - Use UiField around labelled form controls.
56
59
  - Use tabs only when they reduce visible complexity without hiding required work.
60
+ - Keep save/apply as the strongest footer action and move neighboring actions to secondary or tertiary appearances unless their variant has a distinct page-level meaning.
57
61
  avoid:
58
62
  - Do not create a decorative landing page for operational settings.
63
+ - Do not put content-surface padding on the root page wrapper.
@@ -15,6 +15,9 @@ expected_structure:
15
15
  - Multiple collapsible blocks with their own content and local actions.
16
16
  - If the page contains only collapse blocks, the white page surface is not needed.
17
17
  - If every collapse block has its own save action, the bottom save panel is not needed.
18
+ - Treat each collapse block as a local mini-page with its own action priority.
19
+ - Each collapse block footer can have one Default Primary action for the main local action.
20
+ - If a block has a stronger create/save/apply action, make that local action Success Primary and move other actions to Default Primary, secondary, or tertiary by meaning.
18
21
  - Collapse blocks can contain text, buttons, fields, controls, and small tables.
19
22
 
20
23
  avoid_inside_blocks:
@@ -41,6 +44,9 @@ ai_notes:
41
44
  do:
42
45
  - Use collapses for optional or separable sections.
43
46
  - Keep required critical actions visible enough for the workflow.
47
+ - Put local section actions in the UiCollapseBox footer or footer-content slot.
48
+ - Apply primary-button limits inside each collapse block independently from the page-level footer.
44
49
  avoid:
45
50
  - Do not nest collapses inside collapses.
46
51
  - Do not hide complex tables inside collapse blocks.
52
+ - Do not add a global bottom save panel when each collapse block already has its own local save action.
@@ -17,13 +17,16 @@ expected_structure:
17
17
  - UiPageHeader with a page title.
18
18
  - One or more 48px page buttons on the right side of the header.
19
19
  - If there are multiple header buttons, one should be primary and the rest can be secondary or tertiary.
20
- - The main primary button usually creates a new entity for the list.
20
+ - The main Default Primary button usually creates a new entity for the list when there is no stronger Success Primary action on the page.
21
21
  - Filters above the table, built from controls such as select, textbox, and combobox-like selection components.
22
22
  - Filter controls should run in rows of roughly 4-5 fields, then wrap to the next row.
23
23
  - Filters can be collapsible.
24
24
  - Filter apply action uses a default secondary 36px text button.
25
25
  - Filter reset action uses a danger secondary 36px icon button.
26
26
  - Entity data is shown in a table.
27
+ - UiTable should not be wrapped in an extra white content surface.
28
+ - A wrapper around UiTable should only handle layout, width, or scrolling, without card chrome or content-surface padding.
29
+ - Row action columns should use icon-only buttons with aria-label and UiTooltip instead of visible text buttons.
27
30
  - The table may scroll and may support export.
28
31
 
29
32
  recommended_components:
@@ -61,6 +64,9 @@ ai_notes:
61
64
  - Keep filters and table controls directly above the table.
62
65
  - Persist filters, sorting, page, and page size in query parameters when routing is available.
63
66
  - Reset page to 1 when filters or sorting change.
67
+ - Use narrow icon-only row action columns with matching aria-label and UiTooltip text.
64
68
  avoid:
65
69
  - Do not hide filters in page header actions.
66
70
  - Do not put pagination only in local state when the result set is routable.
71
+ - Do not place UiTable inside an additional white card or padded content surface.
72
+ - Do not use visible text buttons for dense table row actions.
@@ -44,18 +44,30 @@ examples:
44
44
  </UiButton>
45
45
  </div>
46
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>
47
+ <div class="modal-sidebar-footer__aside">
48
+ <UiPopconfirm
49
+ ok-variant="danger"
50
+ title="Delete item?"
51
+ @ok="deleteItem"
52
+ >
53
+ <template #trigger="{ open: popconfirmOpen }">
54
+ <UiButton
55
+ :active="popconfirmOpen"
56
+ aria-label="Delete"
57
+ appearance="tertiary"
58
+ class="modal-sidebar-footer__delete"
59
+ variant="danger"
60
+ >
61
+ <IconDelete
62
+ aria-hidden="true"
63
+ class="modal-sidebar-footer__delete-icon"
64
+ />
65
+ </UiButton>
66
+ </template>
67
+
68
+ This action cannot be undone.
69
+ </UiPopconfirm>
70
+ </div>
59
71
  </div>
60
72
  </template>
61
73
  </UiModalSidebar>
@@ -69,6 +81,7 @@ examples:
69
81
  import {
70
82
  UiButton,
71
83
  UiModalSidebar,
84
+ UiPopconfirm,
72
85
  } from '@retailcrm/embed-ui-v1-components/remote'
73
86
 
74
87
  const open = ref(false)
@@ -95,6 +108,12 @@ examples:
95
108
  }
96
109
 
97
110
  .modal-sidebar-footer__main {
111
+ display: flex;
112
+ align-items: center;
113
+ gap: 12px;
114
+ }
115
+
116
+ .modal-sidebar-footer__aside {
98
117
  display: flex;
99
118
  align-items: center;
100
119
  gap: 16px;
@@ -127,6 +146,10 @@ expected_structure:
127
146
  - Fixed footer at the bottom.
128
147
  - Footer usually contains save, cancel or close, and delete actions.
129
148
  - Footer can also contain a copy button or auxiliary text.
149
+ - Footer actions may be split into left and right groups.
150
+ - Footer action groups usually use a 12px or 16px gap between neighboring buttons.
151
+ - Destructive footer actions are often icon-only buttons aligned to the right edge.
152
+ - Destructive icon-only actions should usually open UiPopconfirm with okVariant="danger"; its confirmation button is primary by default.
130
153
  - Content can be flexible, but should stay compact.
131
154
  - Small tables can be placed in sidebars.
132
155
 
@@ -135,6 +158,8 @@ recommended_components:
135
158
  profile: ../components/UiModalSidebar.yml
136
159
  - name: UiButton
137
160
  profile: ../components/UiButton.yml
161
+ - name: UiPopconfirm
162
+ profile: ../components/UiPopconfirm.yml
138
163
  - name: UiTag
139
164
  profile: ../components/UiTag.yml
140
165
  - name: UiField
@@ -151,6 +176,9 @@ ai_notes:
151
176
  do:
152
177
  - Use for inspect, edit, or secondary workflows related to the current list or page.
153
178
  - Keep the flow compact.
179
+ - Split footer actions into meaningful left and right groups when secondary or destructive actions need separation.
180
+ - Use 12px or 16px gaps inside each footer action group.
181
+ - Put destructive icon-only actions on the right and confirm them with UiPopconfirm okVariant="danger"; the confirmation button is primary by default.
154
182
  avoid:
155
183
  - Do not use for bulky or complex interfaces.
156
184
  - Do not use collapse blocks inside sidebars.
@@ -14,6 +14,7 @@ examples_from_design:
14
14
  layout_rules:
15
15
  - Content is placed on surfaces.
16
16
  - The most common surface spans the full screen width.
17
+ - Surface padding belongs to each content surface, not to the page root wrapper.
17
18
  - Semantic blocks can be arranged vertically and horizontally.
18
19
  - Distance between blocks is 24px.
19
20
  - Allowed width distributions are 100%, 50% / 50%, and 30% / 70%.
@@ -25,3 +26,4 @@ ai_notes:
25
26
  avoid:
26
27
  - Do not use marketing-style layouts.
27
28
  - Do not split content into columns when a single linear form is easier to complete.
29
+ - Do not duplicate content-surface padding on the page root wrapper.
@@ -16,13 +16,21 @@ scope:
16
16
  shared_rules:
17
17
  - Page title uses the large accent text style, Text large Accent 24.
18
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.
19
+ - A full page should have at most one page-level primary button of each variant, Success Primary, Default Primary, and Danger Primary.
20
+ - Use Success Primary for the page's strongest call to action when it creates or commits a result, such as Save, Apply, or Create.
21
+ - Place the page-level Success Primary action in UiPageFooter for save or apply workflows.
22
+ - Use Default Primary for an important action that is secondary to the Success Primary or does not commit a result.
23
+ - Use Danger Primary only for one critical destructive action when the page needs it.
24
+ - If several actions compete for attention, choose the main one for Success Primary and move the rest to Default Primary, secondary, tertiary, or dropdown actions by meaning.
25
+ - UiPageHeader actions and UiPageFooter actions belong to the same page-level action scope.
26
+ - Treat each UiCollapseBox footer as a separate local action scope with the same rules scoped to that section.
27
+ - A page can have several Default Primary buttons when each one belongs to a different UiCollapseBox footer.
22
28
  - Secondary actions should support or cancel the primary flow.
23
29
  - Components inside pages and blocks should be spaced by values divisible by 4px.
24
30
  - Common spacing values are 4, 8, 12, 16, 20, 24, 28, and 32px.
25
31
  - Content blocks commonly use 32px left, right, and bottom padding and 24px top padding.
32
+ - The 24px top and 32px side/bottom padding rule belongs to white content surfaces, not to the page root wrapper.
33
+ - Do not duplicate content-surface padding on the page root; outer page spacing is controlled by the CRM host layout.
26
34
  - Prefer public components from @retailcrm/embed-ui-v1-components/remote.
27
35
  - Do not invent custom chrome for pages, forms, tables, tabs, buttons, modals, or sidebars when a documented component fits.
28
36
 
@@ -51,6 +59,9 @@ ai_notes:
51
59
  - Choose ModalSidebar only when the flow is compact.
52
60
  - Choose ModalWindow or a full page when content needs wide tables, several sections, or complex controls.
53
61
  - Keep operational CRM screens dense, scannable, and work-focused.
62
+ - Prefer variant="success" for the main save/apply/create action and keep it visually dominant.
54
63
  avoid:
55
64
  - Do not turn internal CRM work screens into marketing-style layouts.
56
65
  - Do not hide filters or primary workflow controls away from the content they affect.
66
+ - Do not place multiple Success Primary, Default Primary, or Danger Primary actions with the same variant in the page-level scope or inside one collapse-box scope.
67
+ - Do not add page-surface padding to both the page root and the white content surface.
@@ -0,0 +1,113 @@
1
+ widget_profile: WidgetComposition
2
+ summary: >
3
+ Composition rules for RetailCRM embedded widgets mounted into CRM target slots.
4
+ A widget should add a small predictable inline control to the host page and move
5
+ complex workflows into UiModalSidebar or UiModalWindow.
6
+
7
+ use_when:
8
+ - You are building a component for defineWidgetRunner.
9
+ - You are rendering UI directly inside a widget target.
10
+ - You need to decide whether widget content belongs inline, in a modal sidebar, or in a modal window.
11
+
12
+ inline_target_rules:
13
+ - Keep the UI rendered directly in the widget target simple and predictable.
14
+ - Prefer UiToolbarButton for compact widget actions.
15
+ - Prefer UiToolbarLink for compact navigation or link-shaped actions.
16
+ - Simple text is allowed when the widget only needs to show a short status, value, or hint.
17
+ - Icons are allowed when they clarify the toolbar action or compact status.
18
+ - Keep inline controls close to the target's existing density and spacing.
19
+ - Use one or a few compact controls; avoid turning the target slot into a standalone screen.
20
+
21
+ complex_ui_rules:
22
+ - Put forms, tables, filters, maps, summaries, and multi-step workflows inside UiModalSidebar or UiModalWindow.
23
+ - Use UiModalSidebar for contextual editing, narrow forms, short lists, and side-panel workflows.
24
+ - Use UiModalWindow for wider workflows, maps, previews, or content that needs more horizontal room.
25
+ - The inline widget control should usually open the modal/sidebar and pass the relevant target/context data into that workflow.
26
+ - The modal/sidebar can use regular page-like components such as UiField, UiButton, UiTable, UiYandexMap, UiAlert, and UiLoader.
27
+
28
+ avoid_inline:
29
+ - large cards
30
+ - full forms
31
+ - full tables
32
+ - filter panels
33
+ - nested page layouts
34
+ - custom panels that visually compete with the CRM page
35
+ - page-level headers or footers
36
+ - heavy custom spacing or wrappers that can break the host page layout
37
+
38
+ recommended_components:
39
+ inline:
40
+ - name: UiToolbarButton
41
+ profile: ../components/UiToolbarButton.yml
42
+ - name: UiToolbarLink
43
+ profile: ../components/UiToolbarLink.yml
44
+ overlay:
45
+ - name: UiModalSidebar
46
+ profile: ../components/UiModalSidebar.yml
47
+ - name: UiModalWindow
48
+ profile: ../components/UiModalWindow.yml
49
+ - name: UiButton
50
+ profile: ../components/UiButton.yml
51
+ - name: UiField
52
+ profile: ../components/UiField.yml
53
+ - name: UiTable
54
+ profile: ../components/UiTable.yml
55
+
56
+ examples:
57
+ - title: Compact widget action that opens a sidebar
58
+ code: |
59
+ <template>
60
+ <UiToolbarButton @click="opened = true">
61
+ Show details
62
+ </UiToolbarButton>
63
+
64
+ <UiModalSidebar v-model:opened="opened">
65
+ <template #title>Widget details</template>
66
+
67
+ <UiField id="note" label="Note">
68
+ <UiTextbox v-model:value="note" />
69
+ </UiField>
70
+
71
+ <template #footer>
72
+ <UiButton @click="save">Save</UiButton>
73
+ <UiButton appearance="secondary" @click="opened = false">Cancel</UiButton>
74
+ </template>
75
+ </UiModalSidebar>
76
+ </template>
77
+
78
+ <script lang="ts" setup>
79
+ import { ref } from 'vue'
80
+
81
+ import {
82
+ UiButton,
83
+ UiField,
84
+ UiModalSidebar,
85
+ UiTextbox,
86
+ UiToolbarButton,
87
+ } from '@retailcrm/embed-ui-v1-components/remote'
88
+
89
+ const opened = ref(false)
90
+ const note = ref('')
91
+
92
+ const save = () => {
93
+ opened.value = false
94
+ }
95
+ </script>
96
+
97
+ target_awareness:
98
+ - Read the endpoint target profile before choosing inline text, button labels, or modal type.
99
+ - Match the inline affordance to the target placement; field-level targets need especially compact UI.
100
+ - Do not infer data availability from the target name; read the linked context profiles.
101
+ - Avoid adding repeated or noisy controls to targets that can appear many times on one CRM page.
102
+
103
+ ai_notes:
104
+ do:
105
+ - Render only compact, predictable UI directly in the widget target.
106
+ - Start inline widget UI with UiToolbarButton, UiToolbarLink, simple text, or an icon-enhanced compact action.
107
+ - Move complex UI into UiModalSidebar or UiModalWindow.
108
+ - Keep the host CRM page layout stable; the widget should enhance the target, not reshape the page.
109
+ avoid:
110
+ - Do not build a full page, dashboard, large card, form, or table directly inside a widget target.
111
+ - Do not use UiPageHeader or UiPageFooter for inline widget content.
112
+ - Do not add custom layout chrome around the widget unless the target profile explicitly calls for it.
113
+ - Do not make the target slot depend on wide fixed dimensions.
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.23",
5
+ "version": "0.9.25",
6
6
  "license": "MIT",
7
7
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
8
8
  "repository": {
@@ -48,7 +48,8 @@
48
48
  "docs",
49
49
  "index.cjs",
50
50
  "index.js",
51
- "README.md"
51
+ "README.md",
52
+ "templates"
52
53
  ],
53
54
  "scripts": {
54
55
  "build": "yarn build:host && yarn build:remote",
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: embed-ui-v1-components-ui
3
+ description: Use when building, editing, or reviewing RetailCRM JS module UI with @retailcrm/embed-ui-v1-components. Covers page pattern selection, component profile lookup, styling constraints, table pagination fidelity, forms, widgets, and visual-review triage.
4
+ ---
5
+
6
+ # Embed UI v1 Components UI
7
+
8
+ Use this skill before changing frontend UI built with `@retailcrm/embed-ui-v1-components`.
9
+
10
+ ## Reading order
11
+
12
+ 1. Read project `AGENTS.md` if it exists.
13
+ 2. Read `__PACKAGE_DOCS_PATH__/AGENTS.md`.
14
+ 3. Read `__PACKAGE_DOCS_PATH__/docs/AI.md`.
15
+ 4. Read `__PACKAGE_DOCS_PATH__/docs/PROFILES.md`.
16
+ 5. Read `__PACKAGE_DOCS_PATH__/docs/STYLING.md` for typography, spacing, CSS variables, and selector boundaries.
17
+ 6. Open the relevant component profiles from `__PACKAGE_DOCS_PATH__/docs/profiles/components/*.yml`.
18
+ 7. For full screens, overlays, filters, tables, or settings layouts, open the relevant page profile from `__PACKAGE_DOCS_PATH__/docs/profiles/pages/*.yml`.
19
+
20
+ ## Workflow
21
+
22
+ 1. Choose the page pattern before writing code: `EntityListPage`, `CardSettingsPage`, `CollapseBlockPage`, `MultiColumnPage`, `ModalSidebar`, or `ModalWindow`.
23
+ 2. List the component profiles you are using.
24
+ 3. Use `@retailcrm/embed-ui-v1-components/remote` for extension UI components and `@retailcrm/embed-ui-v1-components/assets/...` for icons.
25
+ 4. Do not import from `@retailcrm/embed-ui-v1-components/dist/*`, `@retailcrm/embed-ui-v1-components/host`, source files, or repository-only paths in extension frontend code.
26
+ 5. Do not hand-roll buttons, inputs, selects, tables, or links when a documented Embed UI component exists.
27
+ 6. Do not set arbitrary `font-family`; inherit the host/component stack unless a project-specific design requirement says otherwise.
28
+ 7. Do not style internal `.ui-v1-*` selectors unless the profile or `STYLING.md` explicitly documents that override pattern.
29
+
30
+ ## High-signal checks
31
+
32
+ - For entity lists, use `UiTable`, `UiTableColumn`, and table footer slots.
33
+ - For table pagination, follow the reference example in `UiTable.yml`: button sizes, active state, dividers, arrow assets, and scoped selector pattern.
34
+ - For form fields, use `UiField` with the matching control and forward slot props such as `id` when the control accepts them.
35
+ - For `UiSwitch`, use the documented switch + visible label + hint row instead of wrapping it in `UiField`.
36
+ - For widgets mounted into CRM targets, keep inline UI compact; move complex UI into `UiModalSidebar` or `UiModalWindow`.
37
+ - For sidebar footers, group related actions, use 12px or 16px gaps inside groups, and confirm destructive icon-only actions with `UiPopconfirm okVariant="danger"`.
38
+
39
+ ## Design feedback triage
40
+
41
+ When design feedback does not match the package docs:
42
+
43
+ 1. Check the component profile, page profile, `STYLING.md`, Figma, and CRM computed styles.
44
+ 2. If Embed UI docs do not contain the requested rule, treat it as a project-specific design requirement.
45
+ 3. State which source wins before editing.
46
+ 4. Keep the selected values documented in the task or project `AGENTS.md`.