@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.
Files changed (96) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +3 -4
  3. package/assets/sprites/actions/add-square-outlined.svg +8 -0
  4. package/assets/sprites/actions/drag.svg +8 -0
  5. package/bin/embed-ui-v1-components.mjs +227 -50
  6. package/bin/postinstall.mjs +2 -1
  7. package/dist/host.cjs +1204 -488
  8. package/dist/host.css +629 -0
  9. package/dist/host.d.ts +100 -20
  10. package/dist/host.js +1205 -489
  11. package/dist/remote.cjs +1210 -153
  12. package/dist/remote.d.ts +786 -36
  13. package/dist/remote.js +1212 -155
  14. package/docs/AI.md +19 -20
  15. package/docs/COMPONENTS.md +58 -59
  16. package/docs/FORMAT.md +6 -8
  17. package/docs/PROFILES.md +34 -21
  18. package/docs/README.md +3 -6
  19. package/docs/profiles/{UiAddButton.yml → components/UiAddButton.yml} +49 -2
  20. package/docs/profiles/{UiAlert.yml → components/UiAlert.yml} +32 -2
  21. package/docs/profiles/{UiAvatar.yml → components/UiAvatar.yml} +17 -3
  22. package/docs/profiles/{UiAvatarList.yml → components/UiAvatarList.yml} +0 -2
  23. package/docs/profiles/{UiButton.yml → components/UiButton.yml} +14 -1
  24. package/docs/profiles/components/UiCalendar.yml +190 -0
  25. package/docs/profiles/{UiCheckbox.yml → components/UiCheckbox.yml} +28 -2
  26. package/docs/profiles/{UiCollapse.yml → components/UiCollapse.yml} +57 -2
  27. package/docs/profiles/{UiCollapseBox.yml → components/UiCollapseBox.yml} +64 -2
  28. package/docs/profiles/{UiCollapseGroup.yml → components/UiCollapseGroup.yml} +0 -2
  29. package/docs/profiles/{UiCopyButton.yml → components/UiCopyButton.yml} +19 -2
  30. package/docs/profiles/{UiDate.yml → components/UiDate.yml} +20 -2
  31. package/docs/profiles/{UiDatePicker.yml → components/UiDatePicker.yml} +51 -2
  32. package/docs/profiles/{UiError.yml → components/UiError.yml} +48 -2
  33. package/docs/profiles/{UiField.yml → components/UiField.yml} +46 -1
  34. package/docs/profiles/{UiInfobox.yml → components/UiInfobox.yml} +54 -2
  35. package/docs/profiles/{UiLink.yml → components/UiLink.yml} +22 -2
  36. package/docs/profiles/{UiLoader.yml → components/UiLoader.yml} +0 -2
  37. package/docs/profiles/{UiMenuItem.yml → components/UiMenuItem.yml} +0 -2
  38. package/docs/profiles/{UiMenuItemGroup.yml → components/UiMenuItemGroup.yml} +0 -2
  39. package/docs/profiles/{UiModalSidebar.yml → components/UiModalSidebar.yml} +80 -2
  40. package/docs/profiles/components/UiModalWindow.yml +181 -0
  41. package/docs/profiles/{UiModalWindowSurface.yml → components/UiModalWindowSurface.yml} +0 -2
  42. package/docs/profiles/{UiNumberStepper.yml → components/UiNumberStepper.yml} +14 -2
  43. package/docs/profiles/{UiPageHeader.yml → components/UiPageHeader.yml} +39 -1
  44. package/docs/profiles/components/UiPopconfirm.yml +164 -0
  45. package/docs/profiles/{UiPopper.yml → components/UiPopper.yml} +66 -1
  46. package/docs/profiles/{UiPopperConnector.yml → components/UiPopperConnector.yml} +0 -2
  47. package/docs/profiles/{UiPopperTarget.yml → components/UiPopperTarget.yml} +0 -2
  48. package/docs/profiles/{UiRadio.yml → components/UiRadio.yml} +15 -2
  49. package/docs/profiles/{UiRadioSwitch.yml → components/UiRadioSwitch.yml} +55 -1
  50. package/docs/profiles/{UiRadioSwitchOption.yml → components/UiRadioSwitchOption.yml} +0 -2
  51. package/docs/profiles/{UiScrollBox.yml → components/UiScrollBox.yml} +45 -2
  52. package/docs/profiles/{UiSelect.yml → components/UiSelect.yml} +133 -1
  53. package/docs/profiles/{UiSelectOption.yml → components/UiSelectOption.yml} +0 -2
  54. package/docs/profiles/{UiSelectOptionGroup.yml → components/UiSelectOptionGroup.yml} +0 -2
  55. package/docs/profiles/{UiSkeleton.yml → components/UiSkeleton.yml} +11 -2
  56. package/docs/profiles/{UiSlider.yml → components/UiSlider.yml} +85 -2
  57. package/docs/profiles/{UiSwitch.yml → components/UiSwitch.yml} +50 -2
  58. package/docs/profiles/{UiTab.yml → components/UiTab.yml} +126 -2
  59. package/docs/profiles/{UiTabGroup.yml → components/UiTabGroup.yml} +0 -1
  60. package/docs/profiles/components/UiTable.yml +622 -0
  61. package/docs/profiles/{UiTableBodyCell.yml → components/UiTableBodyCell.yml} +0 -2
  62. package/docs/profiles/{UiTableColumn.yml → components/UiTableColumn.yml} +0 -2
  63. package/docs/profiles/{UiTableFooterButton.yml → components/UiTableFooterButton.yml} +0 -2
  64. package/docs/profiles/{UiTableFooterSection.yml → components/UiTableFooterSection.yml} +0 -2
  65. package/docs/profiles/{UiTableHeadCell.yml → components/UiTableHeadCell.yml} +0 -2
  66. package/docs/profiles/{UiTableSorter.yml → components/UiTableSorter.yml} +0 -2
  67. package/docs/profiles/{UiTag.yml → components/UiTag.yml} +13 -2
  68. package/docs/profiles/{UiTextbox.yml → components/UiTextbox.yml} +20 -1
  69. package/docs/profiles/{UiTimePicker.yml → components/UiTimePicker.yml} +60 -2
  70. package/docs/profiles/{UiToggleButton.yml → components/UiToggleButton.yml} +16 -1
  71. package/docs/profiles/{UiToggleGroup.yml → components/UiToggleGroup.yml} +25 -1
  72. package/docs/profiles/{UiToggleGroupOption.yml → components/UiToggleGroupOption.yml} +0 -2
  73. package/docs/profiles/{UiToolbarButton.yml → components/UiToolbarButton.yml} +15 -2
  74. package/docs/profiles/{UiToolbarLink.yml → components/UiToolbarLink.yml} +13 -2
  75. package/docs/profiles/{UiTooltip.yml → components/UiTooltip.yml} +18 -2
  76. package/docs/profiles/{UiTransition.yml → components/UiTransition.yml} +0 -2
  77. package/docs/profiles/{UiYandexMap.yml → components/UiYandexMap.yml} +24 -2
  78. package/docs/profiles/pages/CardSettingsPage.yml +58 -0
  79. package/docs/profiles/pages/CollapseBlockPage.yml +46 -0
  80. package/docs/profiles/pages/EntityListPage.yml +66 -0
  81. package/docs/profiles/pages/ModalSidebar.yml +158 -0
  82. package/docs/profiles/pages/ModalWindow.yml +55 -0
  83. package/docs/profiles/pages/MultiColumnPage.yml +27 -0
  84. package/docs/profiles/pages/PageComposition.yml +56 -0
  85. package/package.json +1 -1
  86. package/docs/AGENT-DESIGN-GUIDELINES.md +0 -463
  87. package/docs/assets/page-guidelines/card-settings-page.png +0 -0
  88. package/docs/assets/page-guidelines/collapse-block-page.png +0 -0
  89. package/docs/assets/page-guidelines/entity-list-page.png +0 -0
  90. package/docs/assets/page-guidelines/modal-sidebar.png +0 -0
  91. package/docs/assets/page-guidelines/modal-window.png +0 -0
  92. package/docs/assets/page-guidelines/multi-column-page.png +0 -0
  93. package/docs/profiles/UiCalendar.yml +0 -76
  94. package/docs/profiles/UiImage.yml +0 -67
  95. package/docs/profiles/UiModalWindow.yml +0 -86
  96. package/docs/profiles/UiTable.yml +0 -300
