@retailcrm/embed-ui-v1-components 0.9.15 → 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.
Files changed (70) hide show
  1. package/assets/sprites/map-and-places/navigate.svg +3 -0
  2. package/dist/host.cjs +993 -516
  3. package/dist/host.css +261 -0
  4. package/dist/host.d.ts +222 -112
  5. package/dist/host.js +993 -516
  6. package/dist/remote.cjs +446 -60
  7. package/dist/remote.d.ts +573 -81
  8. package/dist/remote.js +447 -61
  9. package/docs/COMPONENTS.md +3 -0
  10. package/docs/FORMAT.md +19 -0
  11. package/docs/PROFILES.md +2 -0
  12. package/docs/profiles/UiAddButton.yml +12 -0
  13. package/docs/profiles/UiAlert.yml +12 -0
  14. package/docs/profiles/UiAvatar.yml +12 -0
  15. package/docs/profiles/UiAvatarList.yml +12 -0
  16. package/docs/profiles/UiButton.yml +8 -0
  17. package/docs/profiles/UiCalendar.yml +12 -0
  18. package/docs/profiles/UiCheckbox.yml +12 -0
  19. package/docs/profiles/UiCollapse.yml +12 -0
  20. package/docs/profiles/UiCollapseBox.yml +12 -0
  21. package/docs/profiles/UiCollapseGroup.yml +12 -0
  22. package/docs/profiles/UiCopyButton.yml +12 -0
  23. package/docs/profiles/UiDate.yml +12 -0
  24. package/docs/profiles/UiDatePicker.yml +12 -0
  25. package/docs/profiles/UiError.yml +12 -0
  26. package/docs/profiles/UiField.yml +5 -1
  27. package/docs/profiles/UiImage.yml +12 -0
  28. package/docs/profiles/UiInfobox.yml +12 -0
  29. package/docs/profiles/UiLink.yml +12 -0
  30. package/docs/profiles/UiLoader.yml +12 -0
  31. package/docs/profiles/UiMenuItem.yml +12 -0
  32. package/docs/profiles/UiMenuItemGroup.yml +12 -0
  33. package/docs/profiles/UiModalSidebar.yml +12 -0
  34. package/docs/profiles/UiModalWindow.yml +12 -0
  35. package/docs/profiles/UiModalWindowSurface.yml +12 -0
  36. package/docs/profiles/UiNumberStepper.yml +12 -0
  37. package/docs/profiles/UiPageHeader.yml +5 -1
  38. package/docs/profiles/UiPopper.yml +5 -1
  39. package/docs/profiles/UiPopperConnector.yml +6 -0
  40. package/docs/profiles/UiPopperTarget.yml +6 -0
  41. package/docs/profiles/UiRadio.yml +12 -0
  42. package/docs/profiles/UiRadioSwitch.yml +7 -0
  43. package/docs/profiles/UiRadioSwitchOption.yml +8 -0
  44. package/docs/profiles/UiScrollBox.yml +12 -0
  45. package/docs/profiles/UiSelect.yml +9 -0
  46. package/docs/profiles/UiSelectOption.yml +12 -0
  47. package/docs/profiles/UiSelectOptionGroup.yml +12 -0
  48. package/docs/profiles/UiSlider.yml +12 -0
  49. package/docs/profiles/UiSwitch.yml +12 -0
  50. package/docs/profiles/UiTab.yml +5 -0
  51. package/docs/profiles/UiTabGroup.yml +5 -0
  52. package/docs/profiles/UiTable.yml +5 -1
  53. package/docs/profiles/UiTableBodyCell.yml +12 -0
  54. package/docs/profiles/UiTableColumn.yml +12 -0
  55. package/docs/profiles/UiTableFooterButton.yml +12 -0
  56. package/docs/profiles/UiTableFooterSection.yml +12 -0
  57. package/docs/profiles/UiTableHeadCell.yml +12 -0
  58. package/docs/profiles/UiTableSorter.yml +12 -0
  59. package/docs/profiles/UiTag.yml +12 -0
  60. package/docs/profiles/UiTextbox.yml +5 -1
  61. package/docs/profiles/UiTimePicker.yml +12 -0
  62. package/docs/profiles/UiToggleButton.yml +211 -0
  63. package/docs/profiles/UiToggleGroup.yml +211 -0
  64. package/docs/profiles/UiToggleGroupOption.yml +116 -0
  65. package/docs/profiles/UiToolbarButton.yml +12 -0
  66. package/docs/profiles/UiToolbarLink.yml +12 -0
  67. package/docs/profiles/UiTooltip.yml +12 -0
  68. package/docs/profiles/UiTransition.yml +12 -0
  69. package/docs/profiles/UiYandexMap.yml +12 -0
  70. package/package.json +2 -2
