@retailcrm/embed-ui-v1-components 0.9.21 → 0.9.22-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,622 @@
|
|
|
1
|
+
component: UiTable
|
|
2
|
+
summary: >
|
|
3
|
+
UiTable is the main data table component. It supports row rendering, grouping, expandable rows,
|
|
4
|
+
footer areas, and row-level interactions.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTable
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiAvatar
|
|
13
|
+
- UiCheckbox
|
|
14
|
+
- UiLink
|
|
15
|
+
- UiTableColumn
|
|
16
|
+
- UiTableFooterButton
|
|
17
|
+
- UiTableFooterSection
|
|
18
|
+
- UiTableSorter
|
|
19
|
+
- UiTag
|
|
20
|
+
|
|
21
|
+
examples:
|
|
22
|
+
- title: Basic table
|
|
23
|
+
notes:
|
|
24
|
+
- Use as the default bordered table composition with explicit UiTableColumn children.
|
|
25
|
+
code: |
|
|
26
|
+
<template>
|
|
27
|
+
<UiTable
|
|
28
|
+
bordered
|
|
29
|
+
:rows="rows"
|
|
30
|
+
row-key="id"
|
|
31
|
+
>
|
|
32
|
+
<UiTableColumn label="Title">
|
|
33
|
+
<template #cell="{ row }">
|
|
34
|
+
<strong>{{ row.title }}</strong>
|
|
35
|
+
</template>
|
|
36
|
+
</UiTableColumn>
|
|
37
|
+
|
|
38
|
+
<UiTableColumn label="Customer" width="180">
|
|
39
|
+
<template #cell="{ row }">
|
|
40
|
+
{{ row.customer }}
|
|
41
|
+
</template>
|
|
42
|
+
</UiTableColumn>
|
|
43
|
+
|
|
44
|
+
<UiTableColumn label="Status" width="160">
|
|
45
|
+
<template #cell="{ row }">
|
|
46
|
+
<UiTag :background="statusBackgroundByName[row.status]" size="md" saturated :ticker="false">
|
|
47
|
+
{{ row.status }}
|
|
48
|
+
</UiTag>
|
|
49
|
+
</template>
|
|
50
|
+
</UiTableColumn>
|
|
51
|
+
</UiTable>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script lang="ts" setup>
|
|
55
|
+
import { UiTable, UiTableColumn, UiTag } from '@retailcrm/embed-ui-v1-components/remote'
|
|
56
|
+
|
|
57
|
+
const rows = [
|
|
58
|
+
{ id: 101, title: 'Spring campaign', customer: 'Anna Smith', status: 'Scheduled' },
|
|
59
|
+
{ id: 102, title: 'Accessories discount', customer: 'Ilya Johnson', status: 'Sent' },
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
const statusBackgroundByName = {
|
|
63
|
+
Scheduled: '#005EEB',
|
|
64
|
+
Sent: '#1FA971',
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
- title: Expandable rows table
|
|
68
|
+
notes:
|
|
69
|
+
- Use the expand slot and cell toggle helper for expandable row details.
|
|
70
|
+
code: |
|
|
71
|
+
<template>
|
|
72
|
+
<UiTable
|
|
73
|
+
bordered
|
|
74
|
+
:rows="rows"
|
|
75
|
+
row-key="id"
|
|
76
|
+
>
|
|
77
|
+
<UiTableColumn :width="44" label="" trim>
|
|
78
|
+
<template #cell="{ expanded, toggle }">
|
|
79
|
+
<button class="table-expand" type="button" @click="toggle">
|
|
80
|
+
{{ expanded ? '-' : '+' }}
|
|
81
|
+
</button>
|
|
82
|
+
</template>
|
|
83
|
+
</UiTableColumn>
|
|
84
|
+
|
|
85
|
+
<UiTableColumn label="Title">
|
|
86
|
+
<template #cell="{ row }">
|
|
87
|
+
{{ row.title }}
|
|
88
|
+
</template>
|
|
89
|
+
</UiTableColumn>
|
|
90
|
+
|
|
91
|
+
<template #expand="{ row }">
|
|
92
|
+
<div class="table-expand-content">
|
|
93
|
+
<strong>Details</strong>
|
|
94
|
+
<div>{{ row.description }}</div>
|
|
95
|
+
<div>Contact: {{ row.phone }}</div>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
</UiTable>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<script lang="ts" setup>
|
|
102
|
+
import { UiTable, UiTableColumn } from '@retailcrm/embed-ui-v1-components/remote'
|
|
103
|
+
|
|
104
|
+
const rows = [
|
|
105
|
+
{
|
|
106
|
+
id: 101,
|
|
107
|
+
title: 'Spring campaign',
|
|
108
|
+
description: 'Segment: loyal customers. Channel: SMS + email.',
|
|
109
|
+
phone: '+7 (999) 123-45-67',
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
</script>
|
|
113
|
+
- title: Grouped rows table
|
|
114
|
+
notes:
|
|
115
|
+
- Use groupBy with group-head when rows need semantic grouping.
|
|
116
|
+
code: |
|
|
117
|
+
<template>
|
|
118
|
+
<UiTable
|
|
119
|
+
bordered
|
|
120
|
+
:rows="rows"
|
|
121
|
+
row-key="id"
|
|
122
|
+
:group-by="groupByStatus"
|
|
123
|
+
>
|
|
124
|
+
<UiTableColumn label="Title">
|
|
125
|
+
<template #cell="{ row }">
|
|
126
|
+
{{ row.title }}
|
|
127
|
+
</template>
|
|
128
|
+
</UiTableColumn>
|
|
129
|
+
|
|
130
|
+
<UiTableColumn label="Status" width="160">
|
|
131
|
+
<template #cell="{ row }">
|
|
132
|
+
{{ row.status }}
|
|
133
|
+
</template>
|
|
134
|
+
</UiTableColumn>
|
|
135
|
+
|
|
136
|
+
<template #group-head="{ group }">
|
|
137
|
+
<span>{{ group.data.title }}</span>
|
|
138
|
+
</template>
|
|
139
|
+
</UiTable>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<script lang="ts" setup>
|
|
143
|
+
import type { Group } from '@retailcrm/embed-ui-v1-components/remote'
|
|
144
|
+
import { UiTable, UiTableColumn } from '@retailcrm/embed-ui-v1-components/remote'
|
|
145
|
+
|
|
146
|
+
type Row = {
|
|
147
|
+
id: number
|
|
148
|
+
title: string
|
|
149
|
+
status: string
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const rows: Row[] = [
|
|
153
|
+
{ id: 101, title: 'Spring campaign', status: 'Scheduled' },
|
|
154
|
+
{ id: 102, title: 'Accessories discount', status: 'Sent' },
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
const groupByStatus = (items: readonly Row[]): Group<Row, { title: string }>[] => {
|
|
158
|
+
return ['Scheduled', 'Sent']
|
|
159
|
+
.map((status) => ({
|
|
160
|
+
key: status,
|
|
161
|
+
data: { title: status },
|
|
162
|
+
rows: items.filter((row) => row.status === status),
|
|
163
|
+
}))
|
|
164
|
+
.filter((group) => group.rows.length > 0)
|
|
165
|
+
}
|
|
166
|
+
</script>
|
|
167
|
+
- title: Entity list table footer
|
|
168
|
+
notes:
|
|
169
|
+
- Use structured footer slots with UiTableFooterSection and UiTableFooterButton for page-size and pagination controls.
|
|
170
|
+
- Keep footer styling scoped to a local table root class.
|
|
171
|
+
code: |
|
|
172
|
+
<template>
|
|
173
|
+
<UiTable
|
|
174
|
+
class="entity-list-table"
|
|
175
|
+
bordered
|
|
176
|
+
:rows="rows"
|
|
177
|
+
row-key="id"
|
|
178
|
+
>
|
|
179
|
+
<UiTableColumn label="Title">
|
|
180
|
+
<template #cell="{ row }">
|
|
181
|
+
{{ row.title }}
|
|
182
|
+
</template>
|
|
183
|
+
</UiTableColumn>
|
|
184
|
+
|
|
185
|
+
<template #footer-summary="{ rowsCount }">
|
|
186
|
+
<span>{{ rowsCount }} items</span>
|
|
187
|
+
</template>
|
|
188
|
+
|
|
189
|
+
<template #footer-page-size>
|
|
190
|
+
<UiTableFooterSection class="entity-list-table__page-size">
|
|
191
|
+
<span class="entity-list-table__footer-caption">Show:</span>
|
|
192
|
+
<UiTableFooterButton class="entity-list-table__footer-button entity-list-table__footer-button_passive">
|
|
193
|
+
20 per page
|
|
194
|
+
</UiTableFooterButton>
|
|
195
|
+
<span class="entity-list-table__footer-delimiter">/</span>
|
|
196
|
+
<UiTableFooterButton class="entity-list-table__footer-button">
|
|
197
|
+
50 per page
|
|
198
|
+
</UiTableFooterButton>
|
|
199
|
+
<span class="entity-list-table__footer-delimiter">/</span>
|
|
200
|
+
<UiTableFooterButton class="entity-list-table__footer-button">
|
|
201
|
+
100 per page
|
|
202
|
+
</UiTableFooterButton>
|
|
203
|
+
</UiTableFooterSection>
|
|
204
|
+
</template>
|
|
205
|
+
|
|
206
|
+
<template #footer-pagination>
|
|
207
|
+
<UiTableFooterSection class="entity-list-table__pagination-section">
|
|
208
|
+
<div class="entity-list-table__pagination">
|
|
209
|
+
<UiTableFooterButton class="entity-list-table__pagination-button">
|
|
210
|
+
1
|
|
211
|
+
</UiTableFooterButton>
|
|
212
|
+
<UiTableFooterButton class="entity-list-table__pagination-button">
|
|
213
|
+
2
|
|
214
|
+
</UiTableFooterButton>
|
|
215
|
+
<UiTableFooterButton class="entity-list-table__pagination-button entity-list-table__pagination-button_current">
|
|
216
|
+
3
|
|
217
|
+
</UiTableFooterButton>
|
|
218
|
+
<span class="entity-list-table__pagination-divider" />
|
|
219
|
+
<UiTableFooterButton
|
|
220
|
+
aria-label="Previous page"
|
|
221
|
+
class="entity-list-table__pagination-arrow"
|
|
222
|
+
>
|
|
223
|
+
<IconChevronLeft
|
|
224
|
+
aria-hidden="true"
|
|
225
|
+
class="entity-list-table__pagination-arrow-icon"
|
|
226
|
+
/>
|
|
227
|
+
</UiTableFooterButton>
|
|
228
|
+
<span class="entity-list-table__pagination-divider" />
|
|
229
|
+
<UiTableFooterButton
|
|
230
|
+
aria-label="Next page"
|
|
231
|
+
class="entity-list-table__pagination-arrow"
|
|
232
|
+
>
|
|
233
|
+
<IconChevronRight
|
|
234
|
+
aria-hidden="true"
|
|
235
|
+
class="entity-list-table__pagination-arrow-icon"
|
|
236
|
+
/>
|
|
237
|
+
</UiTableFooterButton>
|
|
238
|
+
</div>
|
|
239
|
+
</UiTableFooterSection>
|
|
240
|
+
</template>
|
|
241
|
+
</UiTable>
|
|
242
|
+
</template>
|
|
243
|
+
|
|
244
|
+
<script lang="ts" setup>
|
|
245
|
+
import IconChevronLeft from '@retailcrm/embed-ui-v1-components/assets/sprites/arrows/chevron-left.svg'
|
|
246
|
+
import IconChevronRight from '@retailcrm/embed-ui-v1-components/assets/sprites/arrows/chevron-right.svg'
|
|
247
|
+
import {
|
|
248
|
+
UiTable,
|
|
249
|
+
UiTableColumn,
|
|
250
|
+
UiTableFooterButton,
|
|
251
|
+
UiTableFooterSection,
|
|
252
|
+
} from '@retailcrm/embed-ui-v1-components/remote'
|
|
253
|
+
|
|
254
|
+
const rows = [
|
|
255
|
+
{ id: 101, title: 'Spring campaign' },
|
|
256
|
+
{ id: 102, title: 'Accessories discount' },
|
|
257
|
+
]
|
|
258
|
+
</script>
|
|
259
|
+
|
|
260
|
+
<style scoped>
|
|
261
|
+
.entity-list-table {
|
|
262
|
+
--ui-v1-table-cell-padding-x: 12px;
|
|
263
|
+
--ui-v1-table-cell-padding-y: 12px;
|
|
264
|
+
--ui-v1-table-padding-start: 16px;
|
|
265
|
+
--ui-v1-table-padding-end: 16px;
|
|
266
|
+
--ui-v1-table-rounding: 4px;
|
|
267
|
+
--ui-v1-table-head-cell-padding-block-start: 14px;
|
|
268
|
+
--ui-v1-table-head-cell-padding-block-end: 14px;
|
|
269
|
+
--ui-v1-table-body-cell-padding-block-start: 15px;
|
|
270
|
+
--ui-v1-table-body-cell-padding-block-end: 15px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.entity-list-table .ui-v1-table__head-cell {
|
|
274
|
+
height: 42px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.entity-list-table .ui-v1-table__footer-meta {
|
|
278
|
+
min-height: 40px;
|
|
279
|
+
font-weight: 400;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.entity-list-table .ui-v1-table__footer-controls {
|
|
283
|
+
min-height: 52px;
|
|
284
|
+
background: #f9fafb;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.entity-list-table .ui-v1-table__footer-section {
|
|
288
|
+
font-size: 14px;
|
|
289
|
+
line-height: 20px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.entity-list-table__page-size,
|
|
293
|
+
.entity-list-table__pagination-section {
|
|
294
|
+
color: #1e2248;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.entity-list-table__footer-caption {
|
|
298
|
+
display: inline-block;
|
|
299
|
+
margin-right: 4px;
|
|
300
|
+
vertical-align: baseline;
|
|
301
|
+
line-height: inherit;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.entity-list-table__footer-button {
|
|
305
|
+
color: #005eeb;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.entity-list-table__footer-button_passive {
|
|
309
|
+
color: #1e2248;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.entity-list-table__footer-delimiter {
|
|
313
|
+
display: inline-block;
|
|
314
|
+
padding: 0 5px;
|
|
315
|
+
color: #8a96a6;
|
|
316
|
+
vertical-align: baseline;
|
|
317
|
+
line-height: inherit;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.entity-list-table .ui-v1-table__footer-side > .entity-list-table__pagination-section {
|
|
321
|
+
padding-block: 8px;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.entity-list-table__pagination {
|
|
325
|
+
display: flex;
|
|
326
|
+
align-items: center;
|
|
327
|
+
gap: 8px;
|
|
328
|
+
height: 36px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.entity-list-table__pagination-button,
|
|
332
|
+
.entity-list-table__pagination-arrow {
|
|
333
|
+
width: 36px;
|
|
334
|
+
height: 36px;
|
|
335
|
+
border-radius: 4px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.entity-list-table .ui-v1-table__footer-button.entity-list-table__pagination-button {
|
|
339
|
+
color: #1e2248;
|
|
340
|
+
font-size: 14px;
|
|
341
|
+
line-height: 20px;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.entity-list-table .ui-v1-table__footer-button.entity-list-table__pagination-button_current {
|
|
345
|
+
color: #fff;
|
|
346
|
+
background: #005eeb;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.entity-list-table .ui-v1-table__footer-button.entity-list-table__pagination-arrow {
|
|
350
|
+
color: #afb9c3;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.entity-list-table__pagination-arrow-icon {
|
|
354
|
+
display: block;
|
|
355
|
+
width: 24px;
|
|
356
|
+
height: 24px;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.entity-list-table__pagination-divider {
|
|
360
|
+
width: 1px;
|
|
361
|
+
height: 52px;
|
|
362
|
+
margin-block: -8px;
|
|
363
|
+
background: #dee2e6;
|
|
364
|
+
}
|
|
365
|
+
</style>
|
|
366
|
+
|
|
367
|
+
- title: Dense table
|
|
368
|
+
notes:
|
|
369
|
+
- Use CSS variables on the table root to create a denser table layout.
|
|
370
|
+
code: |
|
|
371
|
+
<template>
|
|
372
|
+
<UiTable
|
|
373
|
+
class="campaign-table campaign-table_dense"
|
|
374
|
+
bordered
|
|
375
|
+
:rows="rows"
|
|
376
|
+
row-key="id"
|
|
377
|
+
>
|
|
378
|
+
<UiTableColumn label="Title">
|
|
379
|
+
<template #cell="{ row }">
|
|
380
|
+
{{ row.title }}
|
|
381
|
+
</template>
|
|
382
|
+
</UiTableColumn>
|
|
383
|
+
|
|
384
|
+
<UiTableColumn label="Status" width="160">
|
|
385
|
+
<template #cell="{ row }">
|
|
386
|
+
{{ row.status }}
|
|
387
|
+
</template>
|
|
388
|
+
</UiTableColumn>
|
|
389
|
+
</UiTable>
|
|
390
|
+
</template>
|
|
391
|
+
|
|
392
|
+
<script lang="ts" setup>
|
|
393
|
+
import { UiTable, UiTableColumn } from '@retailcrm/embed-ui-v1-components/remote'
|
|
394
|
+
|
|
395
|
+
const rows = [
|
|
396
|
+
{ id: 101, title: 'Spring campaign', status: 'Scheduled' },
|
|
397
|
+
{ id: 102, title: 'Accessories discount', status: 'Sent' },
|
|
398
|
+
]
|
|
399
|
+
</script>
|
|
400
|
+
|
|
401
|
+
<style lang="less">
|
|
402
|
+
.campaign-table_dense {
|
|
403
|
+
--ui-v1-table-cell-padding-x: 8px;
|
|
404
|
+
--ui-v1-table-cell-padding-y: 8px;
|
|
405
|
+
--ui-v1-table-padding-start: 8px;
|
|
406
|
+
--ui-v1-table-padding-end: 8px;
|
|
407
|
+
--ui-v1-table-head-cell-padding-block-start: 8px;
|
|
408
|
+
--ui-v1-table-head-cell-padding-block-end: 8px;
|
|
409
|
+
--ui-v1-table-body-cell-padding-block-start: 8px;
|
|
410
|
+
--ui-v1-table-body-cell-padding-block-end: 8px;
|
|
411
|
+
--ui-v1-table-group-head-padding-block-start: 4px;
|
|
412
|
+
--ui-v1-table-group-head-padding-block-end: 4px;
|
|
413
|
+
--ui-v1-table-head-background: #f4f6f8;
|
|
414
|
+
--ui-v1-table-group-head-background: #f7f9fb;
|
|
415
|
+
}
|
|
416
|
+
</style>
|
|
417
|
+
|
|
418
|
+
use_when:
|
|
419
|
+
- You need structured tabular data.
|
|
420
|
+
- You need group headers, expandable rows, or footer sections.
|
|
421
|
+
|
|
422
|
+
avoid_when:
|
|
423
|
+
- You need a simple list or card layout.
|
|
424
|
+
|
|
425
|
+
api:
|
|
426
|
+
key_props:
|
|
427
|
+
- name: rows
|
|
428
|
+
- name: rowKey
|
|
429
|
+
- name: headless
|
|
430
|
+
- name: bordered
|
|
431
|
+
- name: fixed
|
|
432
|
+
- name: groupBy
|
|
433
|
+
slots:
|
|
434
|
+
- name: default
|
|
435
|
+
zone: columns
|
|
436
|
+
creates: Column declarations.
|
|
437
|
+
- name: expand
|
|
438
|
+
zone: expanded-row
|
|
439
|
+
creates: Expanded row content.
|
|
440
|
+
- name: footer
|
|
441
|
+
zone: footer
|
|
442
|
+
creates: Full footer area.
|
|
443
|
+
- name: footer-summary
|
|
444
|
+
zone: structured-footer
|
|
445
|
+
creates: Summary or selected-count area above table footer controls.
|
|
446
|
+
- name: footer-page-size
|
|
447
|
+
zone: structured-footer
|
|
448
|
+
creates: Page-size controls in the footer control row.
|
|
449
|
+
- name: footer-export
|
|
450
|
+
zone: structured-footer
|
|
451
|
+
creates: Export controls in the footer control row.
|
|
452
|
+
- name: footer-pagination
|
|
453
|
+
zone: structured-footer
|
|
454
|
+
creates: Pagination controls in the footer control row.
|
|
455
|
+
- name: group-head
|
|
456
|
+
zone: group-head
|
|
457
|
+
creates: Group heading content.
|
|
458
|
+
- name: empty
|
|
459
|
+
zone: empty-state
|
|
460
|
+
creates: Empty-state content.
|
|
461
|
+
emits:
|
|
462
|
+
- name: row:click
|
|
463
|
+
methods:
|
|
464
|
+
- name: resetExpanded
|
|
465
|
+
- name: expand
|
|
466
|
+
- name: collapse
|
|
467
|
+
- name: toggle
|
|
468
|
+
|
|
469
|
+
rendered_structure:
|
|
470
|
+
descriptive_only: true
|
|
471
|
+
root:
|
|
472
|
+
shape: table.ui-v1-table
|
|
473
|
+
tag: table
|
|
474
|
+
zones:
|
|
475
|
+
- .ui-v1-table__section_head
|
|
476
|
+
- .ui-v1-table__section_body
|
|
477
|
+
- .ui-v1-table__section_foot
|
|
478
|
+
- .ui-v1-table__row
|
|
479
|
+
- .ui-v1-table__head-cell
|
|
480
|
+
- .ui-v1-table__body-cell
|
|
481
|
+
notes: >
|
|
482
|
+
Table layout is distributed across head, body, foot, and cell-level classes. Treat this as a
|
|
483
|
+
reasoning model for geometry and spacing, not as a stable selector contract.
|
|
484
|
+
|
|
485
|
+
geometry:
|
|
486
|
+
layout: block-width table
|
|
487
|
+
root_display: table
|
|
488
|
+
width: 100%
|
|
489
|
+
width_behavior: stretches to container width by default
|
|
490
|
+
notes:
|
|
491
|
+
- Root fills available width.
|
|
492
|
+
- fixed=true switches table-layout from auto to fixed.
|
|
493
|
+
- bordered=true adds border and corner rounding through CSS variables.
|
|
494
|
+
- Filters and search controls should usually be placed above the table, not in the table root.
|
|
495
|
+
- Table-scoped pagination belongs in footer slots when custom controls are needed.
|
|
496
|
+
|
|
497
|
+
styling:
|
|
498
|
+
notes:
|
|
499
|
+
- UiTable exposes a relatively rich CSS-variable surface for spacing and table chrome.
|
|
500
|
+
- Prefer table props and slot composition first, then CSS variables for spacing or background tuning.
|
|
501
|
+
- Internal classes are descriptive and mainly useful for debugging or narrow local integration.
|
|
502
|
+
- For reference-style footers, add a local class to UiTable and scope footer styles through that class.
|
|
503
|
+
- When styling footer pagination buttons, combine the internal footer button class with the local state class so base footer styles do not override page, active, or arrow colors.
|
|
504
|
+
root_classes:
|
|
505
|
+
- .ui-v1-table
|
|
506
|
+
state_classes:
|
|
507
|
+
- .ui-v1-table_fixed
|
|
508
|
+
- .ui-v1-table_bordered
|
|
509
|
+
- .ui-v1-table__head-cell_align-center
|
|
510
|
+
- .ui-v1-table__head-cell_align-right
|
|
511
|
+
- .ui-v1-table__body-cell_align-center
|
|
512
|
+
- .ui-v1-table__body-cell_align-right
|
|
513
|
+
- .ui-v1-table__body-cell_valign-top
|
|
514
|
+
- .ui-v1-table__body-cell_valign-bottom
|
|
515
|
+
- .ui-v1-table__body-cell_theme-group
|
|
516
|
+
- .ui-v1-table__body-cell_trim
|
|
517
|
+
- .ui-v1-table__head-cell_trim
|
|
518
|
+
zones:
|
|
519
|
+
- .ui-v1-table__head-cell
|
|
520
|
+
- .ui-v1-table__body-cell
|
|
521
|
+
- .ui-v1-table__footer-cell
|
|
522
|
+
css_variables:
|
|
523
|
+
public_theme_variables:
|
|
524
|
+
- name: --ui-v1-table-border-width
|
|
525
|
+
effect: Outer border width in bordered mode.
|
|
526
|
+
- name: --ui-v1-table-rounding
|
|
527
|
+
effect: Shared corner rounding.
|
|
528
|
+
- name: --ui-v1-table-cell-padding-x
|
|
529
|
+
effect: Base inline cell padding.
|
|
530
|
+
- name: --ui-v1-table-cell-padding-y
|
|
531
|
+
effect: Base block cell padding.
|
|
532
|
+
- name: --ui-v1-table-head-background
|
|
533
|
+
effect: Header row background.
|
|
534
|
+
- name: --ui-v1-table-group-head-background
|
|
535
|
+
effect: Group heading row background.
|
|
536
|
+
- name: --ui-v1-table-padding-start
|
|
537
|
+
effect: Effective first-column start padding.
|
|
538
|
+
- name: --ui-v1-table-padding-end
|
|
539
|
+
effect: Effective last-column end padding.
|
|
540
|
+
internal_layout_variables:
|
|
541
|
+
- name: --ui-v1-table-effective-padding-start
|
|
542
|
+
effect: Start padding after bordered adjustments.
|
|
543
|
+
- name: --ui-v1-table-effective-padding-end
|
|
544
|
+
effect: End padding after bordered adjustments.
|
|
545
|
+
- name: --ui-v1-table-head-cell-padding-block-start
|
|
546
|
+
effect: Header top padding.
|
|
547
|
+
- name: --ui-v1-table-head-cell-padding-block-end
|
|
548
|
+
effect: Header bottom padding.
|
|
549
|
+
- name: --ui-v1-table-body-cell-padding-block-start
|
|
550
|
+
effect: Body top padding.
|
|
551
|
+
- name: --ui-v1-table-body-cell-padding-block-end
|
|
552
|
+
effect: Body bottom padding.
|
|
553
|
+
- name: --ui-v1-table-group-head-padding-block-start
|
|
554
|
+
effect: Group row top padding.
|
|
555
|
+
- name: --ui-v1-table-group-head-padding-block-end
|
|
556
|
+
effect: Group row bottom padding.
|
|
557
|
+
typography:
|
|
558
|
+
default:
|
|
559
|
+
mixin: text-small
|
|
560
|
+
size: 14px
|
|
561
|
+
line_height: 20px
|
|
562
|
+
weight: 400
|
|
563
|
+
head_cells:
|
|
564
|
+
mixin: text-tiny-accent
|
|
565
|
+
size: 12px
|
|
566
|
+
line_height: 14px
|
|
567
|
+
weight: 500
|
|
568
|
+
group_rows:
|
|
569
|
+
mixin: text-tiny
|
|
570
|
+
size: 12px
|
|
571
|
+
line_height: 14px
|
|
572
|
+
weight: 400
|
|
573
|
+
|
|
574
|
+
composition:
|
|
575
|
+
filters:
|
|
576
|
+
notes:
|
|
577
|
+
- Keep filter controls directly above UiTable so the relationship between filters and rows is obvious.
|
|
578
|
+
- Use UiTextbox for text search and UiSelect or compact toggle controls for finite filters.
|
|
579
|
+
- Persist filter values in URL query parameters when routing is available.
|
|
580
|
+
sorting:
|
|
581
|
+
notes:
|
|
582
|
+
- Use UiTableSorter inside a UiTableColumn label slot for sortable columns.
|
|
583
|
+
- Reset pagination to the first page when sorting changes.
|
|
584
|
+
- Persist sort key and direction in URL query parameters when routing is available.
|
|
585
|
+
pagination:
|
|
586
|
+
notes:
|
|
587
|
+
- Use footer-summary, footer-page-size, footer-export, and footer-pagination slots for structured footer controls.
|
|
588
|
+
- footer-pagination should use UiTableFooterSection as the root wrapper.
|
|
589
|
+
- Use UiTableFooterButton for page numbers and previous/next arrow controls.
|
|
590
|
+
- Do not use regular UiButton for table footer pagination.
|
|
591
|
+
- Use a local inner flex group for page buttons, dividers, and arrow buttons when recreating the reference-table footer pattern.
|
|
592
|
+
- Use chevron icon assets for previous/next arrows instead of text glyphs such as < or >.
|
|
593
|
+
- Add scoped CSS for footer meta height, control-row background, pagination button size, active page state, arrow icon size, and vertical dividers.
|
|
594
|
+
- Persist page and page size in URL query parameters when routing is available.
|
|
595
|
+
- Reset page to 1 when filters or sorting change.
|
|
596
|
+
|
|
597
|
+
ai_notes:
|
|
598
|
+
do:
|
|
599
|
+
- Read ../../AI.md table-screen rules before generating complete table screens.
|
|
600
|
+
- Provide row-key for stable row identity.
|
|
601
|
+
- Put table filters above the table.
|
|
602
|
+
- Use structured footer slots for summary, page-size controls, export, and pagination.
|
|
603
|
+
- Compose footer controls with UiTableFooterSection and UiTableFooterButton.
|
|
604
|
+
- Copy the Entity list table footer example when building a realistic entity-list footer.
|
|
605
|
+
- Use UiTableSorter for sortable headers.
|
|
606
|
+
avoid:
|
|
607
|
+
- Do not hide table filters in page header actions.
|
|
608
|
+
- Do not use UiButton inside table footer pagination.
|
|
609
|
+
- Do not put pagination only in local state when the screen has routable result sets.
|
|
610
|
+
- Do not import table internals from host or src paths.
|
|
611
|
+
|
|
612
|
+
behavior:
|
|
613
|
+
notes:
|
|
614
|
+
- Read key_props first to identify supported states and variants.
|
|
615
|
+
- Prefer controlled props and documented emits when synchronizing component state with screen logic.
|
|
616
|
+
|
|
617
|
+
accessibility:
|
|
618
|
+
notes:
|
|
619
|
+
- Use meaningful column labels so screen-reader users can understand each cell in context.
|
|
620
|
+
- Use stable row keys so expanded rows and row-level state remain attached to the correct data item.
|
|
621
|
+
- Put interactive controls inside cells as real controls such as UiLink or UiButton, not plain clickable text.
|
|
622
|
+
- When rows are clickable, keep the primary row action visible as a link or button as well.
|
|
@@ -2,7 +2,6 @@ component: UiTableBodyCell
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiTableBodyCell is the low-level body cell primitive used inside UiTable rows.
|
|
4
4
|
Use it only for custom table layouts built from public table parts.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uitable--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -70,6 +69,5 @@ styling:
|
|
|
70
69
|
notes:
|
|
71
70
|
- Use documented props and slots as the primary styling API.
|
|
72
71
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
73
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
74
72
|
root_classes:
|
|
75
73
|
- .ui-v1-table
|
|
@@ -2,7 +2,6 @@ component: UiTableColumn
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiTableColumn declares one logical column inside UiTable. It carries label and sizing metadata
|
|
4
4
|
and defines how header labels and cells render.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uitable--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -86,4 +85,3 @@ styling:
|
|
|
86
85
|
notes:
|
|
87
86
|
- Use documented props and slots as the primary styling API.
|
|
88
87
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
89
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
@@ -2,7 +2,6 @@ component: UiTableFooterButton
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiTableFooterButton is a footer-scoped action control for custom table footer layouts.
|
|
4
4
|
It behaves like a table-specific button primitive rather than a full replacement for UiButton.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.20/?path=/docs/components-uitable--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -78,7 +77,6 @@ styling:
|
|
|
78
77
|
notes:
|
|
79
78
|
- Use documented props and slots as the primary styling API.
|
|
80
79
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
81
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
82
80
|
- For footer pagination, style local custom classes on UiTableFooterButton instead of replacing it with UiButton.
|
|
83
81
|
- For page buttons, use a 36px square target with 4px radius, 14px text, black ordinary page color, and blue active background.
|
|
84
82
|
- For arrow buttons, use a 36px square target with a 24px chevron icon and grey color.
|
|
@@ -2,7 +2,6 @@ component: UiTableFooterSection
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiTableFooterSection is the low-level footer container for custom table footer layouts.
|
|
4
4
|
It is mainly useful when UiTable footer slots are not enough on their own.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.20/?path=/docs/components-uitable--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -68,7 +67,6 @@ styling:
|
|
|
68
67
|
notes:
|
|
69
68
|
- Use documented props and slots as the primary styling API.
|
|
70
69
|
- 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
70
|
- For reference-style footer controls, apply a local class to each UiTableFooterSection and style it through the UiTable root class.
|
|
73
71
|
- The pagination section usually needs padding-block 8px and an inner flex group with 8px gaps.
|
|
74
72
|
root_classes:
|
|
@@ -2,7 +2,6 @@ component: UiTableHeadCell
|
|
|
2
2
|
summary: >
|
|
3
3
|
UiTableHeadCell is the low-level table header cell primitive used inside UiTable head rows.
|
|
4
4
|
Use it only when you build custom table structure from public table parts.
|
|
5
|
-
usage: https://retailcrm.github.io/embed-ui/v1-components/0.9.18/?path=/docs/components-uitable--docs
|
|
6
5
|
|
|
7
6
|
public_import:
|
|
8
7
|
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
@@ -67,6 +66,5 @@ styling:
|
|
|
67
66
|
notes:
|
|
68
67
|
- Use documented props and slots as the primary styling API.
|
|
69
68
|
- Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
|
|
70
|
-
- Use Storybook from the usage link to verify visual variants before generating custom layout around the component.
|
|
71
69
|
root_classes:
|
|
72
70
|
- .ui-v1-table
|