@retailcrm/embed-ui-v1-components 0.9.21 → 0.9.22-alpha.2
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,164 @@
|
|
|
1
|
+
component: UiPopconfirm
|
|
2
|
+
summary: >
|
|
3
|
+
UiPopconfirm is a non-modal floating confirmation dialog anchored to a trigger.
|
|
4
|
+
Use it for short action confirmations where a modal would be too heavy.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiPopconfirm
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiButton
|
|
13
|
+
- UiPopper
|
|
14
|
+
- UiModalWindow
|
|
15
|
+
|
|
16
|
+
examples:
|
|
17
|
+
- title: Basic confirmation
|
|
18
|
+
code: |
|
|
19
|
+
<template>
|
|
20
|
+
<UiPopconfirm title="Confirm action?">
|
|
21
|
+
<template #trigger="{ open }">
|
|
22
|
+
<UiButton :active="open">
|
|
23
|
+
Archive
|
|
24
|
+
</UiButton>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
The item will be moved to the archive.
|
|
28
|
+
</UiPopconfirm>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script lang="ts" setup>
|
|
32
|
+
import { UiButton, UiPopconfirm } from '@retailcrm/embed-ui-v1-components/remote'
|
|
33
|
+
</script>
|
|
34
|
+
- title: Destructive action
|
|
35
|
+
code: |
|
|
36
|
+
<template>
|
|
37
|
+
<UiPopconfirm title="Delete item?" ok-variant="danger">
|
|
38
|
+
<template #trigger="{ open }">
|
|
39
|
+
<UiButton :active="open" variant="danger">
|
|
40
|
+
Delete
|
|
41
|
+
</UiButton>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
This action cannot be undone.
|
|
45
|
+
</UiPopconfirm>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script lang="ts" setup>
|
|
49
|
+
import { UiButton, UiPopconfirm } from '@retailcrm/embed-ui-v1-components/remote'
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
use_when:
|
|
53
|
+
- You need a short confirmation for a single nearby action.
|
|
54
|
+
- You need confirm and cancel events without blocking the whole page.
|
|
55
|
+
- You need a destructive confirmation through okVariant="danger".
|
|
56
|
+
|
|
57
|
+
avoid_when:
|
|
58
|
+
- You need a form, long explanation, or multi-step confirmation.
|
|
59
|
+
- You need to block page interaction; use UiModalWindow instead.
|
|
60
|
+
- You only need helper text; use UiTooltip instead.
|
|
61
|
+
|
|
62
|
+
api:
|
|
63
|
+
key_props:
|
|
64
|
+
- name: title
|
|
65
|
+
notes: Text title shown above the description.
|
|
66
|
+
- name: okVariant
|
|
67
|
+
notes: Confirmation button variant; use danger for destructive actions.
|
|
68
|
+
- name: placement
|
|
69
|
+
notes: Preferred floating position relative to the trigger.
|
|
70
|
+
- name: visible
|
|
71
|
+
notes: Controlled open state for v-model:visible.
|
|
72
|
+
props:
|
|
73
|
+
- name: okTitle
|
|
74
|
+
notes: Confirmation button text.
|
|
75
|
+
- name: cancelTitle
|
|
76
|
+
notes: Cancel button text.
|
|
77
|
+
- name: cancelAppearance
|
|
78
|
+
notes: Cancel button appearance.
|
|
79
|
+
- name: cancelVariant
|
|
80
|
+
notes: Cancel button variant.
|
|
81
|
+
- name: buttonSize
|
|
82
|
+
notes: Size of both action buttons.
|
|
83
|
+
- name: popperClass
|
|
84
|
+
notes: Extra class for the floating popper root.
|
|
85
|
+
- name: popperOptions
|
|
86
|
+
notes: Additional UiPopper options.
|
|
87
|
+
slots:
|
|
88
|
+
- name: trigger
|
|
89
|
+
zone: trigger
|
|
90
|
+
creates: Target element that opens the confirmation.
|
|
91
|
+
notes: Receives open for active trigger styling when supported.
|
|
92
|
+
- name: title
|
|
93
|
+
zone: header
|
|
94
|
+
creates: Custom title content.
|
|
95
|
+
- name: default
|
|
96
|
+
zone: body
|
|
97
|
+
creates: Confirmation description.
|
|
98
|
+
- name: cancel-text
|
|
99
|
+
zone: footer
|
|
100
|
+
creates: Cancel button content.
|
|
101
|
+
- name: ok-text
|
|
102
|
+
zone: footer
|
|
103
|
+
creates: Confirmation button content.
|
|
104
|
+
emits:
|
|
105
|
+
- name: ok
|
|
106
|
+
payload: undefined
|
|
107
|
+
notes: Fired when the confirmation button is clicked.
|
|
108
|
+
- name: cancel
|
|
109
|
+
payload: undefined
|
|
110
|
+
notes: Fired when the cancel button is clicked or the popup closes by outside click.
|
|
111
|
+
- name: toggle
|
|
112
|
+
payload: boolean
|
|
113
|
+
notes: Fired when open state changes.
|
|
114
|
+
- name: update:visible
|
|
115
|
+
payload: boolean
|
|
116
|
+
notes: v-model:visible update channel.
|
|
117
|
+
|
|
118
|
+
rendered_structure:
|
|
119
|
+
descriptive_only: true
|
|
120
|
+
root:
|
|
121
|
+
shape: div.ui-v1-popper.ui-v1-popconfirm via UiPopper
|
|
122
|
+
tag: div
|
|
123
|
+
zones:
|
|
124
|
+
- .ui-v1-popconfirm__title
|
|
125
|
+
- .ui-v1-popconfirm__content
|
|
126
|
+
- .ui-v1-popconfirm__footer
|
|
127
|
+
|
|
128
|
+
geometry:
|
|
129
|
+
layout: floating dialog outside normal document flow
|
|
130
|
+
root_display: block
|
|
131
|
+
width_behavior: content-sized with max width
|
|
132
|
+
notes:
|
|
133
|
+
- Defaults to bottom-start placement.
|
|
134
|
+
- The layer is anchored to the component trigger wrapper.
|
|
135
|
+
|
|
136
|
+
ai_notes:
|
|
137
|
+
do:
|
|
138
|
+
- Use UiPopconfirm for short confirmations instead of building UiPopper and UiButton manually.
|
|
139
|
+
- Pass open from the trigger slot into UiButton active when possible.
|
|
140
|
+
- Use okVariant="danger" for destructive actions.
|
|
141
|
+
avoid:
|
|
142
|
+
- Do not put forms or complex flows into UiPopconfirm.
|
|
143
|
+
- Do not use it as a tooltip or notification.
|
|
144
|
+
|
|
145
|
+
accessibility:
|
|
146
|
+
notes:
|
|
147
|
+
- Renders a non-modal dialog with aria-modal="false".
|
|
148
|
+
- Title content is connected through aria-labelledby when present.
|
|
149
|
+
- Use an accessible trigger component such as UiButton.
|
|
150
|
+
|
|
151
|
+
styling:
|
|
152
|
+
notes:
|
|
153
|
+
- Use props and slots first; use popperClass only for local layout integrations.
|
|
154
|
+
- CSS variables can tune the floating surface width.
|
|
155
|
+
root_classes:
|
|
156
|
+
- .ui-v1-popconfirm
|
|
157
|
+
zones:
|
|
158
|
+
- .ui-v1-popconfirm__title
|
|
159
|
+
- .ui-v1-popconfirm__content
|
|
160
|
+
- .ui-v1-popconfirm__footer
|
|
161
|
+
css_variables:
|
|
162
|
+
public_theme_variables:
|
|
163
|
+
- name: --ui-v1-popconfirm-width-max
|
|
164
|
+
effect: Maximum width of the floating confirmation.
|
|
@@ -3,7 +3,6 @@ summary: >
|
|
|
3
3
|
UiPopper is the low-level floating layer used for tooltips, dropdowns, and popups.
|
|
4
4
|
It controls visibility, teleport container, positioning, and trigger logic, but is usually
|
|
5
5
|
consumed as part of a higher-level component rather than as a standalone content wrapper.
|
|
6
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uipopper--docs
|
|
7
6
|
|
|
8
7
|
public_import:
|
|
9
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -13,9 +12,74 @@ public_import:
|
|
|
13
12
|
related_components:
|
|
14
13
|
- UiPopperConnector
|
|
15
14
|
- UiPopperTarget
|
|
15
|
+
- UiPopconfirm
|
|
16
16
|
- UiSelect
|
|
17
17
|
- UiTooltip
|
|
18
18
|
|
|
19
|
+
examples:
|
|
20
|
+
- title: Usage
|
|
21
|
+
code: |
|
|
22
|
+
<template>
|
|
23
|
+
<UiPopperConnector>
|
|
24
|
+
<UiButton variant="danger">
|
|
25
|
+
Delete
|
|
26
|
+
</UiButton>
|
|
27
|
+
|
|
28
|
+
<UiPopper role="dialog" class="popconfirm">
|
|
29
|
+
<div class="popconfirm__content">
|
|
30
|
+
This action cannot be cancelled. Continue?
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="popconfirm__footer">
|
|
34
|
+
<UiButton variant="danger">
|
|
35
|
+
Yes
|
|
36
|
+
</UiButton>
|
|
37
|
+
|
|
38
|
+
<UiButton appearance="secondary">
|
|
39
|
+
No
|
|
40
|
+
</UiButton>
|
|
41
|
+
</div>
|
|
42
|
+
</UiPopper>
|
|
43
|
+
</UiPopperConnector>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script lang="ts" setup>
|
|
47
|
+
import { UiButton, UiPopper, UiPopperConnector } from '@retailcrm/embed-ui-v1-components/remote'
|
|
48
|
+
</script>
|
|
49
|
+
- title: Custom target components
|
|
50
|
+
code: |
|
|
51
|
+
<template>
|
|
52
|
+
<UiPopperConnector>
|
|
53
|
+
<UiPopperTarget tag="span" role="button" class="icon-button">
|
|
54
|
+
<IconTrash aria-label="Delete" />
|
|
55
|
+
</UiPopperTarget>
|
|
56
|
+
|
|
57
|
+
<UiPopper role="tooltip" class="tooltip">
|
|
58
|
+
Delete
|
|
59
|
+
</UiPopper>
|
|
60
|
+
|
|
61
|
+
<UiPopper role="dialog" class="popconfirm">
|
|
62
|
+
<div class="popconfirm__content">
|
|
63
|
+
This action cannot be cancelled. Continue?
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="popconfirm__footer">
|
|
67
|
+
<UiButton variant="danger">
|
|
68
|
+
Yes
|
|
69
|
+
</UiButton>
|
|
70
|
+
|
|
71
|
+
<UiButton appearance="secondary">
|
|
72
|
+
No
|
|
73
|
+
</UiButton>
|
|
74
|
+
</div>
|
|
75
|
+
</UiPopper>
|
|
76
|
+
</UiPopperConnector>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script lang="ts" setup>
|
|
80
|
+
import IconTrash from '@retailcrm/embed-ui-v1-components/assets/sprites/ui/delete.svg'
|
|
81
|
+
import { UiButton, UiPopper, UiPopperConnector, UiPopperTarget } from '@retailcrm/embed-ui-v1-components/remote'
|
|
82
|
+
</script>
|
|
19
83
|
use_when:
|
|
20
84
|
- You need a floating layer anchored to a target element.
|
|
21
85
|
- You need separate show and hide triggers for target and popper.
|
|
@@ -24,6 +88,7 @@ use_when:
|
|
|
24
88
|
avoid_when:
|
|
25
89
|
- You need a regular block in normal document flow.
|
|
26
90
|
- You need a high-level dropdown or tooltip and do not need low-level control.
|
|
91
|
+
- You need a short action confirmation; use UiPopconfirm instead.
|
|
27
92
|
|
|
28
93
|
api:
|
|
29
94
|
key_props:
|
|
@@ -3,7 +3,6 @@ summary: >
|
|
|
3
3
|
UiPopperConnector is a lightweight wrapper that gives target-side and popper-side parts
|
|
4
4
|
a shared target context. It has almost no UI meaning on its own, but is often required
|
|
5
5
|
for correct target-driven floating behavior.
|
|
6
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uipopper--docs
|
|
7
6
|
|
|
8
7
|
public_import:
|
|
9
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -94,4 +93,3 @@ styling:
|
|
|
94
93
|
notes:
|
|
95
94
|
- Use documented props and slots as the primary styling API.
|
|
96
95
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
97
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
@@ -2,7 +2,6 @@ component: UiPopperTarget
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiPopperTarget is the target-side wrapper that registers a DOM element in popper context.
|
|
4
4
|
A good mental model is "this node is the anchor", not "this is a visual layout wrapper".
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uipopper--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -97,4 +96,3 @@ styling:
|
|
|
97
96
|
notes:
|
|
98
97
|
- Use documented props and slots as the primary styling API.
|
|
99
98
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
100
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
@@ -2,13 +2,27 @@ component: UiRadio
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiRadio is the single-choice selection control for exclusive option sets.
|
|
4
4
|
It is the radio-style counterpart to UiCheckbox.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiradio--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
8
|
named:
|
|
10
9
|
- UiRadio
|
|
11
10
|
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiRadio id="delivery-courier" v-model:model="deliveryType" value="courier" name="delivery-type" />
|
|
16
|
+
<label for="delivery-courier">Courier</label>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { ref } from 'vue'
|
|
21
|
+
import { UiRadio } from '@retailcrm/embed-ui-v1-components/remote'
|
|
22
|
+
|
|
23
|
+
const deliveryType = ref('courier')
|
|
24
|
+
</script>
|
|
25
|
+
|
|
12
26
|
use_when:
|
|
13
27
|
- You need one selected value from a fixed set.
|
|
14
28
|
|
|
@@ -73,6 +87,5 @@ styling:
|
|
|
73
87
|
notes:
|
|
74
88
|
- Use documented props and slots as the primary styling API.
|
|
75
89
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
76
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
77
90
|
root_classes:
|
|
78
91
|
- .ui-v1-radio
|
|
@@ -4,7 +4,6 @@ summary: >
|
|
|
4
4
|
a compact inline switch and a richer section-card layout. It is useful when the
|
|
5
5
|
choice set is small and always visible. For richer per-option content, compose it
|
|
6
6
|
with UiRadioSwitchOption instead of relying only on the options array.
|
|
7
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiradioswitch--docs
|
|
8
7
|
|
|
9
8
|
public_import:
|
|
10
9
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -17,6 +16,61 @@ related_components:
|
|
|
17
16
|
- UiField
|
|
18
17
|
- UiRadioSwitchOption
|
|
19
18
|
|
|
19
|
+
examples:
|
|
20
|
+
- title: Basic switcher
|
|
21
|
+
code: |
|
|
22
|
+
<template>
|
|
23
|
+
<UiRadioSwitch
|
|
24
|
+
v-model:value="mode"
|
|
25
|
+
:options="options"
|
|
26
|
+
/>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts" setup>
|
|
30
|
+
import { ref } from 'vue'
|
|
31
|
+
import { UiRadioSwitch } from '@retailcrm/embed-ui-v1-components/remote'
|
|
32
|
+
|
|
33
|
+
const mode = ref({ key: 'auto' })
|
|
34
|
+
|
|
35
|
+
const options = [
|
|
36
|
+
{ label: 'Auto', value: { key: 'auto' } },
|
|
37
|
+
{ label: 'Manual', value: { key: 'manual' } },
|
|
38
|
+
]
|
|
39
|
+
</script>
|
|
40
|
+
- title: Cards with descriptions
|
|
41
|
+
code: |
|
|
42
|
+
<template>
|
|
43
|
+
<UiRadioSwitch
|
|
44
|
+
v-model:value="mode"
|
|
45
|
+
appearance="section"
|
|
46
|
+
rubber
|
|
47
|
+
:equal-fn="equalFn"
|
|
48
|
+
>
|
|
49
|
+
<UiRadioSwitchOption
|
|
50
|
+
label="Auto"
|
|
51
|
+
:value="{ key: 'auto' }"
|
|
52
|
+
description="Automatic mode"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<UiRadioSwitchOption
|
|
56
|
+
label="Manual"
|
|
57
|
+
:value="{ key: 'manual' }"
|
|
58
|
+
description="Manual setup"
|
|
59
|
+
/>
|
|
60
|
+
</UiRadioSwitch>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script lang="ts" setup>
|
|
64
|
+
import { ref } from 'vue'
|
|
65
|
+
import {
|
|
66
|
+
UiRadioSwitch,
|
|
67
|
+
UiRadioSwitchOption,
|
|
68
|
+
} from '@retailcrm/embed-ui-v1-components/remote'
|
|
69
|
+
|
|
70
|
+
const mode = ref({ key: 'auto' })
|
|
71
|
+
const equalFn = (a?: { key: string }, b?: { key: string }) => a?.key === b?.key
|
|
72
|
+
</script>
|
|
73
|
+
|
|
20
74
|
use_when:
|
|
21
75
|
- You need one selected value from a small fixed set.
|
|
22
76
|
- You want a segmented control instead of classic radio circles.
|
|
@@ -3,7 +3,6 @@ summary: >
|
|
|
3
3
|
UiRadioSwitchOption is the declarative option child of UiRadioSwitch. It is the
|
|
4
4
|
richer alternative to the plain options array and is used when one option needs
|
|
5
5
|
custom icon, label, description, or selected-state checkmark content.
|
|
6
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiradioswitch--docs
|
|
7
6
|
|
|
8
7
|
public_import:
|
|
9
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -112,6 +111,5 @@ styling:
|
|
|
112
111
|
notes:
|
|
113
112
|
- Use documented props and slots as the primary styling API.
|
|
114
113
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
115
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
116
114
|
root_classes:
|
|
117
115
|
- .ui-v1-radio-switch-option
|
|
@@ -2,13 +2,57 @@ component: UiScrollBox
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiScrollBox is a scrollable container for constrained content areas. Use it when content
|
|
4
4
|
should remain inside a dedicated scrolling region instead of growing the whole page.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiscrollbox--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
8
|
named:
|
|
10
9
|
- UiScrollBox
|
|
11
10
|
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<div :class="$style['wrapper']">
|
|
16
|
+
<UiScrollBox v-bind="$attrs" :class="$style['block']">
|
|
17
|
+
<div :class="[$style['content'], $style['content_tall']]" />
|
|
18
|
+
</UiScrollBox>
|
|
19
|
+
|
|
20
|
+
<UiScrollBox v-bind="$attrs" :class="$style['block']">
|
|
21
|
+
<div :class="[$style['content'], $style['content_wide']]" />
|
|
22
|
+
</UiScrollBox>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script lang="ts" setup>
|
|
27
|
+
import { UiScrollBox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style lang="less" module>
|
|
31
|
+
|
|
32
|
+
.wrapper {
|
|
33
|
+
display: flex;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.block {
|
|
37
|
+
width: 120px;
|
|
38
|
+
height: 147px;
|
|
39
|
+
border: 1px solid rgba(30, 34, 72, 0.16);
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
|
|
42
|
+
&:not(:last-child) {
|
|
43
|
+
margin-right: 8px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.content {
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
|
|
51
|
+
&_wide { width: 300px; }
|
|
52
|
+
&_tall { height: 300px; }
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
55
|
+
|
|
12
56
|
use_when:
|
|
13
57
|
- You need a bounded scroll area.
|
|
14
58
|
- You need long content inside a fixed-height or fixed-width region.
|
|
@@ -62,4 +106,3 @@ styling:
|
|
|
62
106
|
notes:
|
|
63
107
|
- Use documented props and slots as the primary styling API.
|
|
64
108
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
65
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
@@ -3,7 +3,6 @@ summary: >
|
|
|
3
3
|
UiSelect is a dropdown component for single-select and multi-select flows. It combines
|
|
4
4
|
a textbox-like trigger with a popper-based option layer. For a correct mental model,
|
|
5
5
|
read it together with UiPopper, UiPopperConnector, and UiPopperTarget.
|
|
6
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiselect--docs
|
|
7
6
|
|
|
8
7
|
public_import:
|
|
9
8
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -19,6 +18,139 @@ related_components:
|
|
|
19
18
|
- UiPopperConnector
|
|
20
19
|
- UiPopperTarget
|
|
21
20
|
|
|
21
|
+
examples:
|
|
22
|
+
- title: Basic selection
|
|
23
|
+
code: |
|
|
24
|
+
<template>
|
|
25
|
+
<UiSelect placeholder="Assignee">
|
|
26
|
+
<UiSelectOption value="kyle" label="Kyle Simmons" />
|
|
27
|
+
<UiSelectOption value="eduardo" label="Eduardo Henry" />
|
|
28
|
+
<UiSelectOption value="philip" label="Philip Williamson" />
|
|
29
|
+
</UiSelect>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts" setup>
|
|
33
|
+
import {
|
|
34
|
+
UiSelect,
|
|
35
|
+
UiSelectOption,
|
|
36
|
+
} from '@retailcrm/embed-ui-v1-components/remote'
|
|
37
|
+
</script>
|
|
38
|
+
- title: Multiple selection with clearing
|
|
39
|
+
code: |
|
|
40
|
+
<template>
|
|
41
|
+
<UiSelect
|
|
42
|
+
v-model:value="value"
|
|
43
|
+
multiple
|
|
44
|
+
clearable
|
|
45
|
+
placeholder="Assignees"
|
|
46
|
+
>
|
|
47
|
+
<UiSelectOption value="kyle" label="Kyle Simmons" />
|
|
48
|
+
<UiSelectOption value="eduardo" label="Eduardo Henry" />
|
|
49
|
+
<UiSelectOption value="philip" label="Philip Williamson" />
|
|
50
|
+
</UiSelect>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<script lang="ts" setup>
|
|
54
|
+
import { ref } from 'vue'
|
|
55
|
+
import { UiSelect, UiSelectOption } from '@retailcrm/embed-ui-v1-components/remote'
|
|
56
|
+
|
|
57
|
+
const value = ref<string[]>([])
|
|
58
|
+
</script>
|
|
59
|
+
- title: Option search
|
|
60
|
+
code: |
|
|
61
|
+
<template>
|
|
62
|
+
<UiSelect filterable placeholder="Find a user">
|
|
63
|
+
<UiSelectOption value="kyle" label="Kyle Simmons" />
|
|
64
|
+
<UiSelectOption value="eduardo" label="Eduardo Henry" />
|
|
65
|
+
<UiSelectOption value="philip" label="Philip Williamson" />
|
|
66
|
+
</UiSelect>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script lang="ts" setup>
|
|
70
|
+
import { UiSelect, UiSelectOption } from '@retailcrm/embed-ui-v1-components/remote'
|
|
71
|
+
</script>
|
|
72
|
+
- title: Error state (`invalid`)
|
|
73
|
+
code: |
|
|
74
|
+
<template>
|
|
75
|
+
<UiSelect
|
|
76
|
+
v-model:value="value"
|
|
77
|
+
invalid
|
|
78
|
+
placeholder="User"
|
|
79
|
+
>
|
|
80
|
+
<UiSelectOption value="kyle" label="Kyle Simmons" />
|
|
81
|
+
<UiSelectOption value="eduardo" label="Eduardo Henry" />
|
|
82
|
+
</UiSelect>
|
|
83
|
+
</template>
|
|
84
|
+
|
|
85
|
+
<script lang="ts" setup>
|
|
86
|
+
import { ref } from 'vue'
|
|
87
|
+
import { UiSelect, UiSelectOption } from '@retailcrm/embed-ui-v1-components/remote'
|
|
88
|
+
|
|
89
|
+
const value = ref('eduardo')
|
|
90
|
+
</script>
|
|
91
|
+
- title: "`readonly` mode"
|
|
92
|
+
code: |
|
|
93
|
+
<template>
|
|
94
|
+
<UiSelect readonly placeholder="User">
|
|
95
|
+
<UiSelectOption value="kyle" label="Kyle Simmons" />
|
|
96
|
+
<UiSelectOption value="eduardo" label="Eduardo Henry" />
|
|
97
|
+
</UiSelect>
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<script lang="ts" setup>
|
|
101
|
+
import { UiSelect, UiSelectOption } from '@retailcrm/embed-ui-v1-components/remote'
|
|
102
|
+
</script>
|
|
103
|
+
- title: "`disabled` mode"
|
|
104
|
+
code: |
|
|
105
|
+
<template>
|
|
106
|
+
<UiSelect disabled placeholder="User">
|
|
107
|
+
<UiSelectOption value="kyle" label="Kyle Simmons" />
|
|
108
|
+
<UiSelectOption value="eduardo" label="Eduardo Henry" />
|
|
109
|
+
</UiSelect>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<script lang="ts" setup>
|
|
113
|
+
import { UiSelect, UiSelectOption } from '@retailcrm/embed-ui-v1-components/remote'
|
|
114
|
+
</script>
|
|
115
|
+
- title: Object options
|
|
116
|
+
code: |
|
|
117
|
+
<template>
|
|
118
|
+
<UiSelect
|
|
119
|
+
:value="{ id: 2, name: 'Eduardo Henry' }"
|
|
120
|
+
:equals-fn="(a, b) => a?.id === b?.id"
|
|
121
|
+
placeholder="User"
|
|
122
|
+
>
|
|
123
|
+
<UiSelectOption :value="{ id: 1, name: 'Kyle Simmons' }" label="Kyle Simmons" />
|
|
124
|
+
<UiSelectOption :value="{ id: 2, name: 'Eduardo Henry' }" label="Eduardo Henry" />
|
|
125
|
+
</UiSelect>
|
|
126
|
+
</template>
|
|
127
|
+
|
|
128
|
+
<script lang="ts" setup>
|
|
129
|
+
import { UiSelect, UiSelectOption } from '@retailcrm/embed-ui-v1-components/remote'
|
|
130
|
+
</script>
|
|
131
|
+
- title: Grouped options
|
|
132
|
+
code: |
|
|
133
|
+
<template>
|
|
134
|
+
<UiSelect placeholder="Employee">
|
|
135
|
+
<UiSelectOptionGroup label="Sales department">
|
|
136
|
+
<UiSelectOption value="kyle" label="Kyle Simmons" />
|
|
137
|
+
<UiSelectOption value="eduardo" label="Eduardo Henry" />
|
|
138
|
+
</UiSelectOptionGroup>
|
|
139
|
+
|
|
140
|
+
<UiSelectOptionGroup label="Support">
|
|
141
|
+
<UiSelectOption value="philip" label="Philip Williamson" />
|
|
142
|
+
</UiSelectOptionGroup>
|
|
143
|
+
</UiSelect>
|
|
144
|
+
</template>
|
|
145
|
+
|
|
146
|
+
<script lang="ts" setup>
|
|
147
|
+
import {
|
|
148
|
+
UiSelect,
|
|
149
|
+
UiSelectOption,
|
|
150
|
+
UiSelectOptionGroup,
|
|
151
|
+
} from '@retailcrm/embed-ui-v1-components/remote'
|
|
152
|
+
</script>
|
|
153
|
+
|
|
22
154
|
use_when:
|
|
23
155
|
- You need to choose one value from a list.
|
|
24
156
|
- You need multi-select behavior.
|
|
@@ -2,7 +2,6 @@ component: UiSelectOption
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiSelectOption is the base selectable child of UiSelect. It represents one option node
|
|
4
4
|
in the select option tree.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiselect--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -71,6 +70,5 @@ styling:
|
|
|
71
70
|
notes:
|
|
72
71
|
- Use documented props and slots as the primary styling API.
|
|
73
72
|
- 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
73
|
root_classes:
|
|
76
74
|
- .ui-v1-select-option
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
component: UiSelectOptionGroup
|
|
2
2
|
summary: >
|
|
3
3
|
UiSelectOptionGroup groups related UiSelectOption nodes under a shared label.
|
|
4
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiselect--docs
|
|
5
4
|
|
|
6
5
|
public_import:
|
|
7
6
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -63,6 +62,5 @@ styling:
|
|
|
63
62
|
notes:
|
|
64
63
|
- Use documented props and slots as the primary styling API.
|
|
65
64
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
66
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
67
65
|
root_classes:
|
|
68
66
|
- .ui-v1-select-option-group
|
|
@@ -2,13 +2,23 @@ component: UiSkeleton
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiSkeleton displays a placeholder block for loading content. It supports text,
|
|
4
4
|
rectangle and circle appearances with pulse or shimmer animation.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uiskeleton--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
8
|
named:
|
|
10
9
|
- UiSkeleton
|
|
11
10
|
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiSkeleton />
|
|
16
|
+
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { UiSkeleton } from '@retailcrm/embed-ui-v1-components/remote'
|
|
21
|
+
</script>
|
|
12
22
|
use_when:
|
|
13
23
|
- You need a content placeholder before actual data is loaded.
|
|
14
24
|
- You need line, card or avatar-like loading placeholders.
|
|
@@ -68,6 +78,5 @@ styling:
|
|
|
68
78
|
notes:
|
|
69
79
|
- Use documented props and slots as the primary styling API.
|
|
70
80
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
71
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
72
81
|
root_classes:
|
|
73
82
|
- .ui-v1-skeleton
|