@@ -96,6 +96,9 @@ rendered_structure:
96
96
  The component renders as one radiogroup root and a list of option shells with
97
97
  radio semantics. This section is for mental modeling and debugging, not as a
98
98
  stable styling contract.
99
+ root:
100
+ shape: div.ui-v1-radio-switch
101
+ tag: div
99
102
  composition:
100
103
  - UiRadioSwitch root with role=radiogroup
101
104
  - UiRadioSwitchOption shells with role=radio
@@ -112,6 +115,10 @@ rendered_structure:
112
115
 
113
116
  geometry:
114
117
  layout: flex row for default mode, wrapping card row for section mode
118
+ root_display:
119
+ default: flex
120
+ rubber: inline-flex
121
+ width_behavior: stretches by default, content-sized with rubber
115
122
  notes:
116
123
  - Default appearance behaves like a segmented control with adjacent options.
117
124
  - Section appearance removes the outer border and lets cards wrap to a new line.
@@ -62,10 +62,18 @@ api:
62
62
 
63
63
  rendered_structure:
64
64
  descriptive_only: true
65
+ root:
66
+ shape: div.ui-v1-radio-switch-option
67
+ tag: div
65
68
  notes: >
66
69
  UiRadioSwitchOption does not own the whole selection model. It is rendered inside
67
70
  UiRadioSwitch and becomes one radio node within the parent radiogroup.
68
71
 
72
+ geometry:
73
+ layout: segmented option shell or card-like option
74
+ root_display: flex
75
+ width_behavior: flexible within the parent group layout
76
+
69
77
  behavior:
70
78
  states:
71
79
  - name: disabled
@@ -17,3 +17,15 @@ avoid_when:
17
17
 
18
18
  api:
19
19
  key_props: []
20
+
21
+ rendered_structure:
22
+ descriptive_only: true
23
+ root:
24
+ shape: configurable wrapper tag or PerfectScrollbar root
25
+ tag: configurable, div by default
26
+ notes: The root depends on native mode and tag prop, but behaves as a scroll container rather than a visual primitive.
27
+
28
+ geometry:
29
+ layout: scroll container
30
+ root_display: block
31
+ width_behavior: stretches to the size of its layout context
@@ -143,6 +143,11 @@ rendered_structure:
143
143
  descriptive_only: true
144
144
  notes: >
145
145
  Select is not a single DOM node in practice. Trigger and dropdown live in separate layers.
146
+ root:
147
+ trigger_shape: div.ui-v1-select
148
+ trigger_tag: div
149
+ dropdown_shape: div.ui-v1-select__popper via UiPopper
150
+ dropdown_tag: div
146
151
  composition:
147
152
  - UiPopperConnector as shared context
148
153
  - UiSelectTrigger as textbox-like trigger
@@ -158,6 +163,10 @@ rendered_structure:
158
163
  geometry:
159
164
  trigger_layout: textbox-like, fit-content, max-width 100%
160
165
  dropdown_layout: popper layer outside normal document flow
166
+ root_display:
167
+ trigger: block
168
+ dropdown: block in a floating layer
169
+ width_behavior: trigger is content-sized with max-width 100%, dropdown follows content and popperFitTrigger rules
161
170
  notes:
162
171
  - The trigger behaves visually like a textbox.
163
172
  - The dropdown is rendered in a popper layer outside normal flow.
@@ -27,6 +27,18 @@ api:
27
27
  - name: counter
28
28
  - name: accent
29
29
 
30
+ rendered_structure:
31
+ descriptive_only: true
32
+ root:
33
+ shape: div.ui-v1-select-option
34
+ tag: div
35
+ notes: Renders one option wrapper that usually contains a UiMenuItem row.
36
+
37
+ geometry:
38
+ layout: listbox option row
39
+ root_display: block
40
+ width_behavior: stretches to available dropdown width
41
+
30
42
  ai_notes:
31
43
  do:
32
44
  - Use as the default child node of UiSelect.
@@ -21,6 +21,18 @@ api:
21
21
  key_props:
22
22
  - name: label
23
23
 
24
+ rendered_structure:
25
+ descriptive_only: true
26
+ root:
27
+ shape: div.ui-v1-select-option-group
28
+ tag: div
29
+ notes: Renders one structural group wrapper around a heading area and nested option content.
30
+
31
+ geometry:
32
+ layout: block-like option group wrapper
33
+ root_display: block
34
+ width_behavior: stretches to available dropdown width
35
+
24
36
  ai_notes:
