@retailcrm/embed-ui-v1-components 0.9.14 → 0.9.16
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/sprites/map-and-places/navigate.svg +3 -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 +2443 -657
- package/dist/host.css +920 -6
- package/dist/host.d.ts +2440 -6
- package/dist/host.js +2444 -658
- package/dist/remote.cjs +1009 -46
- package/dist/remote.d.ts +1240 -67
- package/dist/remote.js +1011 -48
- package/docs/AI.md +106 -0
- package/docs/COMPONENTS.md +99 -0
- package/docs/FORMAT.md +267 -0
- package/docs/PROFILES.md +66 -0
- package/docs/README.md +65 -0
- package/docs/STYLING.md +156 -0
- package/docs/profiles/UiAddButton.yml +57 -0
- package/docs/profiles/UiAlert.yml +48 -0
- package/docs/profiles/UiAvatar.yml +48 -0
- package/docs/profiles/UiAvatarList.yml +42 -0
- package/docs/profiles/UiButton.yml +229 -0
- package/docs/profiles/UiCalendar.yml +48 -0
- package/docs/profiles/UiCheckbox.yml +53 -0
- package/docs/profiles/UiCollapse.yml +40 -0
- package/docs/profiles/UiCollapseBox.yml +51 -0
- package/docs/profiles/UiCollapseGroup.yml +39 -0
- package/docs/profiles/UiCopyButton.yml +52 -0
- package/docs/profiles/UiDate.yml +38 -0
- package/docs/profiles/UiDatePicker.yml +59 -0
- package/docs/profiles/UiError.yml +32 -0
- package/docs/profiles/UiField.yml +233 -0
- package/docs/profiles/UiImage.yml +39 -0
- package/docs/profiles/UiInfobox.yml +45 -0
- package/docs/profiles/UiLink.yml +51 -0
- package/docs/profiles/UiLoader.yml +38 -0
- package/docs/profiles/UiMenuItem.yml +57 -0
- package/docs/profiles/UiMenuItemGroup.yml +50 -0
- package/docs/profiles/UiModalSidebar.yml +46 -0
- package/docs/profiles/UiModalWindow.yml +44 -0
- package/docs/profiles/UiModalWindowSurface.yml +41 -0
- package/docs/profiles/UiNumberStepper.yml +52 -0
- package/docs/profiles/UiPageHeader.yml +244 -0
- package/docs/profiles/UiPopper.yml +201 -0
- package/docs/profiles/UiPopperConnector.yml +115 -0
- package/docs/profiles/UiPopperTarget.yml +118 -0
- package/docs/profiles/UiRadio.yml +38 -0
- package/docs/profiles/UiRadioSwitch.yml +231 -0
- package/docs/profiles/UiRadioSwitchOption.yml +121 -0
- package/docs/profiles/UiScrollBox.yml +31 -0
- package/docs/profiles/UiSelect.yml +327 -0
- package/docs/profiles/UiSelectOption.yml +44 -0
- package/docs/profiles/UiSelectOptionGroup.yml +38 -0
- package/docs/profiles/UiSlider.yml +38 -0
- package/docs/profiles/UiSwitch.yml +37 -0
- package/docs/profiles/UiTab.yml +119 -0
- package/docs/profiles/UiTabGroup.yml +238 -0
- package/docs/profiles/UiTable.yml +152 -0
- package/docs/profiles/UiTableBodyCell.yml +47 -0
- package/docs/profiles/UiTableColumn.yml +50 -0
- package/docs/profiles/UiTableFooterButton.yml +44 -0
- package/docs/profiles/UiTableFooterSection.yml +38 -0
- package/docs/profiles/UiTableHeadCell.yml +44 -0
- package/docs/profiles/UiTableSorter.yml +45 -0
- package/docs/profiles/UiTag.yml +41 -0
- package/docs/profiles/UiTextbox.yml +392 -0
- package/docs/profiles/UiTimePicker.yml +46 -0
- package/docs/profiles/UiToggleButton.yml +211 -0
- package/docs/profiles/UiToggleGroup.yml +211 -0
- package/docs/profiles/UiToggleGroupOption.yml +116 -0
- package/docs/profiles/UiToolbarButton.yml +37 -0
- package/docs/profiles/UiToolbarLink.yml +32 -0
- package/docs/profiles/UiTooltip.yml +43 -0
- package/docs/profiles/UiTransition.yml +27 -0
- package/docs/profiles/UiYandexMap.yml +29 -0
- package/package.json +8 -3
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
component: UiToggleButton
|
|
2
|
+
summary: >
|
|
3
|
+
UiToggleButton is a stateful button primitive for toggle-like interactions. It keeps
|
|
4
|
+
native button shape and methods, but the pressed state is controlled externally and
|
|
5
|
+
can be used either for a standalone toggle or as the visual basis of segmented groups
|
|
6
|
+
such as UiToggleGroup.
|
|
7
|
+
|
|
8
|
+
public_import:
|
|
9
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
10
|
+
named:
|
|
11
|
+
- UiToggleButton
|
|
12
|
+
|
|
13
|
+
related_components:
|
|
14
|
+
- UiToggleGroup
|
|
15
|
+
- UiCheckbox
|
|
16
|
+
- UiSwitch
|
|
17
|
+
|
|
18
|
+
use_when:
|
|
19
|
+
- You need a button-looking control with externally managed pressed state.
|
|
20
|
+
- You need a primitive for segmented controls or compact filter chips.
|
|
21
|
+
- You need button methods like focus, blur, and click together with toggle styling.
|
|
22
|
+
|
|
23
|
+
avoid_when:
|
|
24
|
+
- You need checkbox or radio semantics without custom composition.
|
|
25
|
+
- You need a plain action button without persistent state, use UiButton instead.
|
|
26
|
+
- You need a ready multi-select segmented group, use UiToggleGroup instead.
|
|
27
|
+
|
|
28
|
+
api:
|
|
29
|
+
key_props:
|
|
30
|
+
- name: pressed
|
|
31
|
+
notes: Enables the selected visual state.
|
|
32
|
+
- name: size
|
|
33
|
+
values:
|
|
34
|
+
- lg
|
|
35
|
+
- md
|
|
36
|
+
- sm
|
|
37
|
+
- xs
|
|
38
|
+
notes: Controls height, horizontal padding, icon size, and radius.
|
|
39
|
+
- name: disabled
|
|
40
|
+
notes: Disables native interaction and applies disabled styling.
|
|
41
|
+
- name: grouped
|
|
42
|
+
notes: Enables segmented-group geometry for adjacent toggle buttons.
|
|
43
|
+
props:
|
|
44
|
+
- name: id
|
|
45
|
+
notes: Optional id passed to the native button root.
|
|
46
|
+
- name: type
|
|
47
|
+
notes: Native button type, defaults to button.
|
|
48
|
+
- name: focused
|
|
49
|
+
notes: Forces the focus-ring styling; used internally by keyboard-managed groups.
|
|
50
|
+
slots:
|
|
51
|
+
- name: default
|
|
52
|
+
zone: button content
|
|
53
|
+
creates: Inner content layout for label and optional icons.
|
|
54
|
+
accepts:
|
|
55
|
+
recommended:
|
|
56
|
+
- text
|
|
57
|
+
- text plus icon
|
|
58
|
+
- icon component
|
|
59
|
+
- svg
|
|
60
|
+
avoid:
|
|
61
|
+
- nested interactive elements
|
|
62
|
+
- large block layout wrappers
|
|
63
|
+
layout_effect: Text and icon nodes are normalized into separate inner spans.
|
|
64
|
+
notes: Main content slot for standalone or grouped toggles.
|
|
65
|
+
methods:
|
|
66
|
+
- name: click
|
|
67
|
+
notes: Triggers a click programmatically.
|
|
68
|
+
- name: focus
|
|
69
|
+
notes: Focuses the native button root.
|
|
70
|
+
- name: blur
|
|
71
|
+
notes: Removes focus from the native button root.
|
|
72
|
+
|
|
73
|
+
rendered_structure:
|
|
74
|
+
descriptive_only: true
|
|
75
|
+
notes: >
|
|
76
|
+
UiToggleButton currently renders one native button root with normalized inner content.
|
|
77
|
+
This structure is useful for reasoning and debugging, not as a stable styling API.
|
|
78
|
+
root:
|
|
79
|
+
shape: button.ui-v1-toggle-button
|
|
80
|
+
tag: button
|
|
81
|
+
zones:
|
|
82
|
+
- .ui-v1-toggle-button__content
|
|
83
|
+
- .ui-v1-toggle-button__icon
|
|
84
|
+
- .ui-v1-toggle-button__text
|
|
85
|
+
state_classes:
|
|
86
|
+
- .ui-v1-toggle-button_pressed
|
|
87
|
+
- .ui-v1-toggle-button_disabled
|
|
88
|
+
- .ui-v1-toggle-button_focused
|
|
89
|
+
- .ui-v1-toggle-button_grouped
|
|
90
|
+
|
|
91
|
+
geometry:
|
|
92
|
+
layout: inline-flex button root
|
|
93
|
+
root_display: inline-flex
|
|
94
|
+
width_behavior: content-sized by default
|
|
95
|
+
notes:
|
|
96
|
+
- Fits into inline rows and compact filter bars without forcing a new line.
|
|
97
|
+
- grouped keeps each button inline-sized while allowing adjacent segments to merge visually.
|
|
98
|
+
- Size controls height, min-width, horizontal padding, content gap, and radius.
|
|
99
|
+
- grouped removes standalone radii and lets adjacent buttons visually merge into a segmented row.
|
|
100
|
+
- The component stays content-sized by default and fits naturally into inline rows and compact filter areas.
|
|
101
|
+
|
|
102
|
+
styling:
|
|
103
|
+
notes:
|
|
104
|
+
- Props like pressed, disabled, grouped, and size are the main styling API.
|
|
105
|
+
- Internal classes and CSS variables describe the current implementation and are most useful for debugging.
|
|
106
|
+
root_classes:
|
|
107
|
+
- .ui-v1-toggle-button
|
|
108
|
+
state_classes:
|
|
109
|
+
- .ui-v1-toggle-button_pressed
|
|
110
|
+
- .ui-v1-toggle-button_disabled
|
|
111
|
+
- .ui-v1-toggle-button_focused
|
|
112
|
+
- .ui-v1-toggle-button_grouped
|
|
113
|
+
- .ui-v1-toggle-button_lg
|
|
114
|
+
- .ui-v1-toggle-button_md
|
|
115
|
+
- .ui-v1-toggle-button_sm
|
|
116
|
+
- .ui-v1-toggle-button_xs
|
|
117
|
+
zones:
|
|
118
|
+
- .ui-v1-toggle-button__content
|
|
119
|
+
- .ui-v1-toggle-button__icon
|
|
120
|
+
- .ui-v1-toggle-button__text
|
|
121
|
+
css_variables:
|
|
122
|
+
internal_layout_variables:
|
|
123
|
+
- name: --ui-v1-toggle-button-height
|
|
124
|
+
effect: Current control height for the selected size.
|
|
125
|
+
- name: --ui-v1-toggle-button-min-width
|
|
126
|
+
effect: Minimum width for the current size.
|
|
127
|
+
- name: --ui-v1-toggle-button-padding-x
|
|
128
|
+
effect: Horizontal padding of the button content.
|
|
129
|
+
- name: --ui-v1-toggle-button-radius
|
|
130
|
+
effect: Border radius for standalone and grouped edge segments.
|
|
131
|
+
- name: --ui-v1-toggle-button-icon-size
|
|
132
|
+
effect: Size of normalized icon nodes.
|
|
133
|
+
- name: --ui-v1-toggle-button-content-gap
|
|
134
|
+
effect: Gap between icon and text.
|
|
135
|
+
- name: --ui-v1-toggle-button-focus-color
|
|
136
|
+
effect: Color of the box-shadow based focus ring.
|
|
137
|
+
typography:
|
|
138
|
+
size_variants:
|
|
139
|
+
- name: lg
|
|
140
|
+
mixin: h4-accent
|
|
141
|
+
size: 18px
|
|
142
|
+
line_height: 28px
|
|
143
|
+
weight: 500
|
|
144
|
+
- name: md
|
|
145
|
+
mixin: text-regular-accent
|
|
146
|
+
size: 16px
|
|
147
|
+
line_height: 24px
|
|
148
|
+
weight: 500
|
|
149
|
+
- name: sm
|
|
150
|
+
mixin: text-small-accent
|
|
151
|
+
size: 14px
|
|
152
|
+
line_height: 20px
|
|
153
|
+
weight: 500
|
|
154
|
+
- name: xs
|
|
155
|
+
mixin: text-tiny-accent
|
|
156
|
+
size: 12px
|
|
157
|
+
line_height: 14px
|
|
158
|
+
weight: 500
|
|
159
|
+
|
|
160
|
+
behavior:
|
|
161
|
+
states:
|
|
162
|
+
- name: pressed
|
|
163
|
+
notes: Changes only the visual selected state; external code owns the actual model.
|
|
164
|
+
- name: disabled
|
|
165
|
+
notes: Disables interaction and applies disabled styling.
|
|
166
|
+
- name: grouped
|
|
167
|
+
notes: Enables segmented adjacency behavior for use in button rows and groups.
|
|
168
|
+
- name: focused
|
|
169
|
+
notes: Forces focus-ring styling for keyboard-managed composition scenarios.
|
|
170
|
+
notes:
|
|
171
|
+
- The component does not manage its own on or off state.
|
|
172
|
+
- Click handling and value updates are owned by the parent screen or group component.
|
|
173
|
+
|
|
174
|
+
accessibility:
|
|
175
|
+
notes:
|
|
176
|
+
- The root is a native button.
|
|
177
|
+
- The component does not add toggle ARIA semantics automatically.
|
|
178
|
+
- For standalone toggle usage, the caller should provide the appropriate state attribute such as aria-pressed.
|
|
179
|
+
- In grouped multi-select composition, the caller may apply group-specific role and checked semantics.
|
|
180
|
+
|
|
181
|
+
composition:
|
|
182
|
+
works_well_with:
|
|
183
|
+
- UiToggleGroup
|
|
184
|
+
- UiField
|
|
185
|
+
- compact filter bars
|
|
186
|
+
patterns:
|
|
187
|
+
- title: Standalone filter toggle
|
|
188
|
+
notes: Use one button with external pressed state for compact show or hide controls.
|
|
189
|
+
- title: Segmented multi-select primitive
|
|
190
|
+
notes: Use grouped buttons when composing a custom segmented row or when extending UiToggleGroup behavior.
|
|
191
|
+
|
|
192
|
+
examples:
|
|
193
|
+
- title: Standalone pressed state
|
|
194
|
+
goal: Build a toggleable filter button.
|
|
195
|
+
code: |
|
|
196
|
+
<UiToggleButton
|
|
197
|
+
:pressed="filtersOpened"
|
|
198
|
+
:aria-pressed="filtersOpened"
|
|
199
|
+
@click="filtersOpened = !filtersOpened"
|
|
200
|
+
>
|
|
201
|
+
Filters
|
|
202
|
+
</UiToggleButton>
|
|
203
|
+
|
|
204
|
+
ai_notes:
|
|
205
|
+
do:
|
|
206
|
+
- Treat pressed as a controlled visual state.
|
|
207
|
+
- Prefer UiToggleGroup when the task is multi-select segmented choice rather than a single primitive.
|
|
208
|
+
- Add explicit ARIA state when the button represents a semantic toggle.
|
|
209
|
+
avoid:
|
|
210
|
+
- Do not assume pressed updates automatically on click.
|
|
211
|
+
- Do not use UiToggleButton instead of UiButton for ordinary stateless actions.
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
component: UiToggleGroup
|
|
2
|
+
summary: >
|
|
3
|
+
UiToggleGroup is a segmented multi-select control built from toggle buttons. It is
|
|
4
|
+
designed for short always-visible choice sets such as weekdays, filters, or compact
|
|
5
|
+
mode flags where classic checkboxes would feel visually heavy. For richer option
|
|
6
|
+
markup, compose it with UiToggleGroupOption instead of relying only on the options array.
|
|
7
|
+
|
|
8
|
+
public_import:
|
|
9
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
10
|
+
named:
|
|
11
|
+
- UiToggleGroup
|
|
12
|
+
- UiToggleGroupOption
|
|
13
|
+
|
|
14
|
+
related_components:
|
|
15
|
+
- UiToggleButton
|
|
16
|
+
- UiCheckbox
|
|
17
|
+
- UiRadioSwitch
|
|
18
|
+
|
|
19
|
+
use_when:
|
|
20
|
+
- You need multiple independent selections from a short fixed set.
|
|
21
|
+
- You want checkbox-like semantics with segmented button visuals.
|
|
22
|
+
- You need a compact weekday picker, filter strip, or channel selector.
|
|
23
|
+
- You need object values and must compare them through equalFn.
|
|
24
|
+
|
|
25
|
+
avoid_when:
|
|
26
|
+
- You need exactly one selected value, use UiRadioSwitch or UiRadio instead.
|
|
27
|
+
- You need long lists, search, or popper-based selection, use UiSelect instead.
|
|
28
|
+
- You need classic visible checkbox affordances rather than segmented buttons.
|
|
29
|
+
|
|
30
|
+
api:
|
|
31
|
+
key_props:
|
|
32
|
+
- name: model
|
|
33
|
+
notes: Array of selected values.
|
|
34
|
+
- name: options
|
|
35
|
+
notes: Quick array-based declaration for simple label and value pairs.
|
|
36
|
+
- name: equalFn
|
|
37
|
+
notes: Important when option values are objects or other non-primitives.
|
|
38
|
+
- name: size
|
|
39
|
+
values:
|
|
40
|
+
- lg
|
|
41
|
+
- md
|
|
42
|
+
- sm
|
|
43
|
+
- xs
|
|
44
|
+
notes: Controls segment geometry through UiToggleButton sizing.
|
|
45
|
+
- name: rubber
|
|
46
|
+
notes: Keeps the root content-sized instead of stretching.
|
|
47
|
+
- name: disabled
|
|
48
|
+
notes: Disables the whole group.
|
|
49
|
+
props:
|
|
50
|
+
- name: ariaLabel
|
|
51
|
+
notes: Accessible name for the group root.
|
|
52
|
+
- name: ariaLabelledby
|
|
53
|
+
notes: External label reference for the group root.
|
|
54
|
+
- name: ariaDescribedby
|
|
55
|
+
notes: External description reference for the group root.
|
|
56
|
+
- name: ariaOrientation
|
|
57
|
+
values:
|
|
58
|
+
- horizontal
|
|
59
|
+
- vertical
|
|
60
|
+
notes: Orientation hint exposed on the root, defaults to horizontal.
|
|
61
|
+
child_components:
|
|
62
|
+
- name: UiToggleGroupOption
|
|
63
|
+
key_props:
|
|
64
|
+
- value
|
|
65
|
+
- label
|
|
66
|
+
- disabled
|
|
67
|
+
notes: Use it for manual option declaration, per-option slots, or richer values.
|
|
68
|
+
slots:
|
|
69
|
+
- name: default
|
|
70
|
+
zone: option tree
|
|
71
|
+
creates: Replaces array-based options with manually declared UiToggleGroupOption nodes.
|
|
72
|
+
accepts:
|
|
73
|
+
recommended:
|
|
74
|
+
- UiToggleGroupOption
|
|
75
|
+
avoid:
|
|
76
|
+
- arbitrary interactive descendants
|
|
77
|
+
- unrelated wrappers
|
|
78
|
+
notes: Use for richer per-option composition than the plain options array allows.
|
|
79
|
+
- name: icon
|
|
80
|
+
zone: shared option icon in options mode
|
|
81
|
+
notes: Used only when the options array mode renders generated options.
|
|
82
|
+
emits:
|
|
83
|
+
- name: change
|
|
84
|
+
payload: unknown[]
|
|
85
|
+
notes: Fired when the selected model changes.
|
|
86
|
+
- name: update:model
|
|
87
|
+
payload: unknown[]
|
|
88
|
+
notes: Main v-model channel for selected values.
|
|
89
|
+
|
|
90
|
+
rendered_structure:
|
|
91
|
+
descriptive_only: true
|
|
92
|
+
notes: >
|
|
93
|
+
UiToggleGroup currently renders one span root and a list of button-based option
|
|
94
|
+
shells. This section is for reasoning and debugging, not as a stable selector contract.
|
|
95
|
+
composition:
|
|
96
|
+
- span.ui-v1-toggle-group with role=toolbar by default
|
|
97
|
+
- UiToggleGroupOption children rendered as button roots with grouped toggle-button styling
|
|
98
|
+
- each option exposes checkbox-like role and checked state
|
|
99
|
+
root:
|
|
100
|
+
shape: span.ui-v1-toggle-group
|
|
101
|
+
tag: span
|
|
102
|
+
classes:
|
|
103
|
+
- .ui-v1-toggle-group
|
|
104
|
+
- .ui-v1-toggle-group_rubber
|
|
105
|
+
- .ui-v1-toggle-group_disabled
|
|
106
|
+
- .ui-v1-toggle-group_lg
|
|
107
|
+
- .ui-v1-toggle-group_md
|
|
108
|
+
- .ui-v1-toggle-group_sm
|
|
109
|
+
- .ui-v1-toggle-group_xs
|
|
110
|
+
|
|
111
|
+
geometry:
|
|
112
|
+
layout: inline-flex capable segmented row
|
|
113
|
+
root_display:
|
|
114
|
+
default: flex
|
|
115
|
+
rubber: inline-flex
|
|
116
|
+
width_behavior: stretches by default, content-sized with rubber
|
|
117
|
+
notes:
|
|
118
|
+
- The root uses a span tag, but its computed layout is flex-based rather than text-like.
|
|
119
|
+
- The root is flex-based and keeps adjacent segments visually merged.
|
|
120
|
+
- rubber keeps the group content-sized.
|
|
121
|
+
- Without rubber, the root behaves like a stretchable flex container.
|
|
122
|
+
- Size is shared across all segments through root-level CSS variables.
|
|
123
|
+
|
|
124
|
+
styling:
|
|
125
|
+
notes:
|
|
126
|
+
- Prefer size, rubber, disabled, and option-level props over selector overrides.
|
|
127
|
+
- The group root mainly controls shared sizing variables; per-segment visuals live in UiToggleButton.
|
|
128
|
+
root_classes:
|
|
129
|
+
- .ui-v1-toggle-group
|
|
130
|
+
state_classes:
|
|
131
|
+
- .ui-v1-toggle-group_rubber
|
|
132
|
+
- .ui-v1-toggle-group_disabled
|
|
133
|
+
- .ui-v1-toggle-group_lg
|
|
134
|
+
- .ui-v1-toggle-group_md
|
|
135
|
+
- .ui-v1-toggle-group_sm
|
|
136
|
+
- .ui-v1-toggle-group_xs
|
|
137
|
+
css_variables:
|
|
138
|
+
shared_segment_variables:
|
|
139
|
+
- name: --ui-v1-toggle-button-height
|
|
140
|
+
effect: Shared segment height for the selected group size.
|
|
141
|
+
- name: --ui-v1-toggle-button-min-width
|
|
142
|
+
effect: Shared segment minimum width.
|
|
143
|
+
- name: --ui-v1-toggle-button-padding-x
|
|
144
|
+
effect: Shared horizontal padding of each segment.
|
|
145
|
+
- name: --ui-v1-toggle-button-radius
|
|
146
|
+
effect: Shared edge radius for the grouped row.
|
|
147
|
+
- name: --ui-v1-toggle-button-icon-size
|
|
148
|
+
effect: Shared icon size of group options.
|
|
149
|
+
- name: --ui-v1-toggle-button-content-gap
|
|
150
|
+
effect: Shared gap between option icon and label.
|
|
151
|
+
|
|
152
|
+
behavior:
|
|
153
|
+
states:
|
|
154
|
+
- name: disabled
|
|
155
|
+
notes: Disables the whole group and all options.
|
|
156
|
+
- name: rubber
|
|
157
|
+
notes: Keeps the group sized to content.
|
|
158
|
+
- name: option disabled
|
|
159
|
+
notes: Individual disabled options stay visible but are not interactive.
|
|
160
|
+
selection_and_matching:
|
|
161
|
+
- The component is always multi-select.
|
|
162
|
+
- Clicking an enabled option toggles its presence in model.
|
|
163
|
+
- update:model and change are emitted together on every toggle.
|
|
164
|
+
- equalFn should usually be provided when values are objects.
|
|
165
|
+
- In options mode the component generates UiToggleGroupOption nodes internally.
|
|
166
|
+
keyboard:
|
|
167
|
+
- One tab stop is used for the whole group through roving tabindex.
|
|
168
|
+
- ArrowLeft, ArrowRight, ArrowUp, and ArrowDown move focus across enabled options.
|
|
169
|
+
- Home and End jump to the first or last enabled option.
|
|
170
|
+
- Space and Enter toggle the currently focused option.
|
|
171
|
+
- Disabled options are skipped by keyboard navigation.
|
|
172
|
+
|
|
173
|
+
accessibility:
|
|
174
|
+
notes:
|
|
175
|
+
- The root exposes role=toolbar by default and supports aria-label, aria-labelledby, aria-describedby, and aria-orientation.
|
|
176
|
+
- Each option exposes role=checkbox together with aria-checked and aria-disabled.
|
|
177
|
+
- The current implementation uses roving tabindex so only one option is tabbable at a time.
|
|
178
|
+
|
|
179
|
+
composition:
|
|
180
|
+
works_well_with:
|
|
181
|
+
- UiField
|
|
182
|
+
- UiToggleGroupOption
|
|
183
|
+
- compact filter rows
|
|
184
|
+
patterns:
|
|
185
|
+
- title: Weekday picker
|
|
186
|
+
notes: Use a short visible set of seven options with multi-select model.
|
|
187
|
+
- title: Filter chips with icon
|
|
188
|
+
notes: Use manual option composition or the shared icon slot for compact filters.
|
|
189
|
+
|
|
190
|
+
examples:
|
|
191
|
+
- title: Weekday selection
|
|
192
|
+
goal: Build a segmented multi-select weekday picker.
|
|
193
|
+
code: |
|
|
194
|
+
<UiToggleGroup
|
|
195
|
+
v-model:model="days"
|
|
196
|
+
aria-label="Weekdays"
|
|
197
|
+
rubber
|
|
198
|
+
>
|
|
199
|
+
<UiToggleGroupOption label="Mon" value="monday" />
|
|
200
|
+
<UiToggleGroupOption label="Tue" value="tuesday" />
|
|
201
|
+
<UiToggleGroupOption label="Wed" value="wednesday" />
|
|
202
|
+
</UiToggleGroup>
|
|
203
|
+
|
|
204
|
+
ai_notes:
|
|
205
|
+
do:
|
|
206
|
+
- Prefer options for simple text-only sets.
|
|
207
|
+
- Switch to UiToggleGroupOption when an option needs icon, custom label, or richer value handling.
|
|
208
|
+
- Add an accessible name through ariaLabel or ariaLabelledby.
|
|
209
|
+
avoid:
|
|
210
|
+
- Do not use UiToggleGroup for single-select flows.
|
|
211
|
+
- Do not treat internal .ui-v1-* classes as a stable extension styling API.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
component: UiToggleGroupOption
|
|
2
|
+
summary: >
|
|
3
|
+
UiToggleGroupOption is the declarative option child of UiToggleGroup. It is the
|
|
4
|
+
richer alternative to the plain options array and is used when one segment needs
|
|
5
|
+
custom icon, custom label markup, or a non-trivial value.
|
|
6
|
+
|
|
7
|
+
public_import:
|
|
8
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
|
+
named:
|
|
10
|
+
- UiToggleGroupOption
|
|
11
|
+
- UiToggleGroup
|
|
12
|
+
|
|
13
|
+
related_components:
|
|
14
|
+
- UiToggleGroup
|
|
15
|
+
- UiToggleButton
|
|
16
|
+
|
|
17
|
+
use_when:
|
|
18
|
+
- You need one manually declared option inside UiToggleGroup.
|
|
19
|
+
- One option needs icon slot or custom label markup.
|
|
20
|
+
- You need explicit per-option disabled state or rich values.
|
|
21
|
+
|
|
22
|
+
avoid_when:
|
|
23
|
+
- A simple options array on UiToggleGroup is enough.
|
|
24
|
+
- You need a standalone checkbox-like control outside UiToggleGroup.
|
|
25
|
+
|
|
26
|
+
api:
|
|
27
|
+
key_props:
|
|
28
|
+
- name: value
|
|
29
|
+
notes: Required option value.
|
|
30
|
+
- name: label
|
|
31
|
+
notes: Plain-text fallback label.
|
|
32
|
+
- name: disabled
|
|
33
|
+
notes: Marks this option as non-interactive.
|
|
34
|
+
props:
|
|
35
|
+
- name: id
|
|
36
|
+
notes: Optional explicit id, otherwise generated automatically.
|
|
37
|
+
- name: value
|
|
38
|
+
notes: Required and toggled in the parent group model.
|
|
39
|
+
- name: label
|
|
40
|
+
notes: Optional when label slot is used.
|
|
41
|
+
- name: disabled
|
|
42
|
+
notes: Excluded from toggling and keyboard navigation.
|
|
43
|
+
slots:
|
|
44
|
+
- name: default
|
|
45
|
+
zone: full option content
|
|
46
|
+
notes: Replaces the default icon plus label composition.
|
|
47
|
+
- name: icon
|
|
48
|
+
zone: leading icon
|
|
49
|
+
notes: Adds a custom icon before the label.
|
|
50
|
+
- name: label
|
|
51
|
+
zone: main label
|
|
52
|
+
notes: Overrides the plain label prop.
|
|
53
|
+
|
|
54
|
+
rendered_structure:
|
|
55
|
+
descriptive_only: true
|
|
56
|
+
notes: >
|
|
57
|
+
UiToggleGroupOption does not own the selection model. It is rendered inside
|
|
58
|
+
UiToggleGroup and becomes one grouped UiToggleButton with checkbox-like semantics.
|
|
59
|
+
root:
|
|
60
|
+
shape: button.ui-v1-toggle-button.ui-v1-toggle-button_grouped
|
|
61
|
+
tag: button
|
|
62
|
+
|
|
63
|
+
geometry:
|
|
64
|
+
layout: inline-flex grouped segment inside a flex row
|
|
65
|
+
root_display: inline-flex
|
|
66
|
+
width_behavior: flexible within the parent group row
|
|
67
|
+
notes:
|
|
68
|
+
- The option is not intended as a standalone layout primitive.
|
|
69
|
+
- Final width and edge radii are defined by the parent group composition.
|
|
70
|
+
|
|
71
|
+
behavior:
|
|
72
|
+
states:
|
|
73
|
+
- name: disabled
|
|
74
|
+
notes: Cannot be toggled and is skipped by keyboard navigation.
|
|
75
|
+
- name: checked
|
|
76
|
+
notes: Managed by the parent UiToggleGroup.
|
|
77
|
+
- name: focused
|
|
78
|
+
notes: Managed through the parent roving tabindex logic.
|
|
79
|
+
notes:
|
|
80
|
+
- Click toggles the option through the parent group.
|
|
81
|
+
- Space and Enter toggle the focused option.
|
|
82
|
+
- Arrow keys, Home, and End delegate focus movement through the parent group.
|
|
83
|
+
|
|
84
|
+
accessibility:
|
|
85
|
+
notes:
|
|
86
|
+
- The rendered option uses a native button root.
|
|
87
|
+
- The parent composition applies role=checkbox together with aria-checked and aria-disabled.
|
|
88
|
+
- The current implementation participates in roving tabindex managed by UiToggleGroup.
|
|
89
|
+
|
|
90
|
+
composition:
|
|
91
|
+
works_well_with:
|
|
92
|
+
- UiToggleGroup
|
|
93
|
+
patterns:
|
|
94
|
+
- title: Icon segment
|
|
95
|
+
notes: Use icon slot when one segment needs an icon before the label.
|
|
96
|
+
- title: Custom label content
|
|
97
|
+
notes: Use label or default slot when the option needs richer inline markup.
|
|
98
|
+
|
|
99
|
+
examples:
|
|
100
|
+
- title: Icon option inside a group
|
|
101
|
+
goal: Define one rich segmented option with icon content.
|
|
102
|
+
code: |
|
|
103
|
+
<UiToggleGroup v-model:model="filters" aria-label="Filters">
|
|
104
|
+
<UiToggleGroupOption label="Files" value="files">
|
|
105
|
+
<template #icon>
|
|
106
|
+
<IconFile />
|
|
107
|
+
</template>
|
|
108
|
+
</UiToggleGroupOption>
|
|
109
|
+
</UiToggleGroup>
|
|
110
|
+
|
|
111
|
+
ai_notes:
|
|
112
|
+
do:
|
|
113
|
+
- Use inside UiToggleGroup when one option needs richer content than the options array allows.
|
|
114
|
+
- Prefer label prop for plain text and slots for richer content.
|
|
115
|
+
avoid:
|
|
116
|
+
- Do not use it as a standalone control outside UiToggleGroup.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
component: UiToolbarButton
|
|
2
|
+
summary: >
|
|
3
|
+
UiToolbarButton is a compact button for toolbar zones. It shares action semantics with buttons
|
|
4
|
+
but is tuned for dense toolbar layouts.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiToolbarButton
|
|
10
|
+
|
|
11
|
+
use_when:
|
|
12
|
+
- You need a compact button in a toolbar or action strip.
|
|
13
|
+
|
|
14
|
+
avoid_when:
|
|
15
|
+
- You need the full visual weight of UiButton.
|
|
16
|
+
|
|
17
|
+
api:
|
|
18
|
+
emits:
|
|
19
|
+
- name: click
|
|
20
|
+
- name: focus
|
|
21
|
+
- name: blur
|
|
22
|
+
methods:
|
|
23
|
+
- name: click
|
|
24
|
+
- name: focus
|
|
25
|
+
- name: blur
|
|
26
|
+
|
|
27
|
+
rendered_structure:
|
|
28
|
+
descriptive_only: true
|
|
29
|
+
root:
|
|
30
|
+
shape: button.ui-v1-button or a.ui-v1-button via UiButton
|
|
31
|
+
tag: button or a
|
|
32
|
+
notes: The component delegates its actual root element and layout behavior to UiButton.
|
|
33
|
+
|
|
34
|
+
geometry:
|
|
35
|
+
layout: compact toolbar action
|
|
36
|
+
root_display: inline-block
|
|
37
|
+
width_behavior: content-sized by default
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
component: UiToolbarLink
|
|
2
|
+
summary: >
|
|
3
|
+
UiToolbarLink is a compact toolbar-oriented link. It is the link counterpart to UiToolbarButton.
|
|
4
|
+
|
|
5
|
+
public_import:
|
|
6
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
7
|
+
named:
|
|
8
|
+
- UiToolbarLink
|
|
9
|
+
|
|
10
|
+
use_when:
|
|
11
|
+
- You need a compact link in a toolbar area.
|
|
12
|
+
|
|
13
|
+
avoid_when:
|
|
14
|
+
- You need a regular inline content link.
|
|
15
|
+
|
|
16
|
+
api:
|
|
17
|
+
emits:
|
|
18
|
+
- name: click
|
|
19
|
+
- name: focus
|
|
20
|
+
- name: blur
|
|
21
|
+
|
|
22
|
+
rendered_structure:
|
|
23
|
+
descriptive_only: true
|
|
24
|
+
root:
|
|
25
|
+
shape: a.ui-v1-link via UiLink
|
|
26
|
+
tag: a
|
|
27
|
+
notes: The component delegates its actual root element and layout behavior to UiLink.
|
|
28
|
+
|
|
29
|
+
geometry:
|
|
30
|
+
layout: compact toolbar link
|
|
31
|
+
root_display: inline-flex
|
|
32
|
+
width_behavior: content-sized by default
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
component: UiTooltip
|
|
2
|
+
summary: >
|
|
3
|
+
UiTooltip is the tooltip-specialized floating layer built on top of popper mechanics.
|
|
4
|
+
Use it for compact helper content anchored to one target.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTooltip
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiPopper
|
|
13
|
+
- UiPopperConnector
|
|
14
|
+
- UiPopperTarget
|
|
15
|
+
|
|
16
|
+
use_when:
|
|
17
|
+
- You need compact helper text or tooltip content.
|
|
18
|
+
|
|
19
|
+
avoid_when:
|
|
20
|
+
- You need a dropdown or rich popup layout.
|
|
21
|
+
|
|
22
|
+
api:
|
|
23
|
+
key_props:
|
|
24
|
+
- name: visible
|
|
25
|
+
- name: placement
|
|
26
|
+
- name: targetTriggers
|
|
27
|
+
- name: popperTriggers
|
|
28
|
+
|
|
29
|
+
rendered_structure:
|
|
30
|
+
descriptive_only: true
|
|
31
|
+
root:
|
|
32
|
+
shape: div.ui-v1-popper via UiPopper
|
|
33
|
+
tag: div
|
|
34
|
+
notes: The component delegates the actual floating root to UiPopper and renders its content inside the popper body.
|
|
35
|
+
|
|
36
|
+
geometry:
|
|
37
|
+
layout: floating tooltip layer outside normal document flow
|
|
38
|
+
root_display: block
|
|
39
|
+
width_behavior: content-sized by tooltip content
|
|
40
|
+
|
|
41
|
+
ai_notes:
|
|
42
|
+
do:
|
|
43
|
+
- Use UiTooltip for tooltip semantics and UiPopper for lower-level floating behavior.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
component: UiTransition
|
|
2
|
+
summary: >
|
|
3
|
+
UiTransition is a transition wrapper for animated mount, unmount, and visibility flows.
|
|
4
|
+
Use it to express motion without switching to raw transition markup.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTransition
|
|
10
|
+
|
|
11
|
+
use_when:
|
|
12
|
+
- You need transition behavior around content.
|
|
13
|
+
|
|
14
|
+
avoid_when:
|
|
15
|
+
- You need static content with no transition behavior.
|
|
16
|
+
|
|
17
|
+
rendered_structure:
|
|
18
|
+
descriptive_only: true
|
|
19
|
+
root:
|
|
20
|
+
shape: no persistent DOM root
|
|
21
|
+
tag: none
|
|
22
|
+
notes: The component is a thin wrapper around the native Vue transition and forwards its slot content.
|
|
23
|
+
|
|
24
|
+
geometry:
|
|
25
|
+
layout: no standalone layout of its own
|
|
26
|
+
root_display: none
|
|
27
|
+
width_behavior: defined entirely by the transitioned child
|