@retailcrm/embed-ui-v1-components 0.9.13 → 0.9.15
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 +126 -0
- package/README.md +24 -0
- package/assets/stylesheets/palette.less +11 -6
- package/bin/embed-ui-v1-components.mjs +209 -0
- package/bin/postinstall.mjs +37 -0
- package/dist/host.cjs +1900 -590
- package/dist/host.css +659 -6
- package/dist/host.d.ts +2374 -50
- package/dist/host.js +1901 -591
- package/dist/remote.cjs +610 -33
- package/dist/remote.d.ts +729 -48
- package/dist/remote.js +612 -35
- package/docs/AI.md +106 -0
- package/docs/COMPONENTS.md +96 -0
- package/docs/FORMAT.md +248 -0
- package/docs/PROFILES.md +64 -0
- package/docs/README.md +65 -0
- package/docs/STYLING.md +156 -0
- package/docs/profiles/UiAddButton.yml +45 -0
- package/docs/profiles/UiAlert.yml +36 -0
- package/docs/profiles/UiAvatar.yml +36 -0
- package/docs/profiles/UiAvatarList.yml +30 -0
- package/docs/profiles/UiButton.yml +221 -0
- package/docs/profiles/UiCalendar.yml +36 -0
- package/docs/profiles/UiCheckbox.yml +41 -0
- package/docs/profiles/UiCollapse.yml +28 -0
- package/docs/profiles/UiCollapseBox.yml +39 -0
- package/docs/profiles/UiCollapseGroup.yml +27 -0
- package/docs/profiles/UiCopyButton.yml +40 -0
- package/docs/profiles/UiDate.yml +26 -0
- package/docs/profiles/UiDatePicker.yml +47 -0
- package/docs/profiles/UiError.yml +20 -0
- package/docs/profiles/UiField.yml +229 -0
- package/docs/profiles/UiImage.yml +27 -0
- package/docs/profiles/UiInfobox.yml +33 -0
- package/docs/profiles/UiLink.yml +39 -0
- package/docs/profiles/UiLoader.yml +26 -0
- package/docs/profiles/UiMenuItem.yml +45 -0
- package/docs/profiles/UiMenuItemGroup.yml +38 -0
- package/docs/profiles/UiModalSidebar.yml +34 -0
- package/docs/profiles/UiModalWindow.yml +32 -0
- package/docs/profiles/UiModalWindowSurface.yml +29 -0
- package/docs/profiles/UiNumberStepper.yml +40 -0
- package/docs/profiles/UiPageHeader.yml +240 -0
- package/docs/profiles/UiPopper.yml +197 -0
- package/docs/profiles/UiPopperConnector.yml +109 -0
- package/docs/profiles/UiPopperTarget.yml +112 -0
- package/docs/profiles/UiRadio.yml +26 -0
- package/docs/profiles/UiRadioSwitch.yml +224 -0
- package/docs/profiles/UiRadioSwitchOption.yml +113 -0
- package/docs/profiles/UiScrollBox.yml +19 -0
- package/docs/profiles/UiSelect.yml +318 -0
- package/docs/profiles/UiSelectOption.yml +32 -0
- package/docs/profiles/UiSelectOptionGroup.yml +26 -0
- package/docs/profiles/UiSlider.yml +26 -0
- package/docs/profiles/UiSwitch.yml +25 -0
- package/docs/profiles/UiTab.yml +114 -0
- package/docs/profiles/UiTabGroup.yml +233 -0
- package/docs/profiles/UiTable.yml +148 -0
- package/docs/profiles/UiTableBodyCell.yml +35 -0
- package/docs/profiles/UiTableColumn.yml +38 -0
- package/docs/profiles/UiTableFooterButton.yml +32 -0
- package/docs/profiles/UiTableFooterSection.yml +26 -0
- package/docs/profiles/UiTableHeadCell.yml +32 -0
- package/docs/profiles/UiTableSorter.yml +33 -0
- package/docs/profiles/UiTag.yml +29 -0
- package/docs/profiles/UiTextbox.yml +388 -0
- package/docs/profiles/UiTimePicker.yml +34 -0
- package/docs/profiles/UiToolbarButton.yml +25 -0
- package/docs/profiles/UiToolbarLink.yml +20 -0
- package/docs/profiles/UiTooltip.yml +31 -0
- package/docs/profiles/UiTransition.yml +15 -0
- package/docs/profiles/UiYandexMap.yml +17 -0
- package/package.json +11 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
component: UiSelectOption
|
|
2
|
+
summary: >
|
|
3
|
+
UiSelectOption is the base selectable child of UiSelect. It represents one option node
|
|
4
|
+
in the select option tree.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiSelectOption
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiSelect
|
|
13
|
+
- UiSelectOptionGroup
|
|
14
|
+
|
|
15
|
+
use_when:
|
|
16
|
+
- You need one option inside UiSelect.
|
|
17
|
+
|
|
18
|
+
avoid_when:
|
|
19
|
+
- You need free layout content inside a select dropdown.
|
|
20
|
+
|
|
21
|
+
api:
|
|
22
|
+
key_props:
|
|
23
|
+
- name: value
|
|
24
|
+
- name: label
|
|
25
|
+
- name: description
|
|
26
|
+
- name: disabled
|
|
27
|
+
- name: counter
|
|
28
|
+
- name: accent
|
|
29
|
+
|
|
30
|
+
ai_notes:
|
|
31
|
+
do:
|
|
32
|
+
- Use as the default child node of UiSelect.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
component: UiSelectOptionGroup
|
|
2
|
+
summary: >
|
|
3
|
+
UiSelectOptionGroup groups related UiSelectOption nodes under a shared label.
|
|
4
|
+
|
|
5
|
+
public_import:
|
|
6
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
7
|
+
named:
|
|
8
|
+
- UiSelectOptionGroup
|
|
9
|
+
|
|
10
|
+
related_components:
|
|
11
|
+
- UiSelect
|
|
12
|
+
- UiSelectOption
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You need grouped select options.
|
|
16
|
+
|
|
17
|
+
avoid_when:
|
|
18
|
+
- You only have a flat list of options.
|
|
19
|
+
|
|
20
|
+
api:
|
|
21
|
+
key_props:
|
|
22
|
+
- name: label
|
|
23
|
+
|
|
24
|
+
ai_notes:
|
|
25
|
+
do:
|
|
26
|
+
- Use to structure large option lists inside UiSelect.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
component: UiSlider
|
|
2
|
+
summary: >
|
|
3
|
+
UiSlider is a range-selection control for single values or ranges on a numeric track.
|
|
4
|
+
It supports single-handle and range-handle modes.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiSlider
|
|
10
|
+
|
|
11
|
+
use_when:
|
|
12
|
+
- You need compact ranged numeric selection.
|
|
13
|
+
- You need one or two draggable handles on a track.
|
|
14
|
+
|
|
15
|
+
avoid_when:
|
|
16
|
+
- You need precise text entry.
|
|
17
|
+
|
|
18
|
+
api:
|
|
19
|
+
key_props:
|
|
20
|
+
- name: type
|
|
21
|
+
- name: value
|
|
22
|
+
- name: min
|
|
23
|
+
- name: max
|
|
24
|
+
- name: labelled
|
|
25
|
+
emits:
|
|
26
|
+
- name: update:value
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
component: UiSwitch
|
|
2
|
+
summary: >
|
|
3
|
+
UiSwitch is a compact boolean toggle control. It is the most concise choice for on or off state
|
|
4
|
+
when checkbox semantics would feel visually heavy.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiSwitch
|
|
10
|
+
|
|
11
|
+
use_when:
|
|
12
|
+
- You need a compact on or off toggle.
|
|
13
|
+
|
|
14
|
+
avoid_when:
|
|
15
|
+
- You need checkbox-group semantics.
|
|
16
|
+
|
|
17
|
+
api:
|
|
18
|
+
key_props:
|
|
19
|
+
- name: value
|
|
20
|
+
- name: square
|
|
21
|
+
- name: disabled
|
|
22
|
+
methods:
|
|
23
|
+
- name: click
|
|
24
|
+
- name: focus
|
|
25
|
+
- name: blur
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
component: UiTab
|
|
2
|
+
summary: >
|
|
3
|
+
UiTab is a declarative child node for UiTabGroup. It does not render meaningful
|
|
4
|
+
standalone UI by itself; instead, UiTabGroup consumes its props and slots to build
|
|
5
|
+
tab buttons, overflow menu items, and optional tab panel content.
|
|
6
|
+
|
|
7
|
+
public_import:
|
|
8
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
|
+
named:
|
|
10
|
+
- UiTab
|
|
11
|
+
- UiTabGroup
|
|
12
|
+
|
|
13
|
+
related_components:
|
|
14
|
+
- UiTabGroup
|
|
15
|
+
|
|
16
|
+
use_when:
|
|
17
|
+
- You need custom icon, label, counter, or content inside UiTabGroup.
|
|
18
|
+
- You want each tab declaration to keep its header and panel content together.
|
|
19
|
+
|
|
20
|
+
avoid_when:
|
|
21
|
+
- You need a standalone button or link.
|
|
22
|
+
- A plain items array on UiTabGroup is enough for the screen.
|
|
23
|
+
- You need non-string tab identity, because UiTabGroup uses string id.
|
|
24
|
+
|
|
25
|
+
api:
|
|
26
|
+
key_props:
|
|
27
|
+
- name: id
|
|
28
|
+
notes: Required string identifier used by UiTabGroup as activeId.
|
|
29
|
+
- name: label
|
|
30
|
+
notes: Fallback plain-text header label.
|
|
31
|
+
- name: counter
|
|
32
|
+
notes: Optional badge-like counter.
|
|
33
|
+
- name: disabled
|
|
34
|
+
notes: Marks the tab as non-interactive.
|
|
35
|
+
props:
|
|
36
|
+
- name: id
|
|
37
|
+
notes: Must be unique within one UiTabGroup.
|
|
38
|
+
- name: label
|
|
39
|
+
notes: Optional when label slot is used.
|
|
40
|
+
- name: counter
|
|
41
|
+
notes: Optional when counter slot is used.
|
|
42
|
+
- name: disabled
|
|
43
|
+
notes: Excluded from selection and keyboard navigation.
|
|
44
|
+
slots:
|
|
45
|
+
- name: icon
|
|
46
|
+
zone: tab leading icon
|
|
47
|
+
notes: Used both in the visible tab button and in the overflow menu item.
|
|
48
|
+
- name: label
|
|
49
|
+
zone: tab label
|
|
50
|
+
notes: Overrides plain label prop for the header.
|
|
51
|
+
- name: counter
|
|
52
|
+
zone: tab counter
|
|
53
|
+
notes: Overrides plain counter prop for the header.
|
|
54
|
+
- name: content
|
|
55
|
+
zone: active tab panel
|
|
56
|
+
notes: Rendered only for the active tab by UiTabGroup.
|
|
57
|
+
|
|
58
|
+
rendered_structure:
|
|
59
|
+
descriptive_only: true
|
|
60
|
+
notes: >
|
|
61
|
+
UiTab is a structural declaration rather than a standalone DOM component. The
|
|
62
|
+
parent UiTabGroup resolves UiTab children and renders the actual tab buttons,
|
|
63
|
+
menu items, and optional tabpanel.
|
|
64
|
+
|
|
65
|
+
geometry:
|
|
66
|
+
layout: no standalone layout, interpreted by UiTabGroup
|
|
67
|
+
notes:
|
|
68
|
+
- UiTab itself should not be used outside UiTabGroup.
|
|
69
|
+
- Icon-only tabs are inferred when icon exists but label and counter do not.
|
|
70
|
+
|
|
71
|
+
behavior:
|
|
72
|
+
states:
|
|
73
|
+
- name: disabled
|
|
74
|
+
notes: The parent group keeps it visible but non-interactive.
|
|
75
|
+
notes:
|
|
76
|
+
- content slot is mounted only for the active tab.
|
|
77
|
+
- icon, label, and counter are also used when the tab moves into overflow menu.
|
|
78
|
+
|
|
79
|
+
accessibility:
|
|
80
|
+
notes:
|
|
81
|
+
- UiTab does not create tab semantics by itself.
|
|
82
|
+
- UiTabGroup applies role=tab, aria-selected, aria-controls, and tabpanel relationships.
|
|
83
|
+
|
|
84
|
+
composition:
|
|
85
|
+
works_well_with:
|
|
86
|
+
- UiTabGroup
|
|
87
|
+
patterns:
|
|
88
|
+
- title: Rich tab declaration
|
|
89
|
+
notes: Keep icon, counter, and content close to the tab declaration inside UiTabGroup.
|
|
90
|
+
|
|
91
|
+
examples:
|
|
92
|
+
- title: Rich tab child
|
|
93
|
+
goal: Declare one tab with custom icon and panel content.
|
|
94
|
+
code: |
|
|
95
|
+
<UiTab id="overview" label="Overview" counter="8">
|
|
96
|
+
<template #icon>
|
|
97
|
+
<IconStar />
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<template #content>
|
|
101
|
+
<section>
|
|
102
|
+
<h4>Overview</h4>
|
|
103
|
+
<p>Panel content for the active tab.</p>
|
|
104
|
+
</section>
|
|
105
|
+
</template>
|
|
106
|
+
</UiTab>
|
|
107
|
+
|
|
108
|
+
ai_notes:
|
|
109
|
+
do:
|
|
110
|
+
- Use UiTab only inside UiTabGroup.
|
|
111
|
+
- Prefer label and counter props for simple cases, and slots for richer markup.
|
|
112
|
+
avoid:
|
|
113
|
+
- Do not expect UiTab to render useful DOM outside a group.
|
|
114
|
+
- Do not rely on an undocumented default slot for header rendering.
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
component: UiTabGroup
|
|
2
|
+
summary: >
|
|
3
|
+
UiTabGroup is the navigation container for UiTab children or simple tab items.
|
|
4
|
+
It manages active tab selection by string id, keyboard navigation, optional overflow
|
|
5
|
+
into a dropdown menu, and optional tabpanel rendering from the active UiTab content slot.
|
|
6
|
+
|
|
7
|
+
public_import:
|
|
8
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
|
+
named:
|
|
10
|
+
- UiTabGroup
|
|
11
|
+
- UiTab
|
|
12
|
+
|
|
13
|
+
related_components:
|
|
14
|
+
- UiTab
|
|
15
|
+
- UiButton
|
|
16
|
+
- UiMenuItem
|
|
17
|
+
|
|
18
|
+
use_when:
|
|
19
|
+
- You need horizontal navigation between a small or medium number of sections.
|
|
20
|
+
- Active state can be represented by a string id.
|
|
21
|
+
- You need overflow handling that moves extra tabs into a dropdown.
|
|
22
|
+
- You want optional panel content rendered from the active UiTab.
|
|
23
|
+
|
|
24
|
+
avoid_when:
|
|
25
|
+
- You need free-form router navigation that should not behave like a tablist.
|
|
26
|
+
- You need non-string identity with custom equality logic.
|
|
27
|
+
- You need many options better served by a menu or select.
|
|
28
|
+
|
|
29
|
+
api:
|
|
30
|
+
key_props:
|
|
31
|
+
- name: activeId
|
|
32
|
+
notes: Main selected-tab model by string id.
|
|
33
|
+
- name: items
|
|
34
|
+
notes: Simple array-based alternative to slot-declared UiTab children.
|
|
35
|
+
- name: appearance
|
|
36
|
+
notes: Supports text and filled visual styles.
|
|
37
|
+
- name: size
|
|
38
|
+
notes: Supports sm, md, lg.
|
|
39
|
+
- name: overflowing
|
|
40
|
+
notes: Enables overflow resolution into a dropdown menu.
|
|
41
|
+
- name: menuExpanded
|
|
42
|
+
notes: Optional controlled state for the overflow menu.
|
|
43
|
+
- name: focusableId
|
|
44
|
+
notes: Optional controlled state for roving focus.
|
|
45
|
+
props:
|
|
46
|
+
- name: activeId
|
|
47
|
+
notes: Usually used through v-model:active-id.
|
|
48
|
+
- name: items
|
|
49
|
+
notes: Expects array items shaped as { id, label?, counter?, disabled?, iconOnly? }.
|
|
50
|
+
- name: focusableId
|
|
51
|
+
notes: Advanced control hook; usually let the component manage it.
|
|
52
|
+
- name: menuExpanded
|
|
53
|
+
notes: Advanced control hook; usually let the component manage it.
|
|
54
|
+
- name: size
|
|
55
|
+
notes: Changes typography, icon size, and spacing.
|
|
56
|
+
- name: appearance
|
|
57
|
+
notes: text is classic tabs, filled is segmented-tab styling.
|
|
58
|
+
- name: overflowing
|
|
59
|
+
notes: When false, all tabs stay in the header row without overflow menu.
|
|
60
|
+
child_components:
|
|
61
|
+
- name: UiTab
|
|
62
|
+
key_props:
|
|
63
|
+
- id
|
|
64
|
+
- label
|
|
65
|
+
- counter
|
|
66
|
+
- disabled
|
|
67
|
+
notes: Use it when a tab needs icon, custom label, custom counter, or content slot.
|
|
68
|
+
slots:
|
|
69
|
+
- name: default
|
|
70
|
+
zone: tab declarations
|
|
71
|
+
creates: Slot-based tab registry via UiTab children.
|
|
72
|
+
accepts:
|
|
73
|
+
recommended:
|
|
74
|
+
- UiTab
|
|
75
|
+
avoid:
|
|
76
|
+
- arbitrary buttons
|
|
77
|
+
- unrelated layout wrappers
|
|
78
|
+
notes: >
|
|
79
|
+
Use items for simple data-driven tabs, and default slot with UiTab for richer
|
|
80
|
+
headers or tabpanel content.
|
|
81
|
+
emits:
|
|
82
|
+
- name: change
|
|
83
|
+
payload: string
|
|
84
|
+
notes: Fired when the active tab changes.
|
|
85
|
+
- name: update:activeId
|
|
86
|
+
payload: string
|
|
87
|
+
notes: Main v-model channel.
|
|
88
|
+
- name: update:focusableId
|
|
89
|
+
payload: string | null
|
|
90
|
+
notes: Optional roving-focus control channel.
|
|
91
|
+
- name: update:menuExpanded
|
|
92
|
+
payload: boolean
|
|
93
|
+
notes: Optional overflow-menu visibility control channel.
|
|
94
|
+
- name: layout
|
|
95
|
+
payload: "{ headIds: string[]; menuIds: string[] }"
|
|
96
|
+
notes: Emits the current overflow split between visible tabs and menu tabs.
|
|
97
|
+
|
|
98
|
+
rendered_structure:
|
|
99
|
+
descriptive_only: true
|
|
100
|
+
notes: >
|
|
101
|
+
UiTabGroup renders a header row, a visible tablist region, an optional overflow
|
|
102
|
+
trigger with popper menu, and an optional tabpanel for the active UiTab content.
|
|
103
|
+
Class names are useful for debugging, not as a guaranteed public styling API.
|
|
104
|
+
composition:
|
|
105
|
+
- .ui-v1-tab-group root
|
|
106
|
+
- .ui-v1-tab-group__head with role=tablist region
|
|
107
|
+
- .ui-v1-tab-group__content for visible tabs
|
|
108
|
+
- .ui-v1-tab-group__measure hidden sizing layer
|
|
109
|
+
- .ui-v1-tab-group__trigger for overflow button
|
|
110
|
+
- .ui-v1-tab-group__menu inside UiPopper
|
|
111
|
+
- .ui-v1-tab-group__panel for active tabpanel content
|
|
112
|
+
classes:
|
|
113
|
+
- .ui-v1-tab-group
|
|
114
|
+
- .ui-v1-tab-group_text
|
|
115
|
+
- .ui-v1-tab-group_filled
|
|
116
|
+
- .ui-v1-tab
|
|
117
|
+
- .ui-v1-tab_active
|
|
118
|
+
- .ui-v1-tab_disabled
|
|
119
|
+
|
|
120
|
+
geometry:
|
|
121
|
+
layout: block-level group with full-width header and optional content panel
|
|
122
|
+
notes:
|
|
123
|
+
- The group itself stretches to width 100%.
|
|
124
|
+
- The visible header keeps tabs on one row.
|
|
125
|
+
- overflowing lets extra tabs move into a dropdown instead of wrapping.
|
|
126
|
+
- The active panel sits below the tab header.
|
|
127
|
+
|
|
128
|
+
styling:
|
|
129
|
+
notes:
|
|
130
|
+
- Prefer appearance and size props over selector overrides.
|
|
131
|
+
- Current classes help explain state and overflow structure.
|
|
132
|
+
root_classes:
|
|
133
|
+
- .ui-v1-tab-group
|
|
134
|
+
- .ui-v1-tab
|
|
135
|
+
state_classes:
|
|
136
|
+
- .ui-v1-tab-group_text
|
|
137
|
+
- .ui-v1-tab-group_filled
|
|
138
|
+
- .ui-v1-tab_active
|
|
139
|
+
- .ui-v1-tab_disabled
|
|
140
|
+
- .ui-v1-tab_icon-without-text
|
|
141
|
+
zones:
|
|
142
|
+
- .ui-v1-tab-group__head
|
|
143
|
+
- .ui-v1-tab-group__content
|
|
144
|
+
- .ui-v1-tab-group__measure
|
|
145
|
+
- .ui-v1-tab-group__trigger
|
|
146
|
+
- .ui-v1-tab-group__menu
|
|
147
|
+
- .ui-v1-tab-group__panel
|
|
148
|
+
- .ui-v1-tab__icon
|
|
149
|
+
- .ui-v1-tab__label
|
|
150
|
+
- .ui-v1-tab__counter
|
|
151
|
+
typography:
|
|
152
|
+
default:
|
|
153
|
+
notes:
|
|
154
|
+
- text appearance uses tab-specific typography that depends on size.
|
|
155
|
+
- lg uses heading-scale typography and larger icon sizing.
|
|
156
|
+
|
|
157
|
+
behavior:
|
|
158
|
+
states:
|
|
159
|
+
- name: overflowing
|
|
160
|
+
notes: Enables moving extra tabs into a dropdown menu.
|
|
161
|
+
- name: appearance=text
|
|
162
|
+
notes: Classic underline tabs.
|
|
163
|
+
- name: appearance=filled
|
|
164
|
+
notes: Filled segmented-tab look with zero gap between tabs.
|
|
165
|
+
- name: disabled tab
|
|
166
|
+
notes: Visible but not interactive and excluded from keyboard navigation.
|
|
167
|
+
selection_and_layout:
|
|
168
|
+
- activeId is resolved only against existing tab ids.
|
|
169
|
+
- When overflowing is enabled, the active tab tries to remain in the visible header.
|
|
170
|
+
- layout reports which ids stay in the header and which move into the menu.
|
|
171
|
+
- menuExpanded and focusableId can be controlled from outside but usually do not need to be.
|
|
172
|
+
keyboard:
|
|
173
|
+
- One tab stop is used for the whole visible tablist.
|
|
174
|
+
- Arrow keys move focus and selection across enabled visible tabs.
|
|
175
|
+
- Home and End jump to the first or last enabled visible tab.
|
|
176
|
+
- Space and Enter activate the focused tab.
|
|
177
|
+
- Overflow menu items use menuitemradio semantics and activate on click, Enter, or Space.
|
|
178
|
+
|
|
179
|
+
accessibility:
|
|
180
|
+
notes:
|
|
181
|
+
- The visible header uses tablist and tab roles.
|
|
182
|
+
- The active tab can be linked to its content through aria-controls and aria-labelledby.
|
|
183
|
+
- The content container uses role=tabpanel when active UiTab provides content slot.
|
|
184
|
+
- Overflow menu items use role=menuitemradio and aria-checked.
|
|
185
|
+
|
|
186
|
+
composition:
|
|
187
|
+
works_well_with:
|
|
188
|
+
- UiTab
|
|
189
|
+
patterns:
|
|
190
|
+
- title: Simple tabs from items
|
|
191
|
+
notes: Use items when tabs are data-only and do not need per-tab content slots.
|
|
192
|
+
- title: Rich tabs from UiTab
|
|
193
|
+
notes: Use UiTab children when tabs need icon, custom label, counter, or tabpanel content.
|
|
194
|
+
|
|
195
|
+
examples:
|
|
196
|
+
- title: Data-driven tabs
|
|
197
|
+
goal: Render a compact tab header from plain items.
|
|
198
|
+
code: |
|
|
199
|
+
<UiTabGroup
|
|
200
|
+
v-model:active-id="activeId"
|
|
201
|
+
:items="[
|
|
202
|
+
{ id: 'overview', label: 'Overview', counter: '8' },
|
|
203
|
+
{ id: 'orders', label: 'Orders', counter: '12' },
|
|
204
|
+
]"
|
|
205
|
+
overflowing
|
|
206
|
+
/>
|
|
207
|
+
- title: Tabs with panel content
|
|
208
|
+
goal: Render active tabpanel content from UiTab child declarations.
|
|
209
|
+
code: |
|
|
210
|
+
<UiTabGroup
|
|
211
|
+
v-model:active-id="activeId"
|
|
212
|
+
overflowing
|
|
213
|
+
>
|
|
214
|
+
<UiTab id="overview" label="Overview">
|
|
215
|
+
<template #content>
|
|
216
|
+
<section>
|
|
217
|
+
<h4>Overview</h4>
|
|
218
|
+
<p>Visible only when this tab is active.</p>
|
|
219
|
+
</section>
|
|
220
|
+
</template>
|
|
221
|
+
</UiTab>
|
|
222
|
+
|
|
223
|
+
<UiTab id="orders" label="Orders" />
|
|
224
|
+
</UiTabGroup>
|
|
225
|
+
|
|
226
|
+
ai_notes:
|
|
227
|
+
do:
|
|
228
|
+
- Use v-model:active-id with string ids.
|
|
229
|
+
- Prefer items for simple tabs and UiTab children for rich composition.
|
|
230
|
+
- Treat menuExpanded and focusableId as advanced controlled props, not default requirements.
|
|
231
|
+
avoid:
|
|
232
|
+
- Do not pass object values or expect equalsFn-like behavior.
|
|
233
|
+
- Do not rely on internal overflow DOM structure as a stable extension contract.
|
|
@@ -0,0 +1,148 @@
|
|
|
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
|
+
- UiTableColumn
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You need structured tabular data.
|
|
16
|
+
- You need group headers, expandable rows, or footer sections.
|
|
17
|
+
|
|
18
|
+
avoid_when:
|
|
19
|
+
- You need a simple list or card layout.
|
|
20
|
+
|
|
21
|
+
api:
|
|
22
|
+
key_props:
|
|
23
|
+
- name: rows
|
|
24
|
+
- name: rowKey
|
|
25
|
+
- name: headless
|
|
26
|
+
- name: bordered
|
|
27
|
+
- name: fixed
|
|
28
|
+
- name: groupBy
|
|
29
|
+
slots:
|
|
30
|
+
- name: default
|
|
31
|
+
zone: columns
|
|
32
|
+
creates: Column declarations.
|
|
33
|
+
- name: expand
|
|
34
|
+
zone: expanded-row
|
|
35
|
+
creates: Expanded row content.
|
|
36
|
+
- name: footer
|
|
37
|
+
zone: footer
|
|
38
|
+
creates: Full footer area.
|
|
39
|
+
- name: group-head
|
|
40
|
+
zone: group-head
|
|
41
|
+
creates: Group heading content.
|
|
42
|
+
- name: empty
|
|
43
|
+
zone: empty-state
|
|
44
|
+
creates: Empty-state content.
|
|
45
|
+
emits:
|
|
46
|
+
- name: row:click
|
|
47
|
+
methods:
|
|
48
|
+
- name: resetExpanded
|
|
49
|
+
- name: expand
|
|
50
|
+
- name: collapse
|
|
51
|
+
- name: toggle
|
|
52
|
+
|
|
53
|
+
rendered_structure:
|
|
54
|
+
descriptive_only: true
|
|
55
|
+
root: .ui-v1-table
|
|
56
|
+
zones:
|
|
57
|
+
- .ui-v1-table__section_head
|
|
58
|
+
- .ui-v1-table__section_body
|
|
59
|
+
- .ui-v1-table__section_foot
|
|
60
|
+
- .ui-v1-table__row
|
|
61
|
+
- .ui-v1-table__head-cell
|
|
62
|
+
- .ui-v1-table__body-cell
|
|
63
|
+
notes: >
|
|
64
|
+
Table layout is distributed across head, body, foot, and cell-level classes. Treat this as a
|
|
65
|
+
reasoning model for geometry and spacing, not as a stable selector contract.
|
|
66
|
+
|
|
67
|
+
geometry:
|
|
68
|
+
layout: block-width table
|
|
69
|
+
width: 100%
|
|
70
|
+
notes:
|
|
71
|
+
- Root fills available width.
|
|
72
|
+
- fixed=true switches table-layout from auto to fixed.
|
|
73
|
+
- bordered=true adds border and corner rounding through CSS variables.
|
|
74
|
+
|
|
75
|
+
styling:
|
|
76
|
+
notes:
|
|
77
|
+
- UiTable exposes a relatively rich CSS-variable surface for spacing and table chrome.
|
|
78
|
+
- Prefer table props and slot composition first, then CSS variables for spacing or background tuning.
|
|
79
|
+
- Internal classes are descriptive and mainly useful for debugging or narrow local integration.
|
|
80
|
+
root_classes:
|
|
81
|
+
- .ui-v1-table
|
|
82
|
+
state_classes:
|
|
83
|
+
- .ui-v1-table_fixed
|
|
84
|
+
- .ui-v1-table_bordered
|
|
85
|
+
- .ui-v1-table__head-cell_align-center
|
|
86
|
+
- .ui-v1-table__head-cell_align-right
|
|
87
|
+
- .ui-v1-table__body-cell_align-center
|
|
88
|
+
- .ui-v1-table__body-cell_align-right
|
|
89
|
+
- .ui-v1-table__body-cell_valign-top
|
|
90
|
+
- .ui-v1-table__body-cell_valign-bottom
|
|
91
|
+
- .ui-v1-table__body-cell_theme-group
|
|
92
|
+
- .ui-v1-table__body-cell_trim
|
|
93
|
+
- .ui-v1-table__head-cell_trim
|
|
94
|
+
zones:
|
|
95
|
+
- .ui-v1-table__head-cell
|
|
96
|
+
- .ui-v1-table__body-cell
|
|
97
|
+
- .ui-v1-table__footer-cell
|
|
98
|
+
css_variables:
|
|
99
|
+
public_theme_variables:
|
|
100
|
+
- name: --ui-v1-table-border-width
|
|
101
|
+
effect: Outer border width in bordered mode.
|
|
102
|
+
- name: --ui-v1-table-rounding
|
|
103
|
+
effect: Shared corner rounding.
|
|
104
|
+
- name: --ui-v1-table-cell-padding-x
|
|
105
|
+
effect: Base inline cell padding.
|
|
106
|
+
- name: --ui-v1-table-cell-padding-y
|
|
107
|
+
effect: Base block cell padding.
|
|
108
|
+
- name: --ui-v1-table-head-background
|
|
109
|
+
effect: Header row background.
|
|
110
|
+
- name: --ui-v1-table-group-head-background
|
|
111
|
+
effect: Group heading row background.
|
|
112
|
+
- name: --ui-v1-table-padding-start
|
|
113
|
+
effect: Effective first-column start padding.
|
|
114
|
+
- name: --ui-v1-table-padding-end
|
|
115
|
+
effect: Effective last-column end padding.
|
|
116
|
+
internal_layout_variables:
|
|
117
|
+
- name: --ui-v1-table-effective-padding-start
|
|
118
|
+
effect: Start padding after bordered adjustments.
|
|
119
|
+
- name: --ui-v1-table-effective-padding-end
|
|
120
|
+
effect: End padding after bordered adjustments.
|
|
121
|
+
- name: --ui-v1-table-head-cell-padding-block-start
|
|
122
|
+
effect: Header top padding.
|
|
123
|
+
- name: --ui-v1-table-head-cell-padding-block-end
|
|
124
|
+
effect: Header bottom padding.
|
|
125
|
+
- name: --ui-v1-table-body-cell-padding-block-start
|
|
126
|
+
effect: Body top padding.
|
|
127
|
+
- name: --ui-v1-table-body-cell-padding-block-end
|
|
128
|
+
effect: Body bottom padding.
|
|
129
|
+
- name: --ui-v1-table-group-head-padding-block-start
|
|
130
|
+
effect: Group row top padding.
|
|
131
|
+
- name: --ui-v1-table-group-head-padding-block-end
|
|
132
|
+
effect: Group row bottom padding.
|
|
133
|
+
typography:
|
|
134
|
+
default:
|
|
135
|
+
mixin: text-small
|
|
136
|
+
size: 14px
|
|
137
|
+
line_height: 20px
|
|
138
|
+
weight: 400
|
|
139
|
+
head_cells:
|
|
140
|
+
mixin: text-tiny-accent
|
|
141
|
+
size: 12px
|
|
142
|
+
line_height: 14px
|
|
143
|
+
weight: 500
|
|
144
|
+
group_rows:
|
|
145
|
+
mixin: text-tiny
|
|
146
|
+
size: 12px
|
|
147
|
+
line_height: 14px
|
|
148
|
+
weight: 400
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
component: UiTableBodyCell
|
|
2
|
+
summary: >
|
|
3
|
+
UiTableBodyCell is the low-level body cell primitive used inside UiTable rows.
|
|
4
|
+
Use it only for custom table layouts built from public table parts.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTableBodyCell
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiTable
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You compose custom body rows with public table primitives.
|
|
16
|
+
- You need explicit align, valign, colspan, rowspan, or grouped-cell theme control.
|
|
17
|
+
|
|
18
|
+
avoid_when:
|
|
19
|
+
- UiTableColumn already covers the body-cell rendering you need.
|
|
20
|
+
- You are not inside table row structure.
|
|
21
|
+
|
|
22
|
+
api:
|
|
23
|
+
key_props:
|
|
24
|
+
- name: align
|
|
25
|
+
- name: valign
|
|
26
|
+
- name: colspan
|
|
27
|
+
- name: rowspan
|
|
28
|
+
- name: trim
|
|
29
|
+
- name: theme
|
|
30
|
+
|
|
31
|
+
ai_notes:
|
|
32
|
+
do:
|
|
33
|
+
- Keep it inside UiTable row composition.
|
|
34
|
+
avoid:
|
|
35
|
+
- Do not use it as a generic box or layout wrapper.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
component: UiTableColumn
|
|
2
|
+
summary: >
|
|
3
|
+
UiTableColumn declares one logical column inside UiTable. It carries label and sizing metadata
|
|
4
|
+
and defines how header labels and cells render.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTableColumn
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiTable
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You define columns for UiTable.
|
|
16
|
+
|
|
17
|
+
avoid_when:
|
|
18
|
+
- You need standalone layout markup outside UiTable.
|
|
19
|
+
|
|
20
|
+
api:
|
|
21
|
+
key_props:
|
|
22
|
+
- name: label
|
|
23
|
+
- name: width
|
|
24
|
+
- name: minWidth
|
|
25
|
+
- name: maxWidth
|
|
26
|
+
- name: align
|
|
27
|
+
- name: valign
|
|
28
|
+
- name: trim
|
|
29
|
+
slots:
|
|
30
|
+
- name: default
|
|
31
|
+
zone: cell
|
|
32
|
+
creates: Cell content.
|
|
33
|
+
- name: cell
|
|
34
|
+
zone: cell
|
|
35
|
+
creates: Explicit cell content.
|
|
36
|
+
- name: label
|
|
37
|
+
zone: header-label
|
|
38
|
+
creates: Header label content.
|