25
37
  do:
26
38
  - Use to structure large option lists inside UiSelect.
@@ -24,3 +24,15 @@ api:
24
24
  - name: labelled
25
25
  emits:
26
26
  - name: update:value
27
+
28
+ rendered_structure:
29
+ descriptive_only: true
30
+ root:
31
+ shape: div.ui-v1-slider
32
+ tag: div
33
+ notes: The root contains labels, track, filler, and draggable handle nodes.
34
+
35
+ geometry:
36
+ layout: horizontal slider track
37
+ root_display: flex
38
+ width_behavior: stretches to container width by default
@@ -23,3 +23,15 @@ api:
23
23
  - name: click
24
24
  - name: focus
25
25
  - name: blur
26
+
27
+ rendered_structure:
28
+ descriptive_only: true
29
+ root:
30
+ shape: span.ui-v1-switch
31
+ tag: span
32
+ notes: The root is one compact inline switch control.
33
+
34
+ geometry:
35
+ layout: inline switch control
36
+ root_display: inline-block
37
+ width_behavior: content-sized by default
@@ -57,6 +57,9 @@ api:
57
57
 
58
58
  rendered_structure:
59
59
  descriptive_only: true
60
+ root:
61
+ shape: no standalone DOM root
62
+ tag: none
60
63
  notes: >
61
64
  UiTab is a structural declaration rather than a standalone DOM component. The
62
65
  parent UiTabGroup resolves UiTab children and renders the actual tab buttons,
@@ -64,6 +67,8 @@ rendered_structure:
64
67
 
65
68
  geometry:
66
69
  layout: no standalone layout, interpreted by UiTabGroup
70
+ root_display: none
71
+ width_behavior: no standalone width behavior of its own
67
72
  notes:
68
73
  - UiTab itself should not be used outside UiTabGroup.
69
74
  - Icon-only tabs are inferred when icon exists but label and counter do not.
@@ -101,6 +101,9 @@ rendered_structure:
101
101
  UiTabGroup renders a header row, a visible tablist region, an optional overflow
102
102
  trigger with popper menu, and an optional tabpanel for the active UiTab content.
103
103
  Class names are useful for debugging, not as a guaranteed public styling API.
104
+ root:
105
+ shape: div.ui-v1-tab-group
106
+ tag: div
104
107
  composition:
105
108
  - .ui-v1-tab-group root
106
109
  - .ui-v1-tab-group__head with role=tablist region
@@ -119,6 +122,8 @@ rendered_structure:
119
122
 
120
123
  geometry:
121
124
  layout: block-level group with full-width header and optional content panel
125
+ root_display: block
126
+ width_behavior: stretches to container width by default
122
127
  notes:
123
128
  - The group itself stretches to width 100%.
124
129
  - The visible header keeps tabs on one row.
@@ -52,7 +52,9 @@ api:
52
52
 
53
53
  rendered_structure:
54
54
  descriptive_only: true
55
- root: .ui-v1-table
55
+ root:
56
+ shape: table.ui-v1-table
57
+ tag: table
56
58
  zones:
57
59
  - .ui-v1-table__section_head
58
60
  - .ui-v1-table__section_body
@@ -66,7 +68,9 @@ rendered_structure:
66
68
 
67
69
  geometry:
68
70
  layout: block-width table
71
+ root_display: table
69
72
  width: 100%
73
+ width_behavior: stretches to container width by default
70
74
  notes:
71
75
  - Root fills available width.
72
76
  - fixed=true switches table-layout from auto to fixed.
@@ -28,6 +28,18 @@ api:
28
28
  - name: trim
29
29
  - name: theme
30
30
 
31
+ rendered_structure:
32
+ descriptive_only: true
33
+ root:
34
+ shape: td.ui-v1-table__body-cell
35
+ tag: td
36
+ notes: The component renders one table body cell.
37
+
38
+ geometry:
39
+ layout: table cell
40
+ root_display: table-cell
41
+ width_behavior: controlled by table layout and column sizing
42
+
31
43
  ai_notes:
32
44
  do:
33
45
  - Keep it inside UiTable row composition.
@@ -36,3 +36,15 @@ api:
36
36
  - name: label
37
37
  zone: header-label
38
38
  creates: Header label content.
39
+
40
+ rendered_structure:
41
+ descriptive_only: true
42
+ root:
43
+ shape: col
44
+ tag: col
45
+ notes: The component renders one structural table column node.
46
+
47
+ geometry:
48
+ layout: structural table column
49
+ root_display: table-column
50
+ width_behavior: controlled by table layout and width props on the parent table
@@ -25,6 +25,18 @@ api:
25
25
  emits:
