@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,190 @@
|
|
|
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
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiCalendar
|
|
10
|
+
|
|
11
|
+
examples:
|
|
12
|
+
- title: Basic calendar
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiCalendar v-model:value="value" />
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
import { ref } from 'vue'
|
|
20
|
+
import { UiCalendar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
21
|
+
|
|
22
|
+
const value = ref<Date | null>(new Date())
|
|
23
|
+
</script>
|
|
24
|
+
- title: Date range
|
|
25
|
+
code: |
|
|
26
|
+
<template>
|
|
27
|
+
<UiCalendar v-model:value="value" type="range" />
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts" setup>
|
|
31
|
+
import { ref } from 'vue'
|
|
32
|
+
import { UiCalendar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
33
|
+
|
|
34
|
+
const value = ref<Date[]>([
|
|
35
|
+
new Date('2024-11-10'),
|
|
36
|
+
new Date('2024-11-19'),
|
|
37
|
+
])
|
|
38
|
+
</script>
|
|
39
|
+
- title: Reset value (`nullable`)
|
|
40
|
+
code: |
|
|
41
|
+
<template>
|
|
42
|
+
<UiCalendar v-model:value="value" nullable />
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script lang="ts" setup>
|
|
46
|
+
import { ref } from 'vue'
|
|
47
|
+
import { UiCalendar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
48
|
+
|
|
49
|
+
const value = ref<Date | null>(new Date())
|
|
50
|
+
</script>
|
|
51
|
+
- title: Two months at once (`appearance="double"`)
|
|
52
|
+
code: |
|
|
53
|
+
<template>
|
|
54
|
+
<UiCalendar
|
|
55
|
+
v-model:value="value"
|
|
56
|
+
type="range"
|
|
57
|
+
appearance="double"
|
|
58
|
+
/>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script lang="ts" setup>
|
|
62
|
+
import { ref } from 'vue'
|
|
63
|
+
import { UiCalendar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
64
|
+
|
|
65
|
+
const value = ref<Date[]>([
|
|
66
|
+
new Date('2024-11-10'),
|
|
67
|
+
new Date('2024-11-19'),
|
|
68
|
+
])
|
|
69
|
+
</script>
|
|
70
|
+
- title: Available date limit
|
|
71
|
+
code: |
|
|
72
|
+
<template>
|
|
73
|
+
<UiCalendar
|
|
74
|
+
v-model:value="value"
|
|
75
|
+
type="range"
|
|
76
|
+
:min-date="new Date('2024-11-05')"
|
|
77
|
+
:max-date="new Date('2024-11-25')"
|
|
78
|
+
/>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<script lang="ts" setup>
|
|
82
|
+
import { ref } from 'vue'
|
|
83
|
+
import { UiCalendar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
84
|
+
|
|
85
|
+
const value = ref<Date[]>([
|
|
86
|
+
new Date('2024-11-10'),
|
|
87
|
+
new Date('2024-11-19'),
|
|
88
|
+
])
|
|
89
|
+
</script>
|
|
90
|
+
- title: Locale and first day of week
|
|
91
|
+
code: |
|
|
92
|
+
<template>
|
|
93
|
+
<UiCalendar
|
|
94
|
+
v-model:value="value"
|
|
95
|
+
locale="en-GB"
|
|
96
|
+
:first-day-of-week="1"
|
|
97
|
+
/>
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<script lang="ts" setup>
|
|
101
|
+
import { ref } from 'vue'
|
|
102
|
+
import { UiCalendar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
103
|
+
|
|
104
|
+
const value = ref<Date | null>(new Date())
|
|
105
|
+
</script>
|
|
106
|
+
- title: Controlled value and change event
|
|
107
|
+
code: |
|
|
108
|
+
<template>
|
|
109
|
+
<UiCalendar
|
|
110
|
+
:value="value"
|
|
111
|
+
@update:value="value = $event"
|
|
112
|
+
@change="onCalendarChange"
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<script lang="ts" setup>
|
|
118
|
+
import { ref } from 'vue'
|
|
119
|
+
import { UiCalendar } from '@retailcrm/embed-ui-v1-components/remote'
|
|
120
|
+
|
|
121
|
+
const value = ref<Date | null>(new Date())
|
|
122
|
+
|
|
123
|
+
const onCalendarChange = (nextValue: Date | null) => {
|
|
124
|
+
value.value = nextValue
|
|
125
|
+
}
|
|
126
|
+
</script>
|
|
127
|
+
use_when:
|
|
128
|
+
- You need inline date selection.
|
|
129
|
+
- You need single-date or date-range picking without a textbox wrapper.
|
|
130
|
+
|
|
131
|
+
avoid_when:
|
|
132
|
+
- You need the full textbox-plus-popper date picker flow.
|
|
133
|
+
|
|
134
|
+
api:
|
|
135
|
+
key_props:
|
|
136
|
+
- name: value
|
|
137
|
+
- name: type
|
|
138
|
+
- name: appearance
|
|
139
|
+
- name: minDate
|
|
140
|
+
- name: maxDate
|
|
141
|
+
- name: locale
|
|
142
|
+
|
|
143
|
+
rendered_structure:
|
|
144
|
+
descriptive_only: true
|
|
145
|
+
root:
|
|
146
|
+
shape: div.ui-v1-calendar
|
|
147
|
+
tag: div
|
|
148
|
+
notes: The root contains header controls, weekday labels, and the date grid.
|
|
149
|
+
|
|
150
|
+
geometry:
|
|
151
|
+
layout: block-like calendar panel
|
|
152
|
+
root_display: flex
|
|
153
|
+
width_behavior: stretches to container width by default
|
|
154
|
+
|
|
155
|
+
behavior:
|
|
156
|
+
notes:
|
|
157
|
+
- Supports single and range selection.
|
|
158
|
+
- minDate and maxDate constrain selection.
|
|
159
|
+
|
|
160
|
+
ai_notes:
|
|
161
|
+
do:
|
|
162
|
+
- Use UiCalendar when inline calendar selection is the actual UI.
|
|
163
|
+
avoid:
|
|
164
|
+
- Use UiDatePicker instead if users expect textbox plus popup behavior.
|
|
165
|
+
|
|
166
|
+
composition:
|
|
167
|
+
works_well_with:
|
|
168
|
+
- UiDatePicker
|
|
169
|
+
- UiField
|
|
170
|
+
patterns:
|
|
171
|
+
- title: Inline calendar panel
|
|
172
|
+
notes: Use in dashboards or popover content when the calendar itself should remain visible.
|
|
173
|
+
- title: Date input
|
|
174
|
+
notes: Prefer UiDatePicker for normal forms and filters because it provides the textbox trigger and popper behavior.
|
|
175
|
+
|
|
176
|
+
accessibility:
|
|
177
|
+
notes:
|
|
178
|
+
- Prefer visible text labels for interactive controls.
|
|
179
|
+
- For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
|
|
180
|
+
- Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
|
|
181
|
+
keyboard:
|
|
182
|
+
- Tab moves focus to the control when it is focusable.
|
|
183
|
+
- Enter or Space activates native button-like controls when the host implementation renders a button.
|
|
184
|
+
|
|
185
|
+
styling:
|
|
186
|
+
notes:
|
|
187
|
+
- Use documented props and slots as the primary styling API.
|
|
188
|
+
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
189
|
+
root_classes:
|
|
190
|
+
- .ui-v1-calendar
|
|
@@ -2,13 +2,40 @@ component: UiCheckbox
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCheckbox is a boolean or set-membership control. It supports single boolean-like usage
|
|
4
4
|
as well as model-plus-value patterns for checkbox groups.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicheckbox--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
8
|
named:
|
|
10
9
|
- UiCheckbox
|
|
11
10
|
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiCheckbox id="notifications" v-model:model="enabled" />
|
|
16
|
+
<label for="notifications">Notifications</label>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { ref } from 'vue'
|
|
21
|
+
import { UiCheckbox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
22
|
+
|
|
23
|
+
const enabled = ref(false)
|
|
24
|
+
</script>
|
|
25
|
+
- title: Multiple selection
|
|
26
|
+
code: |
|
|
27
|
+
<template>
|
|
28
|
+
<UiCheckbox v-model:model="channels" value="email" />
|
|
29
|
+
<UiCheckbox v-model:model="channels" value="sms" />
|
|
30
|
+
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import { ref } from 'vue'
|
|
35
|
+
import { UiCheckbox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
36
|
+
|
|
37
|
+
const channels = ref<string[]>([])
|
|
38
|
+
</script>
|
|
12
39
|
use_when:
|
|
13
40
|
- You need a yes or no control.
|
|
14
41
|
- You need one value inside a checkbox group model.
|
|
@@ -80,6 +107,5 @@ styling:
|
|
|
80
107
|
notes:
|
|
81
108
|
- Use documented props and slots as the primary styling API.
|
|
82
109
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
83
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
84
110
|
root_classes:
|
|
85
111
|
- .ui-v1-checkbox
|
|
@@ -2,13 +2,69 @@ component: UiCollapse
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCollapse is a low-level show and hide container for expandable content. It controls
|
|
4
4
|
whether content is hidden or disposed and how the transition behaves.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicollapse--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
8
|
named:
|
|
10
9
|
- UiCollapse
|
|
11
10
|
|
|
11
|
+
examples:
|
|
12
|
+
- title: Basic collapse
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiCollapse :expanded="opened">
|
|
16
|
+
<div>Collapsible content</div>
|
|
17
|
+
</UiCollapse>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
import { ref } from 'vue'
|
|
22
|
+
import { UiCollapse } from '@retailcrm/embed-ui-v1-components/remote'
|
|
23
|
+
|
|
24
|
+
const opened = ref(false)
|
|
25
|
+
</script>
|
|
26
|
+
- title: Dispose collapsed content
|
|
27
|
+
code: |
|
|
28
|
+
<template>
|
|
29
|
+
<UiCollapse
|
|
30
|
+
:expanded="opened"
|
|
31
|
+
collapse-behaviour="dispose"
|
|
32
|
+
>
|
|
33
|
+
<div>Disposed content</div>
|
|
34
|
+
</UiCollapse>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script lang="ts" setup>
|
|
38
|
+
import { ref } from 'vue'
|
|
39
|
+
import { UiCollapse } from '@retailcrm/embed-ui-v1-components/remote'
|
|
40
|
+
|
|
41
|
+
const opened = ref(false)
|
|
42
|
+
</script>
|
|
43
|
+
- title: Transition events
|
|
44
|
+
code: |
|
|
45
|
+
<template>
|
|
46
|
+
<UiCollapse
|
|
47
|
+
:expanded="opened"
|
|
48
|
+
@expanded="onExpanded"
|
|
49
|
+
@collapsed="onCollapsed"
|
|
50
|
+
/>
|
|
51
|
+
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script lang="ts" setup>
|
|
55
|
+
import { ref } from 'vue'
|
|
56
|
+
import { UiCollapse } from '@retailcrm/embed-ui-v1-components/remote'
|
|
57
|
+
|
|
58
|
+
const opened = ref(false)
|
|
59
|
+
|
|
60
|
+
const onExpanded = () => {
|
|
61
|
+
console.log('Expanded')
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const onCollapsed = () => {
|
|
65
|
+
console.log('Collapsed')
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
12
68
|
use_when:
|
|
13
69
|
- You need conditional expandable content.
|
|
14
70
|
- You need to choose between hidden and disposed collapsed states.
|
|
@@ -69,6 +125,5 @@ styling:
|
|
|
69
125
|
notes:
|
|
70
126
|
- Use documented props and slots as the primary styling API.
|
|
71
127
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
72
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
73
128
|
root_classes:
|
|
74
129
|
- .ui-v1-collapse
|
|
@@ -2,7 +2,6 @@ component: UiCollapseBox
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCollapseBox is a structured expandable container with built-in header, state handling,
|
|
4
4
|
and visual treatment. It is a higher-level companion to UiCollapse.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicollapsebox--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -13,6 +12,70 @@ related_components:
|
|
|
13
12
|
- UiCollapse
|
|
14
13
|
- UiCollapseGroup
|
|
15
14
|
|
|
15
|
+
examples:
|
|
16
|
+
- title: Basic collapse box
|
|
17
|
+
code: |
|
|
18
|
+
<template>
|
|
19
|
+
<UiCollapseBox v-model:expanded="expanded">
|
|
20
|
+
<template #title>Section title</template>
|
|
21
|
+
<template #body-content>Section content</template>
|
|
22
|
+
</UiCollapseBox>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import { ref } from 'vue'
|
|
27
|
+
import { UiCollapseBox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
28
|
+
|
|
29
|
+
const expanded = ref(false)
|
|
30
|
+
</script>
|
|
31
|
+
- title: Grouped collapse boxes
|
|
32
|
+
code: |
|
|
33
|
+
<template>
|
|
34
|
+
<UiCollapseGroup v-model:activeBoxId="activeBoxId">
|
|
35
|
+
<UiCollapseBox id="one">
|
|
36
|
+
<template #title>One</template>
|
|
37
|
+
<template #body-content>...</template>
|
|
38
|
+
</UiCollapseBox>
|
|
39
|
+
|
|
40
|
+
<UiCollapseBox id="two">
|
|
41
|
+
<template #title>Two</template>
|
|
42
|
+
<template #body-content>...</template>
|
|
43
|
+
</UiCollapseBox>
|
|
44
|
+
</UiCollapseGroup>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script lang="ts" setup>
|
|
48
|
+
import { ref } from 'vue'
|
|
49
|
+
import { UiCollapseBox, UiCollapseGroup } from '@retailcrm/embed-ui-v1-components/remote'
|
|
50
|
+
|
|
51
|
+
const activeBoxId = ref('one')
|
|
52
|
+
</script>
|
|
53
|
+
- title: Disabled
|
|
54
|
+
code: |
|
|
55
|
+
<template>
|
|
56
|
+
<UiCollapseBox disabled>
|
|
57
|
+
<template #title>Disabled section</template>
|
|
58
|
+
</UiCollapseBox>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script lang="ts" setup>
|
|
62
|
+
import { UiCollapseBox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
63
|
+
</script>
|
|
64
|
+
- title: Custom icon through a slot
|
|
65
|
+
code: |
|
|
66
|
+
<template>
|
|
67
|
+
<UiCollapseBox>
|
|
68
|
+
<template #icon>
|
|
69
|
+
<MyCustomIcon />
|
|
70
|
+
</template>
|
|
71
|
+
</UiCollapseBox>
|
|
72
|
+
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<script lang="ts" setup>
|
|
76
|
+
import MyCustomIcon from '@retailcrm/embed-ui-v1-components/assets/sprites/actions/info.svg'
|
|
77
|
+
import { UiCollapseBox } from '@retailcrm/embed-ui-v1-components/remote'
|
|
78
|
+
</script>
|
|
16
79
|
use_when:
|
|
17
80
|
- You need a ready-to-use collapsible box.
|
|
18
81
|
- You need grouped expandable sections with consistent visuals.
|
|
@@ -76,6 +139,5 @@ styling:
|
|
|
76
139
|
notes:
|
|
77
140
|
- Use documented props and slots as the primary styling API.
|
|
78
141
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
79
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
80
142
|
root_classes:
|
|
81
143
|
- .ui-v1-collapse-box
|
|
@@ -2,7 +2,6 @@ component: UiCollapseGroup
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCollapseGroup coordinates several collapse boxes and tracks which box is active.
|
|
4
4
|
It is useful when multiple disclosures should behave as one grouped unit.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicollapsebox--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -62,4 +61,3 @@ styling:
|
|
|
62
61
|
notes:
|
|
63
62
|
- Use documented props and slots as the primary styling API.
|
|
64
63
|
- 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.
|
|
@@ -2,7 +2,6 @@ component: UiCopyButton
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiCopyButton is an action component for copying text values with tooltip feedback.
|
|
4
4
|
It wraps copy behavior and copied-state hinting into one compact UI.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uicopybutton--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -13,6 +12,25 @@ related_components:
|
|
|
13
12
|
- UiTooltip
|
|
14
13
|
- UiButton
|
|
15
14
|
|
|
15
|
+
examples:
|
|
16
|
+
- title: Example
|
|
17
|
+
code: |
|
|
18
|
+
<template>
|
|
19
|
+
<UiCopyButton text="Text to copy" size="sm">
|
|
20
|
+
<template #hint>
|
|
21
|
+
Copy
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<template #hint-copied>
|
|
25
|
+
Copied
|
|
26
|
+
</template>
|
|
27
|
+
</UiCopyButton>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts" setup>
|
|
31
|
+
import { UiCopyButton } from '@retailcrm/embed-ui-v1-components/remote'
|
|
32
|
+
</script>
|
|
33
|
+
|
|
16
34
|
use_when:
|
|
17
35
|
- You need a copy-to-clipboard action for a value.
|
|
18
36
|
- You need built-in hint and copied-state tooltip text.
|
|
@@ -82,6 +100,5 @@ styling:
|
|
|
82
100
|
notes:
|
|
83
101
|
- Use documented props and slots as the primary styling API.
|
|
84
102
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
85
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
86
103
|
root_classes:
|
|
87
104
|
- .ui-v1-copy-button
|
|
@@ -2,13 +2,32 @@ component: UiDate
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiDate is a display component for formatted date or date-time output. It is for presenting
|
|
4
4
|
date values, not for editing them.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uidate--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
8
|
named:
|
|
10
9
|
- UiDate
|
|
11
10
|
|
|
11
|
+
examples:
|
|
12
|
+
- title: Standard usage
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiDate :date="new Date()" locale="en-GB" />
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { UiDate } from '@retailcrm/embed-ui-v1-components/remote'
|
|
20
|
+
</script>
|
|
21
|
+
- title: With time display
|
|
22
|
+
code: |
|
|
23
|
+
<template>
|
|
24
|
+
<UiDate :date="new Date()" locale="en-GB" with-time />
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { UiDate } from '@retailcrm/embed-ui-v1-components/remote'
|
|
29
|
+
</script>
|
|
30
|
+
|
|
12
31
|
use_when:
|
|
13
32
|
- You need to display a date value.
|
|
14
33
|
- You need optional time display with locale-aware formatting.
|
|
@@ -63,4 +82,3 @@ styling:
|
|
|
63
82
|
notes:
|
|
64
83
|
- Use documented props and slots as the primary styling API.
|
|
65
84
|
- 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.
|
|
@@ -2,7 +2,6 @@ component: UiDatePicker
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiDatePicker combines textbox-like date display, popper behavior, and calendar selection.
|
|
4
4
|
It supports single-date and range flows, constraints, and quick options.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uidatepicker--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -14,6 +13,57 @@ related_components:
|
|
|
14
13
|
- UiTextbox
|
|
15
14
|
- UiPopper
|
|
16
15
|
|
|
16
|
+
examples:
|
|
17
|
+
- title: Example
|
|
18
|
+
code: |
|
|
19
|
+
<template>
|
|
20
|
+
<UiDatePicker v-model:value="value" />
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import { ref } from 'vue'
|
|
25
|
+
import { UiDatePicker } from '@retailcrm/embed-ui-v1-components/remote'
|
|
26
|
+
|
|
27
|
+
const value = ref<Date | null>(new Date())
|
|
28
|
+
</script>
|
|
29
|
+
- title: Range selection
|
|
30
|
+
code: |
|
|
31
|
+
<template>
|
|
32
|
+
<UiDatePicker
|
|
33
|
+
v-model:value="value"
|
|
34
|
+
type="range"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts" setup>
|
|
39
|
+
import { ref } from 'vue'
|
|
40
|
+
import { UiDatePicker } from '@retailcrm/embed-ui-v1-components/remote'
|
|
41
|
+
|
|
42
|
+
const value = ref<Date[]>([
|
|
43
|
+
new Date('2024-11-10'),
|
|
44
|
+
new Date('2024-11-19'),
|
|
45
|
+
])
|
|
46
|
+
</script>
|
|
47
|
+
- title: Quick presets (`quickOptions`)
|
|
48
|
+
code: |
|
|
49
|
+
<template>
|
|
50
|
+
<UiDatePicker
|
|
51
|
+
v-model:value="value"
|
|
52
|
+
synchronization="confirmed"
|
|
53
|
+
:quick-options="[
|
|
54
|
+
{ label: 'Today', value: new Date() },
|
|
55
|
+
{ label: 'This week', value: [new Date('2024-11-18'), new Date('2024-11-24')] },
|
|
56
|
+
]"
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script lang="ts" setup>
|
|
62
|
+
import { ref } from 'vue'
|
|
63
|
+
import { UiDatePicker } from '@retailcrm/embed-ui-v1-components/remote'
|
|
64
|
+
|
|
65
|
+
const value = ref<Date | null>(new Date())
|
|
66
|
+
</script>
|
|
17
67
|
use_when:
|
|
18
68
|
- You need editable date input.
|
|
19
69
|
- You need date-range selection through a textbox-plus-popup flow.
|
|
@@ -84,6 +134,5 @@ styling:
|
|
|
84
134
|
notes:
|
|
85
135
|
- Use documented props and slots as the primary styling API.
|
|
86
136
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
87
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
88
137
|
root_classes:
|
|
89
138
|
- .ui-v1-date-picker
|
|
@@ -2,13 +2,60 @@ component: UiError
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiError is a compact error-state component for short error messages or fallback states.
|
|
4
4
|
It is intended for concise inline error display rather than large alert copy.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uierror--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
8
|
named:
|
|
10
9
|
- UiError
|
|
11
10
|
|
|
11
|
+
examples:
|
|
12
|
+
- title: Example
|
|
13
|
+
code: |
|
|
14
|
+
<template>
|
|
15
|
+
<UiError v-bind="$attrs" :class="$style['container']">
|
|
16
|
+
<template v-if="useSlot">
|
|
17
|
+
<div :class="$style['content']">
|
|
18
|
+
<IconError :class="$style['icon']" />
|
|
19
|
+
Error message with icon
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
</UiError>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import { UiError } from '@retailcrm/embed-ui-v1-components/remote'
|
|
27
|
+
|
|
28
|
+
import IconError from '@retailcrm/embed-ui-v1-components/assets/sprites/alerts/error.svg'
|
|
29
|
+
|
|
30
|
+
defineProps({
|
|
31
|
+
useSlot: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="less" module>
|
|
39
|
+
|
|
40
|
+
.container {
|
|
41
|
+
padding: 8px;
|
|
42
|
+
background: #FFF;
|
|
43
|
+
border: 1px solid #dee2e6;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.content {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 4px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.icon {
|
|
54
|
+
width: 16px;
|
|
55
|
+
height: 16px;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
58
|
+
|
|
12
59
|
use_when:
|
|
13
60
|
- You need a compact error block.
|
|
14
61
|
- You need inline error text with standard styling.
|
|
@@ -72,6 +119,5 @@ styling:
|
|
|
72
119
|
notes:
|
|
73
120
|
- Use documented props and slots as the primary styling API.
|
|
74
121
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
75
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
76
122
|
root_classes:
|
|
77
123
|
- .ui-v1-error
|