@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,44 @@
|
|
|
1
|
+
component: UiTableHeadCell
|
|
2
|
+
summary: >
|
|
3
|
+
UiTableHeadCell is the low-level table header cell primitive used inside UiTable head rows.
|
|
4
|
+
Use it only when you build custom table structure from public table parts.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTableHeadCell
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiTable
|
|
13
|
+
- UiTableSorter
|
|
14
|
+
|
|
15
|
+
use_when:
|
|
16
|
+
- You compose a custom table head with public table primitives.
|
|
17
|
+
- You need header-cell alignment or trim control outside UiTableColumn defaults.
|
|
18
|
+
|
|
19
|
+
avoid_when:
|
|
20
|
+
- UiTableColumn already covers the header rendering you need.
|
|
21
|
+
- You are not building custom table markup.
|
|
22
|
+
|
|
23
|
+
api:
|
|
24
|
+
key_props:
|
|
25
|
+
- name: align
|
|
26
|
+
- name: trim
|
|
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
|
+
|
|
40
|
+
ai_notes:
|
|
41
|
+
do:
|
|
42
|
+
- Prefer UiTableColumn first for regular table headers.
|
|
43
|
+
avoid:
|
|
44
|
+
- Do not use it as a generic container outside table head rows.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
component: UiTableSorter
|
|
2
|
+
summary: >
|
|
3
|
+
UiTableSorter is a compact sort control primitive for custom table head content.
|
|
4
|
+
Use it when header rendering is composed manually and sorting state must be shown explicitly.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTableSorter
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiTable
|
|
13
|
+
- UiTableHeadCell
|
|
14
|
+
|
|
15
|
+
use_when:
|
|
16
|
+
- You build a custom sortable header with table primitives.
|
|
17
|
+
- You need to show asc or desc state explicitly in header content.
|
|
18
|
+
|
|
19
|
+
avoid_when:
|
|
20
|
+
- Sorting is not part of the table interaction.
|
|
21
|
+
- UiTableColumn label rendering is enough.
|
|
22
|
+
|
|
23
|
+
api:
|
|
24
|
+
key_props:
|
|
25
|
+
- name: direction
|
|
26
|
+
emits:
|
|
27
|
+
- name: click
|
|
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
|
+
|
|
41
|
+
ai_notes:
|
|
42
|
+
do:
|
|
43
|
+
- Pair it with explicit sort state in screen logic.
|
|
44
|
+
avoid:
|
|
45
|
+
- Do not use it as a generic icon-only control outside table headers.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
component: UiTag
|
|
2
|
+
summary: >
|
|
3
|
+
UiTag is a compact label or status pill. It can be interactive, removable, pinned, or visually saturated.
|
|
4
|
+
|
|
5
|
+
public_import:
|
|
6
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
7
|
+
named:
|
|
8
|
+
- UiTag
|
|
9
|
+
|
|
10
|
+
use_when:
|
|
11
|
+
- You need a short status or label pill.
|
|
12
|
+
- You need removable or interactive tags.
|
|
13
|
+
|
|
14
|
+
avoid_when:
|
|
15
|
+
- You need a full button or link.
|
|
16
|
+
|
|
17
|
+
api:
|
|
18
|
+
key_props:
|
|
19
|
+
- name: size
|
|
20
|
+
- name: pinned
|
|
21
|
+
- name: removable
|
|
22
|
+
- name: interactive
|
|
23
|
+
- name: saturated
|
|
24
|
+
- name: background
|
|
25
|
+
emits:
|
|
26
|
+
- name: click
|
|
27
|
+
- name: focus
|
|
28
|
+
- name: blur
|
|
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
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
component: UiTextbox
|
|
2
|
+
summary: >
|
|
3
|
+
UiTextbox is the base text and numeric input component. It covers single-line input,
|
|
4
|
+
textarea mode, numeric and decimal input, plus prefix, suffix, icon zones, and a clear action.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTextbox
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiField
|
|
13
|
+
- UiPageHeader
|
|
14
|
+
- UiSelect
|
|
15
|
+
|
|
16
|
+
use_when:
|
|
17
|
+
- You need a standard text input.
|
|
18
|
+
- You need search, email, phone, url, or password input.
|
|
19
|
+
- You need decimal or numeric input without a separate stepper.
|
|
20
|
+
- You need a multiline control in the same visual language.
|
|
21
|
+
- You need an input that composes well with UiField and inline editing.
|
|
22
|
+
|
|
23
|
+
avoid_when:
|
|
24
|
+
- You need value selection, not free-form input.
|
|
25
|
+
- You need explicit increment and decrement UX.
|
|
26
|
+
- You need advanced formatting beyond the prefix or suffix model.
|
|
27
|
+
|
|
28
|
+
api:
|
|
29
|
+
key_props:
|
|
30
|
+
- name: value
|
|
31
|
+
notes: Main control value, usually via v-model:value.
|
|
32
|
+
- name: placeholder
|
|
33
|
+
notes: Placeholder for empty state.
|
|
34
|
+
- name: type
|
|
35
|
+
notes: Input type for single-line mode.
|
|
36
|
+
- name: inputmode
|
|
37
|
+
notes: >
|
|
38
|
+
High-signal prop for numeric and decimal behavior. It changes not only keyboard hints
|
|
39
|
+
but also the actual input handling rules.
|
|
40
|
+
- name: clearable
|
|
41
|
+
notes: Shows a clear button when the value is not empty.
|
|
42
|
+
- name: invalid
|
|
43
|
+
notes: Enables error state and aria-invalid.
|
|
44
|
+
- name: multiline
|
|
45
|
+
notes: Switches the component to textarea mode.
|
|
46
|
+
- name: outlined
|
|
47
|
+
notes: Enables or disables textbox chrome. Often false in embedded scenarios.
|
|
48
|
+
- name: autofit
|
|
49
|
+
notes: Shrinks or grows to content width and is useful for inline editing.
|
|
50
|
+
props:
|
|
51
|
+
- name: id
|
|
52
|
+
notes: Identifier for the actual input or textarea.
|
|
53
|
+
- name: max
|
|
54
|
+
notes: Used in numeric or decimal scenarios.
|
|
55
|
+
- name: min
|
|
56
|
+
notes: Controls whether negative values are allowed in decimal mode.
|
|
57
|
+
- name: step
|
|
58
|
+
notes: Step for ArrowUp and ArrowDown in decimal mode.
|
|
59
|
+
- name: required
|
|
60
|
+
notes: Forwarded to the native control.
|
|
61
|
+
- name: autocomplete
|
|
62
|
+
notes: Forwarded to the actual input.
|
|
63
|
+
- name: maxlength
|
|
64
|
+
notes: Limits input length.
|
|
65
|
+
- name: decimals
|
|
66
|
+
notes: Limits the number of decimal places in decimal mode.
|
|
67
|
+
- name: size
|
|
68
|
+
notes: Affects height, paddings, and typography.
|
|
69
|
+
- name: prefix
|
|
70
|
+
notes: String shortcut for the prefix zone.
|
|
71
|
+
- name: suffix
|
|
72
|
+
notes: String shortcut for the suffix zone.
|
|
73
|
+
- name: active
|
|
74
|
+
notes: Enables active-like visual styling.
|
|
75
|
+
- name: autofocus
|
|
76
|
+
notes: Focuses the control after mount.
|
|
77
|
+
- name: autoselect
|
|
78
|
+
notes: Selects the current value on focus.
|
|
79
|
+
- name: readonly
|
|
80
|
+
notes: Blocks editing while keeping the value visible.
|
|
81
|
+
- name: disabled
|
|
82
|
+
notes: Disables interaction completely.
|
|
83
|
+
- name: rows
|
|
84
|
+
notes: Used in multiline mode.
|
|
85
|
+
- name: cols
|
|
86
|
+
notes: Used in multiline mode.
|
|
87
|
+
- name: inputAttributes
|
|
88
|
+
notes: Main path for aria-* and native attributes.
|
|
89
|
+
slots:
|
|
90
|
+
- name: prefix
|
|
91
|
+
zone: before-control
|
|
92
|
+
creates: A dedicated leading zone before the control.
|
|
93
|
+
accepts:
|
|
94
|
+
recommended:
|
|
95
|
+
- plain text
|
|
96
|
+
- span
|
|
97
|
+
- svg
|
|
98
|
+
- icon component
|
|
99
|
+
avoid:
|
|
100
|
+
- div
|
|
101
|
+
- block layout container
|
|
102
|
+
- interactive controls
|
|
103
|
+
notes: >
|
|
104
|
+
In outlined mode, the prefix becomes a separate visual segment before the input.
|
|
105
|
+
- name: leading-icon
|
|
106
|
+
zone: before-control
|
|
107
|
+
creates: A dedicated icon zone before the control.
|
|
108
|
+
accepts:
|
|
109
|
+
recommended:
|
|
110
|
+
- svg
|
|
111
|
+
- icon component
|
|
112
|
+
- span
|
|
113
|
+
avoid:
|
|
114
|
+
- div
|
|
115
|
+
- large text blocks
|
|
116
|
+
notes: Intended for a single icon-like node rather than arbitrary layout.
|
|
117
|
+
- name: trailing-icon
|
|
118
|
+
zone: after-control
|
|
119
|
+
creates: A dedicated icon zone after the control.
|
|
120
|
+
accepts:
|
|
121
|
+
recommended:
|
|
122
|
+
- svg
|
|
123
|
+
- icon component
|
|
124
|
+
- span
|
|
125
|
+
avoid:
|
|
126
|
+
- div
|
|
127
|
+
- form controls
|
|
128
|
+
notes: Good for status icons or compact indicators.
|
|
129
|
+
- name: suffix
|
|
130
|
+
zone: after-control
|
|
131
|
+
creates: A dedicated trailing zone after the control.
|
|
132
|
+
accepts:
|
|
133
|
+
recommended:
|
|
134
|
+
- plain text
|
|
135
|
+
- span
|
|
136
|
+
- svg
|
|
137
|
+
- icon component
|
|
138
|
+
avoid:
|
|
139
|
+
- div
|
|
140
|
+
- block layout container
|
|
141
|
+
- nested input
|
|
142
|
+
notes: >
|
|
143
|
+
In outlined mode, the suffix becomes a separate trailing gray segment after the input.
|
|
144
|
+
emits:
|
|
145
|
+
- name: update:value
|
|
146
|
+
payload: string | number | null
|
|
147
|
+
notes: Main value update channel.
|
|
148
|
+
- name: update:focused
|
|
149
|
+
payload: boolean
|
|
150
|
+
notes: Focus state update.
|
|
151
|
+
- name: input
|
|
152
|
+
payload: Event
|
|
153
|
+
notes: Native input event.
|
|
154
|
+
- name: change
|
|
155
|
+
payload: Event
|
|
156
|
+
notes: Native change event.
|
|
157
|
+
- name: keydown
|
|
158
|
+
payload: KeyboardEvent
|
|
159
|
+
notes: Forwarded from the input or textarea.
|
|
160
|
+
- name: paste
|
|
161
|
+
payload: ClipboardEvent
|
|
162
|
+
notes: Forwarded without extra semantics.
|
|
163
|
+
- name: focus
|
|
164
|
+
payload: FocusEvent
|
|
165
|
+
notes: Fired when the actual control is focused.
|
|
166
|
+
- name: blur
|
|
167
|
+
payload: FocusEvent
|
|
168
|
+
notes: Fired when the actual control loses focus.
|
|
169
|
+
- name: clear
|
|
170
|
+
payload: undefined
|
|
171
|
+
notes: Fired when the clear action is used.
|
|
172
|
+
methods:
|
|
173
|
+
- name: focus
|
|
174
|
+
notes: Focuses the actual control.
|
|
175
|
+
- name: blur
|
|
176
|
+
notes: Removes focus from the actual control.
|
|
177
|
+
- name: select
|
|
178
|
+
notes: Selects the current value.
|
|
179
|
+
- name: clear
|
|
180
|
+
notes: Clears the current value.
|
|
181
|
+
- name: insert
|
|
182
|
+
notes: Inserts text at the current cursor position.
|
|
183
|
+
- name: getSelectionStart
|
|
184
|
+
notes: Returns the start of the current selection.
|
|
185
|
+
- name: getSelectionEnd
|
|
186
|
+
notes: Returns the end of the current selection.
|
|
187
|
+
- name: setSelectionRange
|
|
188
|
+
notes: Controls selection programmatically.
|
|
189
|
+
|
|
190
|
+
rendered_structure:
|
|
191
|
+
descriptive_only: true
|
|
192
|
+
notes: >
|
|
193
|
+
This is a descriptive model of the current implementation for reasoning and debugging,
|
|
194
|
+
not a guaranteed DOM API. The root is span-based, so UiTextbox should be treated as
|
|
195
|
+
an inline control rather than a block wrapper.
|
|
196
|
+
root:
|
|
197
|
+
shape: span.ui-v1-textbox
|
|
198
|
+
tag: span
|
|
199
|
+
zones:
|
|
200
|
+
- span.ui-v1-textbox__prefix
|
|
201
|
+
- span.ui-v1-textbox__icon.ui-v1-textbox__icon_leading
|
|
202
|
+
- input or textarea
|
|
203
|
+
- span.ui-v1-textbox__placeholder for autofit mirror
|
|
204
|
+
- button.ui-v1-textbox__eraser
|
|
205
|
+
- span.ui-v1-textbox__icon.ui-v1-textbox__icon_trailing
|
|
206
|
+
- span.ui-v1-textbox__suffix
|
|
207
|
+
|
|
208
|
+
geometry:
|
|
209
|
+
layout: inline-flex
|
|
210
|
+
root_display: inline-flex
|
|
211
|
+
width: fit-content
|
|
212
|
+
width_behavior: content-sized with max-width 100%
|
|
213
|
+
max_width: 100%
|
|
214
|
+
notes:
|
|
215
|
+
- Root behaves as a span-based inline-flex group around the actual control.
|
|
216
|
+
- Size affects height, paddings, and typography.
|
|
217
|
+
- outlined=false removes the standard textbox frame and is common in embedded flows such as UiPageHeader.
|
|
218
|
+
- autofit=true adjusts width to content but still respects max-width on the root.
|
|
219
|
+
- Prefix, suffix, and icon slots affect internal layout but not the component's semantic role.
|
|
220
|
+
- Do not treat UiTextbox as a generic block container.
|
|
221
|
+
- If you need full-width behavior, provide width through layout context or explicit style.
|
|
222
|
+
|
|
223
|
+
styling:
|
|
224
|
+
notes:
|
|
225
|
+
- Main visual chrome lives on the root span.
|
|
226
|
+
- Prefer props like size, outlined, invalid, active, and autofit before custom CSS.
|
|
227
|
+
- Classes below are useful for reasoning and debugging, not a stable public styling API.
|
|
228
|
+
- Block-layout behavior should come from the parent layout, not from UiTextbox itself.
|
|
229
|
+
root_classes:
|
|
230
|
+
- .ui-v1-textbox
|
|
231
|
+
state_classes:
|
|
232
|
+
- .ui-v1-textbox_invalid
|
|
233
|
+
- .ui-v1-textbox_active
|
|
234
|
+
- .ui-v1-textbox_outlined
|
|
235
|
+
- .ui-v1-textbox_xs
|
|
236
|
+
- .ui-v1-textbox_md
|
|
237
|
+
- .ui-v1-textbox_lg
|
|
238
|
+
- .ui-v1-textbox_xl
|
|
239
|
+
zones:
|
|
240
|
+
- .ui-v1-textbox__prefix
|
|
241
|
+
- .ui-v1-textbox__suffix
|
|
242
|
+
- .ui-v1-textbox__icon.ui-v1-textbox__icon_leading
|
|
243
|
+
- .ui-v1-textbox__icon.ui-v1-textbox__icon_trailing
|
|
244
|
+
- .ui-v1-textbox__eraser
|
|
245
|
+
- .ui-v1-textbox__placeholder
|
|
246
|
+
css_variables:
|
|
247
|
+
public_theme_variables:
|
|
248
|
+
- name: --ui-v1-textbox-primary-color
|
|
249
|
+
effect: Active and focus border color.
|
|
250
|
+
- name: --ui-v1-textbox-primary-shadow-color
|
|
251
|
+
effect: Focus ring shadow color in outlined mode.
|
|
252
|
+
- name: --ui-v1-textbox-danger-color
|
|
253
|
+
effect: Invalid border and active color.
|
|
254
|
+
- name: --ui-v1-textbox-danger-shadow-color
|
|
255
|
+
effect: Invalid focus ring shadow color in outlined mode.
|
|
256
|
+
- name: --ui-v1-textbox-autofill-color
|
|
257
|
+
effect: Background for browser autofill state.
|
|
258
|
+
- name: --ui-v1-textbox-icon-color
|
|
259
|
+
effect: Default leading and trailing icon color.
|
|
260
|
+
internal_layout_variables:
|
|
261
|
+
- name: --height
|
|
262
|
+
effect: Control height and line box.
|
|
263
|
+
- name: --padding
|
|
264
|
+
effect: Inner inline padding in outlined mode.
|
|
265
|
+
- name: --gap
|
|
266
|
+
effect: Spacing between the control and adjacent zones.
|
|
267
|
+
- name: --icon-size
|
|
268
|
+
effect: Icon square size.
|
|
269
|
+
- name: --border-color
|
|
270
|
+
effect: Current border or underline color.
|
|
271
|
+
- name: --active-color
|
|
272
|
+
effect: Derived active color used during focus and active states.
|
|
273
|
+
- name: --shadow-color
|
|
274
|
+
effect: Derived focus ring color used in outlined mode.
|
|
275
|
+
typography:
|
|
276
|
+
default:
|
|
277
|
+
mixin: text-regular
|
|
278
|
+
size: 16px
|
|
279
|
+
line_height: 24px
|
|
280
|
+
weight: 400
|
|
281
|
+
size_variants:
|
|
282
|
+
- name: xs
|
|
283
|
+
mixin: text-small
|
|
284
|
+
size: 14px
|
|
285
|
+
line_height: 20px
|
|
286
|
+
weight: 400
|
|
287
|
+
- name: md
|
|
288
|
+
mixin: h4
|
|
289
|
+
size: 18px
|
|
290
|
+
line_height: 28px
|
|
291
|
+
weight: 400
|
|
292
|
+
- name: lg
|
|
293
|
+
mixin: h3
|
|
294
|
+
size: 20px
|
|
295
|
+
line_height: 32px
|
|
296
|
+
weight: 400
|
|
297
|
+
- name: xl
|
|
298
|
+
mixin: h2
|
|
299
|
+
size: 24px
|
|
300
|
+
line_height: 32px
|
|
301
|
+
weight: 400
|
|
302
|
+
notes:
|
|
303
|
+
- Prefix, suffix, and icon zones inherit the active size context.
|
|
304
|
+
- The inner input or textarea inherits font-family, size, weight, and line-height from the root.
|
|
305
|
+
|
|
306
|
+
behavior:
|
|
307
|
+
states:
|
|
308
|
+
- name: clearable
|
|
309
|
+
notes: The clear button is shown only when String(value) is not empty.
|
|
310
|
+
- name: invalid
|
|
311
|
+
notes: Sets aria-invalid=true and enables error styling.
|
|
312
|
+
- name: readonly
|
|
313
|
+
notes: Keeps the value visible but blocks editing.
|
|
314
|
+
- name: disabled
|
|
315
|
+
notes: Disables interaction completely.
|
|
316
|
+
- name: autofocus
|
|
317
|
+
notes: Focuses after mount.
|
|
318
|
+
- name: autoselect
|
|
319
|
+
notes: Selects the whole value on focus.
|
|
320
|
+
- name: multiline
|
|
321
|
+
notes: Renders a textarea instead of an input.
|
|
322
|
+
numeric_behavior:
|
|
323
|
+
- inputmode=numeric filters input down to digits and does not behave like a full decimal model.
|
|
324
|
+
- inputmode=decimal enables decimal input, separator normalization, and decimals limiting.
|
|
325
|
+
- Negative decimal input is allowed only when min < 0.
|
|
326
|
+
- ArrowUp and ArrowDown change value by step in decimal mode.
|
|
327
|
+
|
|
328
|
+
accessibility:
|
|
329
|
+
notes:
|
|
330
|
+
- The component sets aria-invalid automatically from invalid.
|
|
331
|
+
- Extra ARIA wiring is usually passed through inputAttributes.
|
|
332
|
+
- Native events such as keydown, focus, and blur are forwarded outward.
|
|
333
|
+
|
|
334
|
+
composition:
|
|
335
|
+
works_well_with:
|
|
336
|
+
- UiField
|
|
337
|
+
- UiPageHeader
|
|
338
|
+
- UiSelect trigger internals
|
|
339
|
+
patterns:
|
|
340
|
+
- title: Form field
|
|
341
|
+
notes: For standard forms, UiTextbox usually belongs inside UiField.
|
|
342
|
+
- title: Search field
|
|
343
|
+
notes: Leading icon plus clearable is a strong search pattern.
|
|
344
|
+
- title: Inline editing
|
|
345
|
+
notes: outlined=false and autofit=true fit header and inline editing scenarios.
|
|
346
|
+
- title: Inline control
|
|
347
|
+
notes: Use UiTextbox as a self-contained control, not as a wrapper for arbitrary content.
|
|
348
|
+
|
|
349
|
+
examples:
|
|
350
|
+
- title: Field wiring
|
|
351
|
+
goal: Build a standard text field with correct ARIA wiring.
|
|
352
|
+
code: |
|
|
353
|
+
<UiField id="name" label="Name">
|
|
354
|
+
<template #default="field">
|
|
355
|
+
<UiTextbox
|
|
356
|
+
:id="field.id"
|
|
357
|
+
:input-attributes="{
|
|
358
|
+
'aria-labelledby': field.ariaLabelledby,
|
|
359
|
+
'aria-invalid': field.ariaInvalid,
|
|
360
|
+
}"
|
|
361
|
+
v-model:value="name"
|
|
362
|
+
/>
|
|
363
|
+
</template>
|
|
364
|
+
</UiField>
|
|
365
|
+
- title: Search pattern
|
|
366
|
+
goal: Build a textbox with a leading icon and clear action.
|
|
367
|
+
code: |
|
|
368
|
+
<UiTextbox v-model:value="term" clearable>
|
|
369
|
+
<template #leading-icon>
|
|
370
|
+
<IconSearch aria-hidden="true" />
|
|
371
|
+
</template>
|
|
372
|
+
</UiTextbox>
|
|
373
|
+
- title: Prefix and suffix zones
|
|
374
|
+
goal: Show safe markup for prefix and suffix content.
|
|
375
|
+
code: |
|
|
376
|
+
<UiTextbox v-model:value="amount" inputmode="decimal" suffix="₽">
|
|
377
|
+
<template #prefix>
|
|
378
|
+
<span>Amount</span>
|
|
379
|
+
</template>
|
|
380
|
+
</UiTextbox>
|
|
381
|
+
|
|
382
|
+
ai_notes:
|
|
383
|
+
do:
|
|
384
|
+
- Pair UiTextbox with UiField in most form scenarios.
|
|
385
|
+
- Use inputmode=decimal for amounts and explicitly set decimals, min, and step.
|
|
386
|
+
- Prefer span, svg, and icon components for slot content.
|
|
387
|
+
- Remember that the root is span-based and inline-flex.
|
|
388
|
+
avoid:
|
|
389
|
+
- Do not use UiTextbox as a select.
|
|
390
|
+
- Do not place div or block layout markup inside prefix, suffix, or icon zones.
|
|
391
|
+
- Do not replace multiline mode with a different component if a textarea-like control is enough.
|
|
392
|
+
- Do not rely on block-level behavior from the component root.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
component: UiTimePicker
|
|
2
|
+
summary: >
|
|
3
|
+
UiTimePicker is a time input component that combines textbox-like entry with a list of
|
|
4
|
+
normalized time variants and bounds.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiTimePicker
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiTextbox
|
|
13
|
+
- UiPopper
|
|
14
|
+
|
|
15
|
+
use_when:
|
|
16
|
+
- You need editable time input.
|
|
17
|
+
- You need bounded time variants or interval-based time selection.
|
|
18
|
+
|
|
19
|
+
avoid_when:
|
|
20
|
+
- You need raw text input without time semantics.
|
|
21
|
+
|
|
22
|
+
api:
|
|
23
|
+
key_props:
|
|
24
|
+
- name: value
|
|
25
|
+
- name: placeholder
|
|
26
|
+
- name: interval
|
|
27
|
+
- name: timeVariants
|
|
28
|
+
- name: minTime
|
|
29
|
+
- name: maxTime
|
|
30
|
+
- name: textboxOptions
|
|
31
|
+
methods:
|
|
32
|
+
- name: open
|
|
33
|
+
- name: close
|
|
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
|