26
26
  - name: click
27
27
 
28
+ rendered_structure:
29
+ descriptive_only: true
30
+ root:
31
+ shape: button.ui-v1-table__footer-button
32
+ tag: button
33
+ notes: The visible label is wrapped in an inner inline-flex content span.
34
+
35
+ geometry:
36
+ layout: inline footer action
37
+ root_display: inline-block
38
+ width_behavior: content-sized by label content
39
+
28
40
  ai_notes:
29
41
  do:
30
42
  - Keep it in table footer usage.
@@ -19,6 +19,18 @@ avoid_when:
19
19
  - UiTable footer slots already solve the layout.
20
20
  - You do not need explicit footer structure.
21
21
 
22
+ rendered_structure:
23
+ descriptive_only: true
24
+ root:
25
+ shape: div.ui-v1-table__footer-section
26
+ tag: div
27
+ notes: Renders one footer section wrapper inside the table footer controls area.
28
+
29
+ geometry:
30
+ layout: footer meta or control section
31
+ root_display: block
32
+ width_behavior: content-sized within the footer flex row
33
+
22
34
  ai_notes:
23
35
  do:
24
36
  - Use it only as part of custom table footer composition.
@@ -25,6 +25,18 @@ api:
25
25
  - name: align
26
26
  - name: trim
27
27
 
28
+ rendered_structure:
29
+ descriptive_only: true
30
+ root:
31
+ shape: th.ui-v1-table__head-cell
32
+ tag: th
33
+ notes: The component renders one table head cell.
34
+
35
+ geometry:
36
+ layout: table header cell
37
+ root_display: table-cell
38
+ width_behavior: controlled by table layout and column sizing
39
+
28
40
  ai_notes:
29
41
  do:
30
42
  - Prefer UiTableColumn first for regular table headers.
@@ -26,6 +26,18 @@ api:
26
26
  emits:
27
27
  - name: click
28
28
 
29
+ rendered_structure:
30
+ descriptive_only: true
31
+ root:
32
+ shape: button.ui-v1-table__sorter
33
+ tag: button
34
+ notes: The root contains the label and sort icon as one inline control.
35
+
36
+ geometry:
37
+ layout: inline sorting control
38
+ root_display: inline-flex
39
+ width_behavior: content-sized by label and icon
40
+
29
41
  ai_notes:
30
42
  do:
31
43
  - Pair it with explicit sort state in screen logic.
@@ -27,3 +27,15 @@ api:
27
27
  - name: focus
28
28
  - name: blur
29
29
  - name: remove
30
+
31
+ rendered_structure:
32
+ descriptive_only: true
33
+ root:
34
+ shape: div.ui-v1-tag-wrapper
35
+ tag: div
36
+ notes: The public root is a wrapper div; the visible pill itself is the nested .ui-v1-tag node.
37
+
38
+ geometry:
39
+ layout: wrapper around a content-sized tag pill
40
+ root_display: block
41
+ width_behavior: root follows normal block flow, inner tag stays content-sized
@@ -193,7 +193,9 @@ rendered_structure:
193
193
  This is a descriptive model of the current implementation for reasoning and debugging,
194
194
  not a guaranteed DOM API. The root is span-based, so UiTextbox should be treated as
195
195
  an inline control rather than a block wrapper.
196
- root: span.ui-v1-textbox
196
+ root:
197
+ shape: span.ui-v1-textbox
198
+ tag: span
197
199
  zones:
198
200
  - span.ui-v1-textbox__prefix
199
201
  - span.ui-v1-textbox__icon.ui-v1-textbox__icon_leading
@@ -205,7 +207,9 @@ rendered_structure:
205
207
 
206
208
  geometry:
207
209
  layout: inline-flex
210
+ root_display: inline-flex
208
211
  width: fit-content
212
+ width_behavior: content-sized with max-width 100%
209
213
  max_width: 100%
210
214
  notes:
211
215
  - Root behaves as a span-based inline-flex group around the actual control.
@@ -32,3 +32,15 @@ api:
32
32
  - name: open
33
33
  - name: close
34
34
  - name: focus
35
+
36
+ rendered_structure:
37
+ descriptive_only: true
38
+ root:
39
+ shape: div.ui-v1-time-picker
40
+ tag: div
41
+ notes: The root is a combobox wrapper around the textbox-like trigger and the popper-based listbox.
42
+
43
+ geometry:
44
+ layout: combobox wrapper with floating menu
45
+ root_display: block
46
+ width_behavior: follows normal block flow for the wrapper, with a floating dropdown layer
@@ -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.