@retailcrm/embed-ui-v1-components 0.9.19 → 0.9.22-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +9 -1
- package/README.md +5 -2
- package/assets/sprites/actions/add-square-outlined.svg +8 -0
- package/assets/sprites/actions/drag.svg +8 -0
- package/bin/embed-ui-v1-components.mjs +231 -46
- package/bin/postinstall.mjs +3 -2
- package/dist/host.cjs +1223 -501
- package/dist/host.css +637 -10
- package/dist/host.d.ts +152 -78
- package/dist/host.js +1224 -502
- package/dist/remote.cjs +1358 -298
- package/dist/remote.d.ts +805 -67
- package/dist/remote.js +1360 -300
- package/docs/AI.md +99 -17
- package/docs/COMPONENTS.md +58 -59
- package/docs/FORMAT.md +10 -10
- package/docs/PROFILES.md +39 -22
- package/docs/README.md +11 -5
- package/docs/profiles/components/UiAddButton.yml +134 -0
- package/docs/profiles/components/UiAlert.yml +105 -0
- package/docs/profiles/components/UiAvatar.yml +88 -0
- package/docs/profiles/{UiAvatarList.yml → components/UiAvatarList.yml} +26 -0
- package/docs/profiles/{UiButton.yml → components/UiButton.yml} +14 -8
- package/docs/profiles/components/UiCalendar.yml +190 -0
- package/docs/profiles/components/UiCheckbox.yml +111 -0
- package/docs/profiles/components/UiCollapse.yml +129 -0
- package/docs/profiles/components/UiCollapseBox.yml +143 -0
- package/docs/profiles/{UiCollapseGroup.yml → components/UiCollapseGroup.yml} +24 -0
- package/docs/profiles/components/UiCopyButton.yml +104 -0
- package/docs/profiles/components/UiDate.yml +84 -0
- package/docs/profiles/components/UiDatePicker.yml +138 -0
- package/docs/profiles/components/UiError.yml +123 -0
- package/docs/profiles/{UiField.yml → components/UiField.yml} +46 -15
- package/docs/profiles/components/UiInfobox.yml +130 -0
- package/docs/profiles/components/UiLink.yml +111 -0
- package/docs/profiles/components/UiLoader.yml +71 -0
- package/docs/profiles/components/UiMenuItem.yml +93 -0
- package/docs/profiles/{UiMenuItemGroup.yml → components/UiMenuItemGroup.yml} +25 -0
- package/docs/profiles/components/UiModalSidebar.yml +156 -0
- package/docs/profiles/components/UiModalWindow.yml +181 -0
- package/docs/profiles/{UiModalWindowSurface.yml → components/UiModalWindowSurface.yml} +30 -0
- package/docs/profiles/components/UiNumberStepper.yml +100 -0
- package/docs/profiles/{UiPageHeader.yml → components/UiPageHeader.yml} +39 -23
- package/docs/profiles/components/UiPopconfirm.yml +164 -0
- package/docs/profiles/{UiPopper.yml → components/UiPopper.yml} +66 -13
- package/docs/profiles/{UiPopperConnector.yml → components/UiPopperConnector.yml} +5 -25
- package/docs/profiles/{UiPopperTarget.yml → components/UiPopperTarget.yml} +5 -25
- package/docs/profiles/components/UiRadio.yml +91 -0
- package/docs/profiles/{UiRadioSwitch.yml → components/UiRadioSwitch.yml} +55 -32
- package/docs/profiles/{UiRadioSwitchOption.yml → components/UiRadioSwitchOption.yml} +7 -13
- package/docs/profiles/components/UiScrollBox.yml +108 -0
- package/docs/profiles/{UiSelect.yml → components/UiSelect.yml} +133 -44
- package/docs/profiles/components/UiSelectOption.yml +74 -0
- package/docs/profiles/components/UiSelectOptionGroup.yml +66 -0
- package/docs/profiles/components/UiSkeleton.yml +82 -0
- package/docs/profiles/components/UiSlider.yml +161 -0
- package/docs/profiles/components/UiSwitch.yml +123 -0
- package/docs/profiles/components/UiTab.yml +234 -0
- package/docs/profiles/{UiTabGroup.yml → components/UiTabGroup.yml} +0 -30
- package/docs/profiles/components/UiTable.yml +622 -0
- package/docs/profiles/{UiTableBodyCell.yml → components/UiTableBodyCell.yml} +26 -0
- package/docs/profiles/components/UiTableColumn.yml +87 -0
- package/docs/profiles/components/UiTableFooterButton.yml +85 -0
- package/docs/profiles/components/UiTableFooterSection.yml +73 -0
- package/docs/profiles/{UiTableHeadCell.yml → components/UiTableHeadCell.yml} +26 -0
- package/docs/profiles/{UiTableSorter.yml → components/UiTableSorter.yml} +27 -0
- package/docs/profiles/components/UiTag.yml +90 -0
- package/docs/profiles/{UiTextbox.yml → components/UiTextbox.yml} +20 -32
- package/docs/profiles/components/UiTimePicker.yml +144 -0
- package/docs/profiles/{UiToggleButton.yml → components/UiToggleButton.yml} +16 -11
- package/docs/profiles/{UiToggleGroup.yml → components/UiToggleGroup.yml} +25 -13
- package/docs/profiles/{UiToggleGroupOption.yml → components/UiToggleGroupOption.yml} +7 -11
- package/docs/profiles/components/UiToolbarButton.yml +87 -0
- package/docs/profiles/components/UiToolbarLink.yml +80 -0
- package/docs/profiles/components/UiTooltip.yml +97 -0
- package/docs/profiles/components/UiTransition.yml +62 -0
- package/docs/profiles/components/UiYandexMap.yml +104 -0
- package/docs/profiles/pages/CardSettingsPage.yml +58 -0
- package/docs/profiles/pages/CollapseBlockPage.yml +46 -0
- package/docs/profiles/pages/EntityListPage.yml +66 -0
- package/docs/profiles/pages/ModalSidebar.yml +158 -0
- package/docs/profiles/pages/ModalWindow.yml +55 -0
- package/docs/profiles/pages/MultiColumnPage.yml +27 -0
- package/docs/profiles/pages/PageComposition.yml +56 -0
- package/package.json +15 -15
- package/docs/profiles/UiAddButton.yml +0 -57
- package/docs/profiles/UiAlert.yml +0 -48
- package/docs/profiles/UiAvatar.yml +0 -48
- package/docs/profiles/UiCalendar.yml +0 -48
- package/docs/profiles/UiCheckbox.yml +0 -53
- package/docs/profiles/UiCollapse.yml +0 -40
- package/docs/profiles/UiCollapseBox.yml +0 -51
- package/docs/profiles/UiCopyButton.yml +0 -52
- package/docs/profiles/UiDate.yml +0 -38
- package/docs/profiles/UiDatePicker.yml +0 -59
- package/docs/profiles/UiError.yml +0 -32
- package/docs/profiles/UiImage.yml +0 -39
- package/docs/profiles/UiInfobox.yml +0 -45
- package/docs/profiles/UiLink.yml +0 -51
- package/docs/profiles/UiLoader.yml +0 -38
- package/docs/profiles/UiMenuItem.yml +0 -57
- package/docs/profiles/UiModalSidebar.yml +0 -46
- package/docs/profiles/UiModalWindow.yml +0 -44
- package/docs/profiles/UiNumberStepper.yml +0 -52
- package/docs/profiles/UiRadio.yml +0 -38
- package/docs/profiles/UiScrollBox.yml +0 -31
- package/docs/profiles/UiSelectOption.yml +0 -44
- package/docs/profiles/UiSelectOptionGroup.yml +0 -38
- package/docs/profiles/UiSkeleton.yml +0 -41
- package/docs/profiles/UiSlider.yml +0 -38
- package/docs/profiles/UiSwitch.yml +0 -37
- package/docs/profiles/UiTab.yml +0 -119
- package/docs/profiles/UiTable.yml +0 -152
- package/docs/profiles/UiTableColumn.yml +0 -50
- package/docs/profiles/UiTableFooterButton.yml +0 -44
- package/docs/profiles/UiTableFooterSection.yml +0 -38
- package/docs/profiles/UiTag.yml +0 -41
- package/docs/profiles/UiTimePicker.yml +0 -46
- package/docs/profiles/UiToolbarButton.yml +0 -37
- package/docs/profiles/UiToolbarLink.yml +0 -32
- package/docs/profiles/UiTooltip.yml +0 -43
- package/docs/profiles/UiTransition.yml +0 -27
- package/docs/profiles/UiYandexMap.yml +0 -29
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
component: UiInfobox
|
|
2
|
+
summary: >
|
|
3
|
+
UiInfobox is a richer explanatory block for inline product, warning, or helper content.
|
|
4
|
+
It can be closable and expandable.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiInfobox
|
|
10
|
+
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiInfobox title="Important information">
|
|
16
|
+
Content
|
|
17
|
+
</UiInfobox>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
import { UiInfobox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
22
|
+
</script>
|
|
23
|
+
- title: Warning
|
|
24
|
+
code: |
|
|
25
|
+
<template>
|
|
26
|
+
<UiInfobox warning title="Warning">
|
|
27
|
+
Content
|
|
28
|
+
</UiInfobox>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script lang="ts" setup>
|
|
32
|
+
import { UiInfobox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
33
|
+
</script>
|
|
34
|
+
- title: Expandable
|
|
35
|
+
code: |
|
|
36
|
+
<template>
|
|
37
|
+
<UiInfobox
|
|
38
|
+
v-model:expanded="expanded"
|
|
39
|
+
expandable
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts" setup>
|
|
44
|
+
import { ref } from 'vue'
|
|
45
|
+
import { UiInfobox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
46
|
+
|
|
47
|
+
const expanded = ref(false)
|
|
48
|
+
</script>
|
|
49
|
+
- title: Closable
|
|
50
|
+
code: |
|
|
51
|
+
<template>
|
|
52
|
+
<UiInfobox
|
|
53
|
+
v-model:shown="shown"
|
|
54
|
+
closable
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script lang="ts" setup>
|
|
60
|
+
import { ref } from 'vue'
|
|
61
|
+
import { UiInfobox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
62
|
+
|
|
63
|
+
const shown = ref(true)
|
|
64
|
+
</script>
|
|
65
|
+
use_when:
|
|
66
|
+
- You need a highlighted explanatory block.
|
|
67
|
+
- You need closable or expandable helper content.
|
|
68
|
+
|
|
69
|
+
avoid_when:
|
|
70
|
+
- You need a one-line alert only.
|
|
71
|
+
|
|
72
|
+
api:
|
|
73
|
+
key_props:
|
|
74
|
+
- name: title
|
|
75
|
+
- name: shown
|
|
76
|
+
- name: expanded
|
|
77
|
+
- name: expandable
|
|
78
|
+
- name: closable
|
|
79
|
+
- name: warning
|
|
80
|
+
methods:
|
|
81
|
+
- name: show
|
|
82
|
+
- name: hide
|
|
83
|
+
- name: toggle
|
|
84
|
+
|
|
85
|
+
rendered_structure:
|
|
86
|
+
descriptive_only: true
|
|
87
|
+
root:
|
|
88
|
+
shape: div.ui-v1-infobox
|
|
89
|
+
tag: div
|
|
90
|
+
notes: The visible infobox body is wrapped in UiTransition and uses one flex row for media, content, and optional closer.
|
|
91
|
+
|
|
92
|
+
geometry:
|
|
93
|
+
layout: block-like message panel
|
|
94
|
+
root_display: flex
|
|
95
|
+
width_behavior: stretches to container width by default
|
|
96
|
+
|
|
97
|
+
ai_notes:
|
|
98
|
+
do:
|
|
99
|
+
- Use UiInfobox for richer guidance blocks, not tiny alerts.
|
|
100
|
+
- Use expandable when secondary explanation would otherwise make the screen noisy.
|
|
101
|
+
avoid:
|
|
102
|
+
- Do not use for transient success or error states; use UiAlert.
|
|
103
|
+
|
|
104
|
+
behavior:
|
|
105
|
+
notes:
|
|
106
|
+
- shown controls visibility.
|
|
107
|
+
- expandable and expanded control progressive disclosure.
|
|
108
|
+
- warning changes the visual tone for cautionary guidance.
|
|
109
|
+
|
|
110
|
+
composition:
|
|
111
|
+
works_well_with:
|
|
112
|
+
- UiAlert
|
|
113
|
+
- UiCollapse
|
|
114
|
+
patterns:
|
|
115
|
+
- title: Product guidance
|
|
116
|
+
notes: Use near the related form or table, not as a decorative card.
|
|
117
|
+
- title: Long explanation
|
|
118
|
+
notes: Prefer expandable content when the text is useful but not always needed.
|
|
119
|
+
|
|
120
|
+
accessibility:
|
|
121
|
+
notes:
|
|
122
|
+
- Keep rendered text concise and meaningful for screen-reader users.
|
|
123
|
+
- Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
|
|
124
|
+
|
|
125
|
+
styling:
|
|
126
|
+
notes:
|
|
127
|
+
- Use documented props and slots as the primary styling API.
|
|
128
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
129
|
+
root_classes:
|
|
130
|
+
- .ui-v1-infobox
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
component: UiLink
|
|
2
|
+
summary: >
|
|
3
|
+
UiLink is the main text-link component for inline navigation and inline actions that should
|
|
4
|
+
still read as links rather than buttons.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiLink
|
|
10
|
+
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiLink v-bind="$attrs">
|
|
16
|
+
<template v-if="text.length">
|
|
17
|
+
{{ text }}
|
|
18
|
+
</template>
|
|
19
|
+
</UiLink>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts" setup>
|
|
23
|
+
import { UiLink } from '@retailcrm/embed-ui-v1-components/remote'
|
|
24
|
+
|
|
25
|
+
defineProps({
|
|
26
|
+
text: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
use_when:
|
|
34
|
+
- You need inline navigation or linked text.
|
|
35
|
+
- You need a compact action that should still read as a link.
|
|
36
|
+
|
|
37
|
+
avoid_when:
|
|
38
|
+
- You need button semantics, use UiButton instead.
|
|
39
|
+
|
|
40
|
+
api:
|
|
41
|
+
key_props:
|
|
42
|
+
- name: href
|
|
43
|
+
- name: external
|
|
44
|
+
- name: appearance
|
|
45
|
+
- name: size
|
|
46
|
+
notes: Defaults to body text. Use size="small" inside UiTable cells to match table body typography.
|
|
47
|
+
- name: accent
|
|
48
|
+
- name: ellipsis
|
|
49
|
+
slots:
|
|
50
|
+
- name: icon
|
|
51
|
+
zone: inline-icon
|
|
52
|
+
creates: Optional icon zone inside the link.
|
|
53
|
+
emits:
|
|
54
|
+
- name: click
|
|
55
|
+
- name: focus
|
|
56
|
+
- name: blur
|
|
57
|
+
|
|
58
|
+
rendered_structure:
|
|
59
|
+
descriptive_only: true
|
|
60
|
+
root:
|
|
61
|
+
shape: a.ui-v1-link
|
|
62
|
+
tag: a
|
|
63
|
+
notes: The root is one anchor element with inline icon and text zones.
|
|
64
|
+
|
|
65
|
+
geometry:
|
|
66
|
+
layout: inline link root
|
|
67
|
+
root_display: inline-flex
|
|
68
|
+
width_behavior: content-sized by default
|
|
69
|
+
|
|
70
|
+
composition:
|
|
71
|
+
works_well_with:
|
|
72
|
+
- UiTable
|
|
73
|
+
- UiToolbarLink
|
|
74
|
+
- UiButton
|
|
75
|
+
patterns:
|
|
76
|
+
- title: Table primary link
|
|
77
|
+
notes: Use size="small", accent, and ellipsis for the primary object link in a table cell.
|
|
78
|
+
- title: External link
|
|
79
|
+
notes: Use external when the link opens outside the current extension context.
|
|
80
|
+
- title: Button-shaped navigation
|
|
81
|
+
notes: Use UiButton with href when the navigation should visually read as a command button.
|
|
82
|
+
|
|
83
|
+
ai_notes:
|
|
84
|
+
do:
|
|
85
|
+
- Use UiLink for real link semantics and inline navigation.
|
|
86
|
+
- Use size="small" for links inside UiTable body cells.
|
|
87
|
+
- Use ellipsis when a table-cell link can contain long names.
|
|
88
|
+
avoid:
|
|
89
|
+
- Do not use UiLink where the action should read as a button.
|
|
90
|
+
- Do not leave table-cell links at the default body size unless the link is intentionally emphasized.
|
|
91
|
+
|
|
92
|
+
behavior:
|
|
93
|
+
notes:
|
|
94
|
+
- Read key_props first to identify supported states and variants.
|
|
95
|
+
- Prefer controlled props and documented emits when synchronizing component state with screen logic.
|
|
96
|
+
|
|
97
|
+
accessibility:
|
|
98
|
+
notes:
|
|
99
|
+
- Prefer visible text labels for interactive controls.
|
|
100
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
101
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
102
|
+
keyboard:
|
|
103
|
+
- Tab moves focus to the control when it is focusable.
|
|
104
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
105
|
+
|
|
106
|
+
styling:
|
|
107
|
+
notes:
|
|
108
|
+
- Use documented props and slots as the primary styling API.
|
|
109
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
110
|
+
root_classes:
|
|
111
|
+
- .ui-v1-link
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
component: UiLoader
|
|
2
|
+
summary: >
|
|
3
|
+
UiLoader displays loading progress or waiting state. It can be used inline or as an overlay.
|
|
4
|
+
|
|
5
|
+
public_import:
|
|
6
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
7
|
+
named:
|
|
8
|
+
- UiLoader
|
|
9
|
+
|
|
10
|
+
use_when:
|
|
11
|
+
- You need a visible loading indicator.
|
|
12
|
+
- You need inline or overlay loading state.
|
|
13
|
+
|
|
14
|
+
avoid_when:
|
|
15
|
+
- You need skeleton content rather than a spinner-like loader.
|
|
16
|
+
|
|
17
|
+
api:
|
|
18
|
+
key_props:
|
|
19
|
+
- name: diameter
|
|
20
|
+
- name: thickness
|
|
21
|
+
- name: fixed
|
|
22
|
+
- name: overlay
|
|
23
|
+
|
|
24
|
+
rendered_structure:
|
|
25
|
+
descriptive_only: true
|
|
26
|
+
root:
|
|
27
|
+
shape: div.ui-v1-loader
|
|
28
|
+
tag: div
|
|
29
|
+
notes: The loader body may be wrapped in UiTransition, but the visible loader itself is one div root.
|
|
30
|
+
|
|
31
|
+
geometry:
|
|
32
|
+
layout: loader surface or overlay
|
|
33
|
+
root_display: block
|
|
34
|
+
width_behavior: content-sized by default, viewport-covering in fixed or overlay modes
|
|
35
|
+
|
|
36
|
+
ai_notes:
|
|
37
|
+
do:
|
|
38
|
+
- Use overlay=true when the loader should dim the covered page or module content.
|
|
39
|
+
- Use overlay or fixed only when the loader should escape normal inline flow.
|
|
40
|
+
- Preserve surrounding filters and headers when only the content area is loading.
|
|
41
|
+
avoid:
|
|
42
|
+
- Do not create custom dimming markup around UiLoader; use the overlay prop.
|
|
43
|
+
- Do not replace content-shaped loading with a page-wide loader when UiSkeleton would communicate layout better.
|
|
44
|
+
|
|
45
|
+
behavior:
|
|
46
|
+
notes:
|
|
47
|
+
- overlay=true adds the dimmed backdrop for covered content.
|
|
48
|
+
- fixed and overlay change the loader from inline feedback into a surface-covering state.
|
|
49
|
+
- diameter and thickness tune the visual weight of the indicator.
|
|
50
|
+
|
|
51
|
+
composition:
|
|
52
|
+
works_well_with:
|
|
53
|
+
- UiSkeleton
|
|
54
|
+
- UiAlert
|
|
55
|
+
patterns:
|
|
56
|
+
- title: Table loading
|
|
57
|
+
notes: Keep filters visible and show loading in the table area.
|
|
58
|
+
- title: Blocking operation
|
|
59
|
+
notes: Use overlay only when interaction with the covered content must be blocked.
|
|
60
|
+
|
|
61
|
+
accessibility:
|
|
62
|
+
notes:
|
|
63
|
+
- Keep rendered text concise and meaningful for screen-reader users.
|
|
64
|
+
- Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
|
|
65
|
+
|
|
66
|
+
styling:
|
|
67
|
+
notes:
|
|
68
|
+
- Use documented props and slots as the primary styling API.
|
|
69
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
70
|
+
root_classes:
|
|
71
|
+
- .ui-v1-loader
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
component: UiMenuItem
|
|
2
|
+
summary: >
|
|
3
|
+
UiMenuItem is a structured menu row component with support for icons, avatar, description,
|
|
4
|
+
counters, and active or danger styling.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiMenuItem
|
|
10
|
+
|
|
11
|
+
use_when:
|
|
12
|
+
- You need a menu row with structured content zones.
|
|
13
|
+
- You need icon, avatar, description, or counter inside one menu item.
|
|
14
|
+
|
|
15
|
+
avoid_when:
|
|
16
|
+
- You need a plain inline link.
|
|
17
|
+
|
|
18
|
+
api:
|
|
19
|
+
key_props:
|
|
20
|
+
- name: description
|
|
21
|
+
- name: counter
|
|
22
|
+
- name: active
|
|
23
|
+
- name: danger
|
|
24
|
+
- name: disabled
|
|
25
|
+
- name: size
|
|
26
|
+
slots:
|
|
27
|
+
- name: default
|
|
28
|
+
zone: main-label
|
|
29
|
+
creates: Main visible label area.
|
|
30
|
+
- name: avatar
|
|
31
|
+
zone: leading-avatar
|
|
32
|
+
creates: Leading avatar zone.
|
|
33
|
+
- name: leading-icon
|
|
34
|
+
zone: leading-icon
|
|
35
|
+
creates: Leading icon zone.
|
|
36
|
+
- name: description
|
|
37
|
+
zone: secondary-copy
|
|
38
|
+
creates: Secondary description area.
|
|
39
|
+
- name: trailing-icon
|
|
40
|
+
zone: trailing-icon
|
|
41
|
+
creates: Trailing icon zone.
|
|
42
|
+
|
|
43
|
+
rendered_structure:
|
|
44
|
+
descriptive_only: true
|
|
45
|
+
root:
|
|
46
|
+
shape: div.ui-v1-menu-item
|
|
47
|
+
tag: div
|
|
48
|
+
notes: The root is one menu row container with leading, main, and trailing content zones.
|
|
49
|
+
|
|
50
|
+
geometry:
|
|
51
|
+
layout: menu row
|
|
52
|
+
root_display: flex
|
|
53
|
+
width_behavior: stretches to available menu width
|
|
54
|
+
|
|
55
|
+
ai_notes:
|
|
56
|
+
do:
|
|
57
|
+
- Use structured slots instead of custom wrappers inside menu rows.
|
|
58
|
+
- Use danger only for destructive menu actions.
|
|
59
|
+
avoid:
|
|
60
|
+
- Do not use as a generic card or list row outside menu-like surfaces.
|
|
61
|
+
|
|
62
|
+
behavior:
|
|
63
|
+
notes:
|
|
64
|
+
- active marks the current or selected item.
|
|
65
|
+
- disabled prevents interaction.
|
|
66
|
+
- danger changes semantic tone for destructive actions.
|
|
67
|
+
|
|
68
|
+
composition:
|
|
69
|
+
works_well_with:
|
|
70
|
+
- UiMenuItemGroup
|
|
71
|
+
- UiAvatar
|
|
72
|
+
- UiTag
|
|
73
|
+
patterns:
|
|
74
|
+
- title: Command menu row
|
|
75
|
+
notes: Use leading-icon for action identity and trailing-icon for disclosure or shortcut-like hints.
|
|
76
|
+
- title: Entity menu row
|
|
77
|
+
notes: Use avatar and description slots for users, customers, or entities.
|
|
78
|
+
|
|
79
|
+
accessibility:
|
|
80
|
+
notes:
|
|
81
|
+
- Prefer visible text labels for interactive controls.
|
|
82
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
83
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
84
|
+
keyboard:
|
|
85
|
+
- Tab moves focus to the control when it is focusable.
|
|
86
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
87
|
+
|
|
88
|
+
styling:
|
|
89
|
+
notes:
|
|
90
|
+
- Use documented props and slots as the primary styling API.
|
|
91
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
92
|
+
root_classes:
|
|
93
|
+
- .ui-v1-menu-item
|
|
@@ -48,3 +48,28 @@ geometry:
|
|
|
48
48
|
ai_notes:
|
|
49
49
|
do:
|
|
50
50
|
- Use for grouped menu structure instead of manual heading-plus-list markup.
|
|
51
|
+
avoid:
|
|
52
|
+
- Do not group unrelated actions only for visual spacing.
|
|
53
|
+
|
|
54
|
+
behavior:
|
|
55
|
+
notes:
|
|
56
|
+
- The group organizes nested menu rows but does not manage selection by itself.
|
|
57
|
+
|
|
58
|
+
composition:
|
|
59
|
+
works_well_with:
|
|
60
|
+
- UiMenuItem
|
|
61
|
+
patterns:
|
|
62
|
+
- title: Grouped options
|
|
63
|
+
notes: Use label and quantity slots to clarify large option groups.
|
|
64
|
+
|
|
65
|
+
accessibility:
|
|
66
|
+
notes:
|
|
67
|
+
- Keep visible labels and slot content meaningful.
|
|
68
|
+
- Prefer documented props and slots over custom DOM replacements so host-side accessibility behavior is preserved.
|
|
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
|
+
root_classes:
|
|
75
|
+
- .ui-v1-menu-item-group
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
component: UiModalSidebar
|
|
2
|
+
summary: >
|
|
3
|
+
UiModalSidebar is a side-docked modal surface with open state, direction, size, and
|
|
4
|
+
scrolling control. Use it when the UI should slide from an edge instead of opening as a centered dialog.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiModalSidebar
|
|
10
|
+
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<div>
|
|
16
|
+
<UiButton @click="open = true">
|
|
17
|
+
{{ buttonTitle }}
|
|
18
|
+
</UiButton>
|
|
19
|
+
|
|
20
|
+
<UiModalSidebar v-model:opened="open" v-bind="$attrs">
|
|
21
|
+
<template #title>
|
|
22
|
+
Title
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<div style="height: 1500px;">
|
|
26
|
+
<div>Content with a height of 1500px</div>
|
|
27
|
+
|
|
28
|
+
<div v-if="hasNesting" style="margin-top: 16px">
|
|
29
|
+
<UiButton @click="modalSidebarInner = true">
|
|
30
|
+
Nested sidebar
|
|
31
|
+
</UiButton>
|
|
32
|
+
|
|
33
|
+
<UiModalSidebar
|
|
34
|
+
v-model:opened="modalSidebarInner"
|
|
35
|
+
@close-sidebar="modalSidebarInner = false"
|
|
36
|
+
>
|
|
37
|
+
<template #title>
|
|
38
|
+
Header
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<div style="height: 1500px;">
|
|
42
|
+
<div>Some content</div>
|
|
43
|
+
<div>Nested sidebar</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<template #footer>
|
|
47
|
+
<UiButton @click="modalSidebarInner = false">
|
|
48
|
+
Close
|
|
49
|
+
</UiButton>
|
|
50
|
+
</template>
|
|
51
|
+
</UiModalSidebar>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<template v-if="footer" #footer>
|
|
56
|
+
<UiButton @click="open = false">
|
|
57
|
+
Close
|
|
58
|
+
</UiButton>
|
|
59
|
+
</template>
|
|
60
|
+
</UiModalSidebar>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script lang="ts" setup>
|
|
65
|
+
import { ref } from 'vue'
|
|
66
|
+
|
|
67
|
+
import { UiButton } from '@retailcrm/embed-ui-v1-components/remote'
|
|
68
|
+
import { UiModalSidebar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
69
|
+
|
|
70
|
+
defineProps({
|
|
71
|
+
buttonTitle: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: '',
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
hasNesting: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false,
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
footer: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false,
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const open = ref(false)
|
|
88
|
+
const modalSidebarInner = ref(false)
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
use_when:
|
|
92
|
+
- You need side-panel modal UI.
|
|
93
|
+
- You need left or right docked modal content.
|
|
94
|
+
|
|
95
|
+
avoid_when:
|
|
96
|
+
- You need a centered dialog.
|
|
97
|
+
|
|
98
|
+
api:
|
|
99
|
+
key_props:
|
|
100
|
+
- name: opened
|
|
101
|
+
- name: closable
|
|
102
|
+
- name: direction
|
|
103
|
+
- name: size
|
|
104
|
+
- name: scrolling
|
|
105
|
+
- name: fixed
|
|
106
|
+
|
|
107
|
+
rendered_structure:
|
|
108
|
+
descriptive_only: true
|
|
109
|
+
root:
|
|
110
|
+
shape: div.ui-v1-modal-sidebar-overlay
|
|
111
|
+
tag: div
|
|
112
|
+
notes: The component is teleported; the overlay div contains the actual aside.ui-v1-modal-sidebar panel.
|
|
113
|
+
|
|
114
|
+
geometry:
|
|
115
|
+
layout: teleported overlay with side panel
|
|
116
|
+
root_display: flex
|
|
117
|
+
width_behavior: viewport-covering overlay with fixed-width sidebar surface
|
|
118
|
+
|
|
119
|
+
behavior:
|
|
120
|
+
notes:
|
|
121
|
+
- opened controls visibility.
|
|
122
|
+
- direction controls which side the sidebar comes from.
|
|
123
|
+
|
|
124
|
+
ai_notes:
|
|
125
|
+
do:
|
|
126
|
+
- Use UiModalSidebar when page context should stay visually connected to the modal content.
|
|
127
|
+
- Use for inspect, edit, or secondary workflows that relate to the current list or page.
|
|
128
|
+
avoid:
|
|
129
|
+
- Do not use for short confirmations; use UiModalWindow.
|
|
130
|
+
|
|
131
|
+
composition:
|
|
132
|
+
works_well_with:
|
|
133
|
+
- UiTable
|
|
134
|
+
- UiField
|
|
135
|
+
- UiButton
|
|
136
|
+
patterns:
|
|
137
|
+
- title: Row detail side panel
|
|
138
|
+
notes: Open from a table row when the user should keep list context visible.
|
|
139
|
+
- title: Side edit form
|
|
140
|
+
notes: Put primary actions in the sidebar footer when the form edits the selected object.
|
|
141
|
+
|
|
142
|
+
accessibility:
|
|
143
|
+
notes:
|
|
144
|
+
- Prefer visible text labels for interactive controls.
|
|
145
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
146
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
147
|
+
keyboard:
|
|
148
|
+
- Tab moves focus to the control when it is focusable.
|
|
149
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
150
|
+
|
|
151
|
+
styling:
|
|
152
|
+
notes:
|
|
153
|
+
- Use documented props and slots as the primary styling API.
|
|
154
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
155
|
+
root_classes:
|
|
156
|
+
- .ui-v1-modal-sidebar-overlay
|