@@ -1,463 +0,0 @@
1
- # Agent Design Guidelines
2
-
3
- These guidelines describe page construction rules for AI assistants that generate RetailCRM
4
- extension screens with `@retailcrm/embed-ui-v1-components`.
5
-
6
- ## How Agents Should Use This File
7
-
8
- - Use this file after `README.md`, `AGENTS.md`, `AI.md`, and the relevant component profiles.
9
- - Treat it as page-composition guidance, not as a replacement for component API docs.
10
- - Prefer public components from `@retailcrm/embed-ui-v1-components/remote`.
11
- - Use Storybook and YAML profiles for exact component props and examples.
12
- - Do not invent new chrome for pages, forms, tables, tabs, buttons, modals, or sidebars when a documented component exists.
13
-
14
- ## Shared Page Rules
15
-
16
- - Page title uses the large accent text style: `Text large Accent 24`.
17
- - Page-level actions sit to the right of the title.
18
- - A page can have only one `Default Primary` button and one `Success Primary` button.
19
- - Additional page actions can use secondary or tertiary variants in unlimited quantity when the task needs them.
20
- - When a group has multiple buttons, the primary action should represent the main flow. Secondary actions should support or cancel that flow.
21
- - Components inside pages and blocks should be spaced by values divisible by 4px: `4`, `8`, `12`, `16`, `20`, `24`, `28`, `32`, and so on.
22
- - Content blocks commonly use 32px left, right, and bottom padding and 24px top padding.
23
-
24
- ## Entity List Page
25
-
26
- Use this pattern for separate pages that list entities and allow filtering or creating a new entity.
27
-
28
- ![Entity list page mockup](./assets/page-guidelines/entity-list-page.png)
29
-
30
- Examples from the design:
31
-
32
- - order list;
33
- - customer list;
34
- - mailing list;
35
- - task list.
36
-
37
- Expected structure:
38
-
39
- - `UiPageHeader` with a page title.
40
- - One or more 48px page buttons on the right side of the header.
41
- - If there are multiple header buttons, one should be primary and the rest can be secondary or tertiary.
42
- - The main primary button usually creates a new entity for the list.
43
- - Filters above the table, built from controls such as select, textbox, and combobox-like selection components.
44
- - Filter controls should run in rows of roughly 4-5 fields, then wrap to the next row.
45
- - Filters can be collapsible.
46
- - Filter apply action uses a default secondary 36px text button.
47
- - Filter reset action uses a danger secondary 36px icon button.
48
- - The entity data is shown in a table.
49
- - The table may scroll and may support export.
50
-
51
- Recommended components:
52
-
53
- - `UiPageHeader`
54
- - `UiButton`
55
- - `UiField`
56
- - `UiTextbox`
57
- - `UiSelect`
58
- - `UiTable`
59
- - `UiTableColumn`
60
- - `UiTableSorter`
61
- - `UiTableFooterSection`
62
- - `UiTableFooterButton`
63
-
64
- Canonical table footer pattern:
65
-
66
- ```vue
67
- <script lang="ts" setup>
68
- import IconChevronLeft from '@retailcrm/embed-ui-v1-components/assets/sprites/arrows/chevron-left.svg'
69
- import IconChevronRight from '@retailcrm/embed-ui-v1-components/assets/sprites/arrows/chevron-right.svg'
70
- import {
71
- UiTable,
72
- UiTableColumn,
73
- UiTableFooterButton,
74
- UiTableFooterSection,
75
- } from '@retailcrm/embed-ui-v1-components/remote'
76
- </script>
77
-
78
- <template>
79
- <UiTable
80
- class="entity-list-table"
81
- bordered
82
- :rows="rows"
83
- row-key="id"
84
- >
85
- <UiTableColumn label="Название">
86
- <template #cell="{ row }">
87
- {{ row.title }}
88
- </template>
89
- </UiTableColumn>
90
-
91
- <template #footer-summary="{ rowsCount }">
92
- <span>{{ rowsCount }} элементов</span>
93
- </template>
94
-
95
- <template #footer-page-size>
96
- <UiTableFooterSection class="entity-list-table__page-size">
97
- <span class="entity-list-table__footer-caption">Показывать:</span>
98
- <UiTableFooterButton class="entity-list-table__footer-button entity-list-table__footer-button_passive">
99
- по 20
100
- </UiTableFooterButton>
101
- <span class="entity-list-table__footer-delimiter">/</span>
102
- <UiTableFooterButton class="entity-list-table__footer-button">
103
- по 50
104
- </UiTableFooterButton>
105
- <span class="entity-list-table__footer-delimiter">/</span>
106
- <UiTableFooterButton class="entity-list-table__footer-button">
107
- по 100
108
- </UiTableFooterButton>
109
- </UiTableFooterSection>
110
- </template>
111
-
112
- <template #footer-pagination>
113
- <UiTableFooterSection class="entity-list-table__pagination-section">
114
- <div class="entity-list-table__pagination">
115
- <UiTableFooterButton class="entity-list-table__pagination-button">
116
- 1
117
- </UiTableFooterButton>
118
- <UiTableFooterButton class="entity-list-table__pagination-button">
119
- 2
120
- </UiTableFooterButton>
121
- <UiTableFooterButton class="entity-list-table__pagination-button entity-list-table__pagination-button_current">
122
- 3
123
- </UiTableFooterButton>
124
- <span class="entity-list-table__pagination-divider" />
125
- <UiTableFooterButton
126
- aria-label="Предыдущая страница"
127
- class="entity-list-table__pagination-arrow"
128
- >
129
- <IconChevronLeft
130
- aria-hidden="true"
131
- class="entity-list-table__pagination-arrow-icon"
132
- />
133
- </UiTableFooterButton>
134
- <span class="entity-list-table__pagination-divider" />
135
- <UiTableFooterButton
136
- aria-label="Следующая страница"
137
- class="entity-list-table__pagination-arrow"
138
- >
139
- <IconChevronRight
140
- aria-hidden="true"
141
- class="entity-list-table__pagination-arrow-icon"
142
- />
143
- </UiTableFooterButton>
144
- </div>
145
- </UiTableFooterSection>
146
- </template>
147
- </UiTable>
148
- </template>
149
- ```
150
-
151
- Footer CSS contract:
152
-
153
- ```css
154
- .entity-list-table {
155
- --ui-v1-table-cell-padding-x: 12px;
156
- --ui-v1-table-cell-padding-y: 12px;
157
- --ui-v1-table-padding-start: 16px;
158
- --ui-v1-table-padding-end: 16px;
159
- --ui-v1-table-rounding: 4px;
160
- --ui-v1-table-head-cell-padding-block-start: 14px;
161
- --ui-v1-table-head-cell-padding-block-end: 14px;
162
- --ui-v1-table-body-cell-padding-block-start: 15px;
163
- --ui-v1-table-body-cell-padding-block-end: 15px;
164
- }
165
-
166
- .entity-list-table .ui-v1-table__head-cell {
167
- height: 42px;
168
- }
169
-
170
- .entity-list-table .ui-v1-table__footer-meta {
171
- min-height: 40px;
172
- font-weight: 400;
173
- }
174
-
175
- .entity-list-table .ui-v1-table__footer-controls {
176
- min-height: 52px;
177
- background: #f9fafb;
178
- }
179
-
180
- .entity-list-table .ui-v1-table__footer-section {
181
- font-size: 14px;
182
- line-height: 20px;
183
- }
184
-
185
- .entity-list-table__page-size,
186
- .entity-list-table__pagination-section {
187
- color: #1e2248;
188
- }
189
-
190
- .entity-list-table__footer-caption {
191
- display: inline-block;
192
- margin-right: 4px;
193
- vertical-align: baseline;
194
- line-height: inherit;
195
- }
196
-
197
- .entity-list-table__footer-button {
198
- color: #005eeb;
199
- }
200
-
201
- .entity-list-table__footer-button_passive {
202
- color: #1e2248;
203
- }
204
-
205
- .entity-list-table__footer-delimiter {
206
- display: inline-block;
207
- padding: 0 5px;
208
- color: #8a96a6;
209
- vertical-align: baseline;
210
- line-height: inherit;
211
- }
212
-
213
- .entity-list-table .ui-v1-table__footer-side > .entity-list-table__pagination-section {
214
- padding-block: 8px;
215
- }
216
-
217
- .entity-list-table__pagination {
218
- display: flex;
219
- align-items: center;
220
- gap: 8px;
221
- height: 36px;
222
- }
223
-
224
- .entity-list-table__pagination-button,
225
- .entity-list-table__pagination-arrow {
226
- width: 36px;
227
- height: 36px;
228
- border-radius: 4px;
229
- }
230
-
231
- .entity-list-table .ui-v1-table__footer-button.entity-list-table__pagination-button {
232
- color: #1e2248;
233
- font-size: 14px;
234
- line-height: 20px;
235
- }
236
-
237
- .entity-list-table .ui-v1-table__footer-button.entity-list-table__pagination-button_current {
238
- color: #fff;
239
- background: #005eeb;
240
- }
241
-
242
- .entity-list-table .ui-v1-table__footer-button.entity-list-table__pagination-arrow {
243
- color: #afb9c3;
244
- }
245
-
246
- .entity-list-table__pagination-arrow-icon {
247
- display: block;
248
- width: 24px;
249
- height: 24px;
250
- }
251
-
252
- .entity-list-table__pagination-divider {
253
- width: 1px;
254
- height: 52px;
255
- margin-block: -8px;
256
- background: #dee2e6;
257
- }
258
- ```
259
-
260
- Use `UiTableFooterSection` and `UiTableFooterButton` for table footer pagination. Do not replace them
261
- with regular `UiButton`. Use chevron icon assets for arrow controls, not text glyphs. Keep footer
262
- styling scoped to a local table root class, and override the internal footer button class together
263
- with the local class when changing pagination text, active page, or arrow colors.
264
-
265
- ## Card Or Settings Page
266
-
267
- Use this pattern for settings pages or entity cards made mostly from forms.
268
-
269
- ![Card or settings page mockup](./assets/page-guidelines/card-settings-page.png)
270
-
271
- Examples from the design:
272
-
273
- - tracked event page;
274
- - sending limit settings;
275
- - email template settings;
276
- - trigger page.
277
-
278
- Expected structure:
279
-
280
- - `UiPageHeader` with a page title.
281
- - The title can be editable via an inline-edit pattern when the product flow requires it.
282
- - One or more 48px header buttons on the right.
283
- - Header actions can be accompanied by text information or status labels.
284
- - Optional top tabs.
285
- - Main content sits on a white content surface.
286
- - The content can include text, buttons, fields, checkboxes, radio groups, switches, and other form controls.
287
- - A bottom save panel is optional.
288
-
289
- Recommended components:
290
-
291
- - `UiPageHeader`
292
- - `UiButton`
293
- - `UiField`
294
- - `UiTextbox`
295
- - `UiSelect`
296
- - `UiCheckbox`
297
- - `UiRadio`
298
- - `UiRadioSwitch`
299
- - `UiSwitch`
300
- - `UiTabGroup`
301
- - `UiTab`
302
- - `UiTag`
303
-
304
- ## Multi-Column Page
305
-
306
- Use this pattern when an entity card or detail page contains several semantic blocks that should be visible in parallel.
307
-
308
- ![Multi-column page mockup](./assets/page-guidelines/multi-column-page.png)
309
-
310
- Examples from the design:
311
-
312
- - order page;
313
- - customer page;
314
- - product view page.
315
-
316
- Layout rules:
317
-
318
- - Content is placed on surfaces.
319
- - The most common surface spans the full screen width.
320
- - Semantic blocks can be arranged vertically and horizontally.
321
- - Distance between blocks is 24px.
322
- - Allowed width distributions are:
323
- - `100%`;
324
- - `50% / 50%`;
325
- - `30% / 70%`.
326
-
327
- Keep the visual hierarchy operational and dense. Do not turn internal CRM work screens into marketing-style layouts.
328
-
329
- ## Collapse-Block Page
330
-
331
- Use this pattern for settings split into semantic groups.
332
-
333
- ![Collapse-block page mockup](./assets/page-guidelines/collapse-block-page.png)
334
-
335
- Examples from the design:
336
-
337
- - product editing;
338
- - mailing editing;
339
- - Double Opt-In settings.
340
-
341
- Expected structure:
342
-
343
- - Multiple collapsible blocks with their own content and local actions.
344
- - If the page contains only collapse blocks, the white page surface is not needed.
345
- - If every collapse block has its own save action, the bottom save panel is not needed.
346
- - Collapse blocks can contain text, buttons, fields, controls, and small tables.
347
-
348
- Avoid inside collapse blocks:
349
-
350
- - complex tables;
351
- - nested collapse blocks;
352
- - two-column content split across separate surfaces.
353
-
354
- Recommended components:
355
-
356
- - `UiCollapse`
357
- - `UiCollapseBox`
358
- - `UiCollapseGroup`
359
- - `UiButton`
360
- - `UiField`
361
- - `UiTable` only for small, simple tables
362
-
363
- ## Modal Sidebar
364
-
365
- Use this pattern for a small contextual form, local additional information, or a compact entity card with a limited number of fields and settings.
366
-
367
- ![Modal sidebar mockup](./assets/page-guidelines/modal-sidebar.png)
368
-
369
- Examples from the design:
370
-
371
- - task card;
372
- - notifications;
373
- - new ticket;
374
- - scenario step editing.
375
-
376
- Size rules:
377
-
378
- - Sidebar can use two widths: `720px` and `416px`.
379
-
380
- Expected structure:
381
-
382
- - Fixed header at the top with title and close button.
383
- - Header can also contain extra text, icon, button, or tag.
384
- - If a sidebar opens from another sidebar, show a back arrow to return to the previous sidebar.
385
- - Fixed footer at the bottom.
386
- - Footer usually contains save, cancel/close, and delete actions.
387
- - Footer can also contain a copy button or auxiliary text.
388
- - Content can be flexible, but should stay compact.
389
- - Small tables can be placed in sidebars.
390
-
391
- Avoid in sidebars:
392
-
393
- - collapse blocks;
394
- - two-column content on separate surfaces;
395
- - bulky or complex interfaces.
396
-
397
- For bulky flows, use a full page or modal window instead.
398
-
399
- Recommended components:
400
-
401
- - `UiModalSidebar`
402
- - `UiButton`
403
- - `UiTag`
404
- - `UiField`
405
- - `UiTextbox`
406
- - `UiSelect`
407
- - `UiTable` only for small, simple tables
408
-
409
- ## Modal Window
410
-
411
- Use this pattern for large contextual tables or additional local settings when a sidebar is not enough.
412
-
413
- ![Modal window mockup](./assets/page-guidelines/modal-window.png)
414
-
415
- Examples from the design:
416
-
417
- - adding products to an order;
418
- - marking products in an order;
419
- - viewing an email from the communication list;
420
- - merging duplicates in the database cleanliness section.
421
-
422
- Size rules:
423
-
424
- - Modal can use two sizes:
425
- - `960px`;
426
- - full screen with side margins.
427
-
428
- Expected structure:
429
-
430
- - Fixed header at the top with title and close button.
431
- - Header can include extra text, icon, button, or tag.
432
- - Fixed footer at the bottom.
433
- - Footer usually contains save, cancel/close, and delete actions.
434
- - Footer can also contain a copy button or auxiliary text.
435
- - Content can be flexible; tables are a common modal use case.
436
- - If a modal contains a table, the table stretches across the modal width.
437
- - If a modal is split into sections, use large tabs instead of a regular modal header.
438
-
439
- Spacing rules:
440
-
441
- - Left, right, and bottom margins: 32px.
442
- - Top margin: 24px.
443
-
444
- Recommended components:
445
-
446
- - `UiModalWindow`
447
- - `UiButton`
448
- - `UiTabGroup`
449
- - `UiTab`
450
- - `UiTable`
451
- - `UiTableColumn`
452
- - `UiTableFooterSection`
453
-
454
- ## Quick Decision Guide
455
-
456
- - Need a searchable, filterable registry: use an entity list page.
457
- - Need to edit an entity or settings form: use a card/settings page.
458
- - Need several semantic blocks visible together: use a multi-column page.
459
- - Need grouped settings with independent sections: use a collapse-block page.
460
- - Need a small contextual form or compact entity card: use a modal sidebar.
461
- - Need a large local workflow, auxiliary table, or dense settings flow: use a modal window.
462
-
463
- When uncertain between sidebar and modal, choose sidebar only if the flow is compact. If the content needs wide tables, several sections, or complex controls, choose modal or full page.
@@ -1,76 +0,0 @@
1
- component: UiCalendar
2
- summary: >
3
- UiCalendar is the date selection primitive behind date and date-range flows. It supports
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
6
-
7
- public_import:
8
- from: '@retailcrm/embed-ui-v1-components/remote'
9
- named:
10
- - UiCalendar
11
-
12
- use_when:
13
- - You need inline date selection.
14
- - You need single-date or date-range picking without a textbox wrapper.
15
-
16
- avoid_when:
17
- - You need the full textbox-plus-popper date picker flow.
18
-
19
- api:
20
- key_props:
21
- - name: value
22
- - name: type
23
- - name: appearance
24
- - name: minDate
25
- - name: maxDate
26
- - name: locale
27
-
28
- rendered_structure:
29
- descriptive_only: true
30
- root:
31
- shape: div.ui-v1-calendar
32
- tag: div
33
- notes: The root contains header controls, weekday labels, and the date grid.
34
-
35
- geometry:
36
- layout: block-like calendar panel
37
- root_display: flex
38
- width_behavior: stretches to container width by default
39
-
40
- behavior:
41
- notes:
42
- - Supports single and range selection.
43
- - minDate and maxDate constrain selection.
44
-
45
- ai_notes:
46
- do:
47
- - Use UiCalendar when inline calendar selection is the actual UI.
48
- avoid:
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
@@ -1,67 +0,0 @@
1
- component: UiImage
2
- summary: >
3
- UiImage is a generic image display component with optional resize and crop hints.
4
- Use it for regular visual content rather than identity avatars.
5
- usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiimage--docs
6
-
7
- public_import:
8
- from: '@retailcrm/embed-ui-v1-components/remote'
9
- named:
10
- - UiImage
11
-
12
- use_when:
13
- - You need to render an image asset.
14
- - You need resize or crop hints for image output.
15
-
16
- avoid_when:
17
- - You need identity-focused avatar UI.
18
-
19
- api:
20
- key_props:
21
- - name: src
22
- - name: alt
23
- - name: resize
24
- - name: crop
25
-
26
- rendered_structure:
27
- descriptive_only: true
28
- root:
29
- shape: img
30
- tag: img
31
- notes: The component renders a single image element.
32
-
33
- geometry:
34
- layout: replaced media element
35
- root_display: inline-block
36
- width_behavior: intrinsic by image source or explicit dimensions
37
-
38
- ai_notes:
39
- do:
40
- - Use UiImage for general media and UiAvatar for people or identity.
41
- - Provide alt text unless the image is purely decorative in the host context.
42
- avoid:
43
- - Do not use for status icons or avatars.
44
-
45
- behavior:
46
- notes:
47
- - resize and crop are image processing hints, not layout containers.
48
- - Intrinsic image dimensions still matter unless the parent constrains size.
49
-
50
- composition:
51
- works_well_with:
52
- - UiAvatar
53
- - UiSkeleton
54
- patterns:
55
- - title: Content image
56
- notes: Use for product, attachment, or preview images where real media is the content.
57
-
58
- accessibility:
59
- notes:
60
- - Keep rendered text concise and meaningful for screen-reader users.
61
- - Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
62
-
63
- styling:
64
- notes:
65
- - Use documented props and slots as the primary styling API.
66
- - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
67
- - Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
@@ -1,86 +0,0 @@
1
- component: UiModalWindow
2
- summary: >
3
- UiModalWindow is the main centered modal container. It supports open state, closability,
4
- appearance variants, fullscreen and responsive behavior, and dialog roles.
5
- usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uimodalwindow--docs
6
-
7
- public_import:
8
- from: '@retailcrm/embed-ui-v1-components/remote'
9
- named:
10
- - UiModalWindow
11
-
12
- related_components:
13
- - UiModalWindowSurface
14
-
15
- use_when:
16
- - You need a centered dialog.
17
- - You need modal interaction with standard dialog semantics.
18
-
19
- avoid_when:
20
- - You need a side-docked modal, use UiModalSidebar instead.
21
-
22
- api:
23
- key_props:
24
- - name: opened
25
- - name: closable
26
- - name: appearance
27
- - name: fullscreen
28
- - name: responsive
29
- - name: scrolling
30
- - name: role
31
- methods:
32
- - name: open
33
- - name: close
34
-
35
- rendered_structure:
36
- descriptive_only: true
37
- root:
38
- shape: div.ui-v1-modal-window via UiModalWindowSurface
39
- tag: div
40
- notes: The component delegates the actual teleported modal root to UiModalWindowSurface and renders header, content, and footer inside it.
41
-
42
- geometry:
43
- layout: teleported modal layer with centered surface
44
- root_display: flex
45
- width_behavior: viewport-covering overlay with content-sized or responsive surface
46
-
47
- behavior:
48
- notes:
49
- - opened controls modal visibility.
50
- - closable should be false only when the user must complete or acknowledge a blocking flow.
51
- - fullscreen and responsive affect surface sizing rather than modal semantics.
52
-
53
- composition:
54
- works_well_with:
55
- - UiButton
56
- - UiField
57
- - UiModalWindowSurface
58
- patterns:
59
- - title: Confirmation dialog
60
- notes: Keep copy concise and put primary and secondary actions in the footer.
61
- - title: Focused form
62
- notes: Use for short forms that should not navigate away from the current page.
63
-
64
- ai_notes:
65
- do:
66
- - Use for focused blocking tasks and confirmations.
67
- - Provide clear title, body, and footer actions when the modal asks the user to decide.
68
- avoid:
69
- - Do not use as a general page layout or for long workflows that deserve a full page or sidebar.
70
-
71
- accessibility:
72
- notes:
73
- - Prefer visible text labels for interactive controls.
74
- - For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
75
- - Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
76
- keyboard:
77
- - Tab moves focus to the control when it is focusable.
78
- - Enter or Space activates native button-like controls when the host implementation renders a button.
79
-
80
- styling:
81
- notes:
82
- - Use documented props and slots as the primary styling API.
83
- - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
84
- - Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
85
- root_classes:
86
- - .ui-v1-modal-window