@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,38 @@
|
|
|
1
|
+
component: UiLoader
|
|
2
|
+
summary: >
|
|
3
|
+
UiLoader displays loading progress or waiting state. It can be used inline or as an overlay.
|
|
4
|
+
|
|
5
|
+
public_import:
|
|
6
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
7
|
+
named:
|
|
8
|
+
- UiLoader
|
|
9
|
+
|
|
10
|
+
use_when:
|
|
11
|
+
- You need a visible loading indicator.
|
|
12
|
+
- You need inline or overlay loading state.
|
|
13
|
+
|
|
14
|
+
avoid_when:
|
|
15
|
+
- You need skeleton content rather than a spinner-like loader.
|
|
16
|
+
|
|
17
|
+
api:
|
|
18
|
+
key_props:
|
|
19
|
+
- name: diameter
|
|
20
|
+
- name: thickness
|
|
21
|
+
- name: fixed
|
|
22
|
+
- name: overlay
|
|
23
|
+
|
|
24
|
+
rendered_structure:
|
|
25
|
+
descriptive_only: true
|
|
26
|
+
root:
|
|
27
|
+
shape: div.ui-v1-loader
|
|
28
|
+
tag: div
|
|
29
|
+
notes: The loader body may be wrapped in UiTransition, but the visible loader itself is one div root.
|
|
30
|
+
|
|
31
|
+
geometry:
|
|
32
|
+
layout: loader surface or overlay
|
|
33
|
+
root_display: block
|
|
34
|
+
width_behavior: content-sized by default, viewport-covering in fixed or overlay modes
|
|
35
|
+
|
|
36
|
+
ai_notes:
|
|
37
|
+
do:
|
|
38
|
+
- Use overlay or fixed only when the loader should escape normal inline flow.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
component: UiMenuItem
|
|
2
|
+
summary: >
|
|
3
|
+
UiMenuItem is a structured menu row component with support for icons, avatar, description,
|
|
4
|
+
counters, and active or danger styling.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiMenuItem
|
|
10
|
+
|
|
11
|
+
use_when:
|
|
12
|
+
- You need a menu row with structured content zones.
|
|
13
|
+
- You need icon, avatar, description, or counter inside one menu item.
|
|
14
|
+
|
|
15
|
+
avoid_when:
|
|
16
|
+
- You need a plain inline link.
|
|
17
|
+
|
|
18
|
+
api:
|
|
19
|
+
key_props:
|
|
20
|
+
- name: description
|
|
21
|
+
- name: counter
|
|
22
|
+
- name: active
|
|
23
|
+
- name: danger
|
|
24
|
+
- name: disabled
|
|
25
|
+
- name: size
|
|
26
|
+
slots:
|
|
27
|
+
- name: default
|
|
28
|
+
zone: main-label
|
|
29
|
+
creates: Main visible label area.
|
|
30
|
+
- name: avatar
|
|
31
|
+
zone: leading-avatar
|
|
32
|
+
creates: Leading avatar zone.
|
|
33
|
+
- name: leading-icon
|
|
34
|
+
zone: leading-icon
|
|
35
|
+
creates: Leading icon zone.
|
|
36
|
+
- name: description
|
|
37
|
+
zone: secondary-copy
|
|
38
|
+
creates: Secondary description area.
|
|
39
|
+
- name: trailing-icon
|
|
40
|
+
zone: trailing-icon
|
|
41
|
+
creates: Trailing icon zone.
|
|
42
|
+
|
|
43
|
+
rendered_structure:
|
|
44
|
+
descriptive_only: true
|
|
45
|
+
root:
|
|
46
|
+
shape: div.ui-v1-menu-item
|
|
47
|
+
tag: div
|
|
48
|
+
notes: The root is one menu row container with leading, main, and trailing content zones.
|
|
49
|
+
|
|
50
|
+
geometry:
|
|
51
|
+
layout: menu row
|
|
52
|
+
root_display: flex
|
|
53
|
+
width_behavior: stretches to available menu width
|
|
54
|
+
|
|
55
|
+
ai_notes:
|
|
56
|
+
do:
|
|
57
|
+
- Use structured slots instead of custom wrappers inside menu rows.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
component: UiMenuItemGroup
|
|
2
|
+
summary: >
|
|
3
|
+
UiMenuItemGroup groups related menu items and exposes dedicated zones for group label
|
|
4
|
+
and quantity metadata.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiMenuItemGroup
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiMenuItem
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You need several menu items under one group heading.
|
|
16
|
+
- You need group label or quantity metadata.
|
|
17
|
+
|
|
18
|
+
avoid_when:
|
|
19
|
+
- You have only one item and no group semantics.
|
|
20
|
+
|
|
21
|
+
api:
|
|
22
|
+
slots:
|
|
23
|
+
- name: default
|
|
24
|
+
zone: group-body
|
|
25
|
+
creates: Main group content.
|
|
26
|
+
- name: option
|
|
27
|
+
zone: option-list
|
|
28
|
+
creates: Explicit option area for grouped items.
|
|
29
|
+
- name: label
|
|
30
|
+
zone: group-label
|
|
31
|
+
creates: Group heading area.
|
|
32
|
+
- name: quantity
|
|
33
|
+
zone: group-meta
|
|
34
|
+
creates: Group quantity or meta area.
|
|
35
|
+
|
|
36
|
+
rendered_structure:
|
|
37
|
+
descriptive_only: true
|
|
38
|
+
root:
|
|
39
|
+
shape: div.ui-v1-menu-item-group
|
|
40
|
+
tag: div
|
|
41
|
+
notes: The root wraps the group head and the nested option content.
|
|
42
|
+
|
|
43
|
+
geometry:
|
|
44
|
+
layout: block-like menu group wrapper
|
|
45
|
+
root_display: block
|
|
46
|
+
width_behavior: stretches to available menu width
|
|
47
|
+
|
|
48
|
+
ai_notes:
|
|
49
|
+
do:
|
|
50
|
+
- Use for grouped menu structure instead of manual heading-plus-list markup.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
component: UiModalSidebar
|
|
2
|
+
summary: >
|
|
3
|
+
UiModalSidebar is a side-docked modal surface with open state, direction, size, and
|
|
4
|
+
scrolling control. Use it when the UI should slide from an edge instead of opening as a centered dialog.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiModalSidebar
|
|
10
|
+
|
|
11
|
+
use_when:
|
|
12
|
+
- You need side-panel modal UI.
|
|
13
|
+
- You need left or right docked modal content.
|
|
14
|
+
|
|
15
|
+
avoid_when:
|
|
16
|
+
- You need a centered dialog.
|
|
17
|
+
|
|
18
|
+
api:
|
|
19
|
+
key_props:
|
|
20
|
+
- name: opened
|
|
21
|
+
- name: closable
|
|
22
|
+
- name: direction
|
|
23
|
+
- name: size
|
|
24
|
+
- name: scrolling
|
|
25
|
+
- name: fixed
|
|
26
|
+
|
|
27
|
+
rendered_structure:
|
|
28
|
+
descriptive_only: true
|
|
29
|
+
root:
|
|
30
|
+
shape: div.ui-v1-modal-sidebar-overlay
|
|
31
|
+
tag: div
|
|
32
|
+
notes: The component is teleported; the overlay div contains the actual aside.ui-v1-modal-sidebar panel.
|
|
33
|
+
|
|
34
|
+
geometry:
|
|
35
|
+
layout: teleported overlay with side panel
|
|
36
|
+
root_display: flex
|
|
37
|
+
width_behavior: viewport-covering overlay with fixed-width sidebar surface
|
|
38
|
+
|
|
39
|
+
behavior:
|
|
40
|
+
notes:
|
|
41
|
+
- opened controls visibility.
|
|
42
|
+
- direction controls which side the sidebar comes from.
|
|
43
|
+
|
|
44
|
+
ai_notes:
|
|
45
|
+
do:
|
|
46
|
+
- Use UiModalSidebar when page context should stay visually connected to the modal content.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
component: UiModalWindow
|
|
2
|
+
summary: >
|
|
3
|
+
UiModalWindow is the main centered modal container. It supports open state, closability,
|
|
4
|
+
appearance variants, fullscreen and responsive behavior, and dialog roles.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiModalWindow
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiModalWindowSurface
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You need a centered dialog.
|
|
16
|
+
- You need modal interaction with standard dialog semantics.
|
|
17
|
+
|
|
18
|
+
avoid_when:
|
|
19
|
+
- You need a side-docked modal, use UiModalSidebar instead.
|
|
20
|
+
|
|
21
|
+
api:
|
|
22
|
+
key_props:
|
|
23
|
+
- name: opened
|
|
24
|
+
- name: closable
|
|
25
|
+
- name: appearance
|
|
26
|
+
- name: fullscreen
|
|
27
|
+
- name: responsive
|
|
28
|
+
- name: scrolling
|
|
29
|
+
- name: role
|
|
30
|
+
methods:
|
|
31
|
+
- name: open
|
|
32
|
+
- name: close
|
|
33
|
+
|
|
34
|
+
rendered_structure:
|
|
35
|
+
descriptive_only: true
|
|
36
|
+
root:
|
|
37
|
+
shape: div.ui-v1-modal-window via UiModalWindowSurface
|
|
38
|
+
tag: div
|
|
39
|
+
notes: The component delegates the actual teleported modal root to UiModalWindowSurface and renders header, content, and footer inside it.
|
|
40
|
+
|
|
41
|
+
geometry:
|
|
42
|
+
layout: teleported modal layer with centered surface
|
|
43
|
+
root_display: flex
|
|
44
|
+
width_behavior: viewport-covering overlay with content-sized or responsive surface
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
component: UiModalWindowSurface
|
|
2
|
+
summary: >
|
|
3
|
+
UiModalWindowSurface is the lower-level modal surface API behind modal window flows.
|
|
4
|
+
Use it when you need modal surface behavior with more explicit composition control.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiModalWindowSurface
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiModalWindow
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You need explicit modal surface composition.
|
|
16
|
+
- You need modal surface behavior without the higher-level modal wrapper.
|
|
17
|
+
|
|
18
|
+
avoid_when:
|
|
19
|
+
- You just need the regular centered modal API, use UiModalWindow instead.
|
|
20
|
+
|
|
21
|
+
api:
|
|
22
|
+
key_props:
|
|
23
|
+
- name: opened
|
|
24
|
+
- name: closable
|
|
25
|
+
- name: appearance
|
|
26
|
+
- name: fullscreen
|
|
27
|
+
- name: responsive
|
|
28
|
+
- name: scrolling
|
|
29
|
+
- name: role
|
|
30
|
+
|
|
31
|
+
rendered_structure:
|
|
32
|
+
descriptive_only: true
|
|
33
|
+
root:
|
|
34
|
+
shape: div.ui-v1-modal-window
|
|
35
|
+
tag: div
|
|
36
|
+
notes: The component is teleported and renders the modal overlay and surface container directly.
|
|
37
|
+
|
|
38
|
+
geometry:
|
|
39
|
+
layout: teleported modal overlay
|
|
40
|
+
root_display: flex
|
|
41
|
+
width_behavior: viewport-covering overlay with content-sized or responsive surface
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
component: UiNumberStepper
|
|
2
|
+
summary: >
|
|
3
|
+
UiNumberStepper is a numeric input with increase and decrease controls. It is built for
|
|
4
|
+
constrained numeric entry where arrowing and step-based changes matter.
|
|
5
|
+
|
|
6
|
+
public_import:
|
|
7
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
8
|
+
named:
|
|
9
|
+
- UiNumberStepper
|
|
10
|
+
|
|
11
|
+
related_components:
|
|
12
|
+
- UiTextbox
|
|
13
|
+
|
|
14
|
+
use_when:
|
|
15
|
+
- You need numeric input with explicit step controls.
|
|
16
|
+
- You need range constraints and nullable numeric state.
|
|
17
|
+
|
|
18
|
+
avoid_when:
|
|
19
|
+
- You need plain text or decimal input without stepper controls.
|
|
20
|
+
|
|
21
|
+
api:
|
|
22
|
+
key_props:
|
|
23
|
+
- name: value
|
|
24
|
+
- name: min
|
|
25
|
+
- name: max
|
|
26
|
+
- name: step
|
|
27
|
+
- name: decimals
|
|
28
|
+
- name: clamp
|
|
29
|
+
- name: nullable
|
|
30
|
+
- name: direction
|
|
31
|
+
methods:
|
|
32
|
+
- name: focus
|
|
33
|
+
- name: blur
|
|
34
|
+
- name: increase
|
|
35
|
+
- name: decrease
|
|
36
|
+
|
|
37
|
+
rendered_structure:
|
|
38
|
+
descriptive_only: true
|
|
39
|
+
root:
|
|
40
|
+
shape: div.ui-v1-number-stepper
|
|
41
|
+
tag: div
|
|
42
|
+
notes: One inline control root wraps the text input and increment or decrement actions.
|
|
43
|
+
|
|
44
|
+
geometry:
|
|
45
|
+
layout: inline numeric control
|
|
46
|
+
root_display: inline-flex
|
|
47
|
+
width_behavior: content-sized by default
|
|
48
|
+
|
|
49
|
+
behavior:
|
|
50
|
+
notes:
|
|
51
|
+
- Can clamp values into range.
|
|
52
|
+
- Supports horizontal and vertical direction.
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
component: UiPageHeader
|
|
2
|
+
summary: >
|
|
3
|
+
UiPageHeader is a page or major section header with an optional inline addon next to the title
|
|
4
|
+
and an optional actions area on the right. In display state it renders the title as a semantic h1;
|
|
5
|
+
in edit state it switches to UiTextbox.
|
|
6
|
+
|
|
7
|
+
public_import:
|
|
8
|
+
from: '@retailcrm/embed-ui-v1-components/remote'
|
|
9
|
+
named:
|
|
10
|
+
- UiPageHeader
|
|
11
|
+
|
|
12
|
+
related_components:
|
|
13
|
+
- UiButton
|
|
14
|
+
- UiLink
|
|
15
|
+
- UiTextbox
|
|
16
|
+
- UiPopperConnector
|
|
17
|
+
- UiPopperTarget
|
|
18
|
+
|
|
19
|
+
use_when:
|
|
20
|
+
- You need the main title of an extension page.
|
|
21
|
+
- You need inline title editing.
|
|
22
|
+
- You need a small inline addon near the title, such as UiLink.
|
|
23
|
+
- You need compact right-aligned actions.
|
|
24
|
+
|
|
25
|
+
avoid_when:
|
|
26
|
+
- You need a regular form label.
|
|
27
|
+
- You need a small section title without page-header semantics.
|
|
28
|
+
- You need a multi-line editor rather than inline title editing.
|
|
29
|
+
|
|
30
|
+
api:
|
|
31
|
+
key_props:
|
|
32
|
+
- name: value
|
|
33
|
+
notes: Main title text.
|
|
34
|
+
- name: placeholder
|
|
35
|
+
notes: Placeholder for empty editable state.
|
|
36
|
+
- name: editable
|
|
37
|
+
notes: Enables the h1 -> UiTextbox -> h1 cycle.
|
|
38
|
+
- name: invalid
|
|
39
|
+
notes: Used for error styling and the empty-title tooltip scenario.
|
|
40
|
+
- name: error
|
|
41
|
+
notes: Required for the tooltip in remote mode when invalid and empty.
|
|
42
|
+
props:
|
|
43
|
+
- name: autofocus
|
|
44
|
+
notes: Focuses edit state after mount.
|
|
45
|
+
- name: autoselect
|
|
46
|
+
notes: Selects the current value inside the textbox on focus.
|
|
47
|
+
- name: readonly
|
|
48
|
+
notes: Blocks entering edit mode.
|
|
49
|
+
- name: disabled
|
|
50
|
+
notes: Blocks interaction completely.
|
|
51
|
+
slots:
|
|
52
|
+
- name: addon
|
|
53
|
+
zone: inline sibling near title
|
|
54
|
+
creates: An inline addon area next to the title.
|
|
55
|
+
accepts:
|
|
56
|
+
recommended:
|
|
57
|
+
- UiLink
|
|
58
|
+
- short text
|
|
59
|
+
- compact inline status
|
|
60
|
+
avoid:
|
|
61
|
+
- full form layout
|
|
62
|
+
- wide content blocks
|
|
63
|
+
- content that should belong to the tooltip target
|
|
64
|
+
layout_effect: Renders as a sibling next to the title inside the main area.
|
|
65
|
+
notes: >
|
|
66
|
+
Inline content near the title, for example UiLink. This slot lives as a sibling next to the
|
|
67
|
+
title and should not be placed inside the tooltip target.
|
|
68
|
+
- name: actions
|
|
69
|
+
zone: right-side actions
|
|
70
|
+
creates: A compact right-aligned actions area.
|
|
71
|
+
accepts:
|
|
72
|
+
recommended:
|
|
73
|
+
- UiButton
|
|
74
|
+
- UiToolbarButton
|
|
75
|
+
- UiToolbarLink
|
|
76
|
+
- one or two compact actions
|
|
77
|
+
avoid:
|
|
78
|
+
- full form groups
|
|
79
|
+
- wide content blocks
|
|
80
|
+
- large multi-row layouts
|
|
81
|
+
layout_effect: Stays in the right-side action zone and should remain compact.
|
|
82
|
+
notes: Compact actions on the right, usually UiButton or toolbar-like actions.
|
|
83
|
+
emits:
|
|
84
|
+
- name: update:value
|
|
85
|
+
payload: string
|
|
86
|
+
notes: Main title update channel.
|
|
87
|
+
- name: focus
|
|
88
|
+
payload: FocusEvent
|
|
89
|
+
notes: Forwarded from the inner textbox.
|
|
90
|
+
- name: blur
|
|
91
|
+
payload: FocusEvent
|
|
92
|
+
notes: Forwarded from the inner textbox.
|
|
93
|
+
- name: change
|
|
94
|
+
payload: Event
|
|
95
|
+
notes: Forwarded from the inner textbox.
|
|
96
|
+
- name: keydown
|
|
97
|
+
payload: KeyboardEvent
|
|
98
|
+
notes: Forwarded from the inner textbox.
|
|
99
|
+
methods:
|
|
100
|
+
- name: focus
|
|
101
|
+
notes: Enters edit state and focuses the textbox.
|
|
102
|
+
- name: blur
|
|
103
|
+
notes: Blurs the textbox.
|
|
104
|
+
|
|
105
|
+
rendered_structure:
|
|
106
|
+
descriptive_only: true
|
|
107
|
+
notes: >
|
|
108
|
+
This structure is useful for reasoning and debugging, not as a public styling API.
|
|
109
|
+
root:
|
|
110
|
+
shape: div.ui-v1-page-header
|
|
111
|
+
tag: div
|
|
112
|
+
zones:
|
|
113
|
+
- .ui-v1-page-header__main
|
|
114
|
+
- .ui-v1-page-header__title
|
|
115
|
+
- .ui-v1-page-header__addon
|
|
116
|
+
- .ui-v1-page-header__actions
|
|
117
|
+
- h1.ui-v1-page-header__trigger in display state
|
|
118
|
+
- UiTextbox.ui-v1-page-header__textbox in edit state
|
|
119
|
+
remote_overlay_notes:
|
|
120
|
+
- The tooltip is anchored to the title area through UiPopperConnector and UiPopperTarget.
|
|
121
|
+
- The addon renders as a sibling next to the title, not inside the tooltip target.
|
|
122
|
+
|
|
123
|
+
geometry:
|
|
124
|
+
layout: flex
|
|
125
|
+
root_display: flex
|
|
126
|
+
width_behavior: stretches to container width by default
|
|
127
|
+
notes:
|
|
128
|
+
- Root uses justify-content space-between and can wrap.
|
|
129
|
+
- The main area contains title and optional addon.
|
|
130
|
+
- The actions area stays compact on the right.
|
|
131
|
+
- The display-state title draws an underline aligned with the underline textbox style.
|
|
132
|
+
- In edit state, the textbox uses size=xl, autofit, and outlined=false.
|
|
133
|
+
|
|
134
|
+
styling:
|
|
135
|
+
notes:
|
|
136
|
+
- UiPageHeader styling is split between the page-header root and the inner UiTextbox used during edit state.
|
|
137
|
+
- Prefer editable, invalid, disabled, and slot composition before custom CSS.
|
|
138
|
+
- Classes below are descriptive hooks, not a stable public selector API.
|
|
139
|
+
root_classes:
|
|
140
|
+
- .ui-v1-page-header
|
|
141
|
+
state_classes:
|
|
142
|
+
- .ui-v1-page-header_disabled
|
|
143
|
+
- .ui-v1-page-header_invalid
|
|
144
|
+
- .ui-v1-page-header__trigger_editable
|
|
145
|
+
- .ui-v1-page-header__trigger_empty
|
|
146
|
+
zones:
|
|
147
|
+
- .ui-v1-page-header__main
|
|
148
|
+
- .ui-v1-page-header__title
|
|
149
|
+
- .ui-v1-page-header__addon
|
|
150
|
+
- .ui-v1-page-header__actions
|
|
151
|
+
- .ui-v1-page-header__trigger
|
|
152
|
+
- .ui-v1-page-header__textbox
|
|
153
|
+
css_variables:
|
|
154
|
+
public_theme_variables:
|
|
155
|
+
- name: --ui-v1-page-header-danger-color
|
|
156
|
+
effect: Invalid title color and underline color.
|
|
157
|
+
- name: --ui-v1-page-header-danger-shadow-color
|
|
158
|
+
effect: Invalid shadow color for the editing textbox.
|
|
159
|
+
internal_layout_variables:
|
|
160
|
+
- name: --ui-v1-page-header-primary-color
|
|
161
|
+
effect: Derived active title color, often provided through invalid or focus flow.
|
|
162
|
+
- name: --ui-v1-page-header-primary-shadow-color
|
|
163
|
+
effect: Derived active shadow color for the editing textbox.
|
|
164
|
+
- name: --border-color
|
|
165
|
+
effect: Display-state underline color on the editable trigger.
|
|
166
|
+
typography:
|
|
167
|
+
title:
|
|
168
|
+
mixin: h2-accent
|
|
169
|
+
size: 24px
|
|
170
|
+
line_height: 32px
|
|
171
|
+
weight: 500
|
|
172
|
+
notes:
|
|
173
|
+
- The display h1 and the edit-state textbox share the same title typography.
|
|
174
|
+
- Addon and actions keep their own component typography and should not be forced into the title scale.
|
|
175
|
+
|
|
176
|
+
behavior:
|
|
177
|
+
states:
|
|
178
|
+
- name: editable
|
|
179
|
+
notes: Enables the h1 -> UiTextbox -> h1 cycle.
|
|
180
|
+
- name: non-editable
|
|
181
|
+
notes: Leaves the title as a regular h1 and should not break native text selection.
|
|
182
|
+
- name: readonly
|
|
183
|
+
notes: Blocks entering edit state.
|
|
184
|
+
- name: disabled
|
|
185
|
+
notes: Blocks interaction completely.
|
|
186
|
+
- name: invalid
|
|
187
|
+
notes: Is visually meaningful only when the value is empty.
|
|
188
|
+
notes:
|
|
189
|
+
- Click, Enter, and Space enter edit state when editable is true.
|
|
190
|
+
- Enter finishes editing and returns to display state unless a blocking error state is active.
|
|
191
|
+
- Placeholder is shown when value is empty.
|
|
192
|
+
- If invalid=true, value is empty, and error is present, remote mode shows a tooltip.
|
|
193
|
+
- While invalid + empty + error is active, the component stays in edit state on blur and Enter.
|
|
194
|
+
|
|
195
|
+
accessibility:
|
|
196
|
+
notes:
|
|
197
|
+
- In display state, an editable title gets role=button and tabindex=0.
|
|
198
|
+
- In display state, a non-editable title stays a plain h1.
|
|
199
|
+
- The inner textbox gets aria-label based on placeholder or current value.
|
|
200
|
+
- Keyboard completion for inline editing is centered on Enter.
|
|
201
|
+
|
|
202
|
+
composition:
|
|
203
|
+
works_well_with:
|
|
204
|
+
- UiButton
|
|
205
|
+
- UiLink
|
|
206
|
+
patterns:
|
|
207
|
+
- title: Inline filter link
|
|
208
|
+
notes: Use addon for a neighboring link such as Collapse filter.
|
|
209
|
+
- title: Compact actions
|
|
210
|
+
notes: Keep only one or two compact actions on the right.
|
|
211
|
+
|
|
212
|
+
examples:
|
|
213
|
+
- title: Editable header with addon and actions
|
|
214
|
+
goal: Build a page header with inline validation and a link near the title.
|
|
215
|
+
code: |
|
|
216
|
+
<UiPageHeader
|
|
217
|
+
v-model:value="title"
|
|
218
|
+
:invalid="!title"
|
|
219
|
+
:error="title ? '' : 'Title is required'"
|
|
220
|
+
editable
|
|
221
|
+
placeholder="Enter a title"
|
|
222
|
+
>
|
|
223
|
+
<template #addon>
|
|
224
|
+
<UiLink>
|
|
225
|
+
Collapse filter
|
|
226
|
+
</UiLink>
|
|
227
|
+
</template>
|
|
228
|
+
|
|
229
|
+
<template #actions>
|
|
230
|
+
<UiButton appearance="tertiary">
|
|
231
|
+
Actions
|
|
232
|
+
</UiButton>
|
|
233
|
+
</template>
|
|
234
|
+
</UiPageHeader>
|
|
235
|
+
|
|
236
|
+
ai_notes:
|
|
237
|
+
do:
|
|
238
|
+
- Use UiPageHeader as a page-level title, not as a replacement for UiField.
|
|
239
|
+
- Set placeholder explicitly for editable scenarios.
|
|
240
|
+
- Pass both invalid and a clear error message if empty-title validation matters.
|
|
241
|
+
- Use addon for inline neighbors next to the title.
|
|
242
|
+
avoid:
|
|
243
|
+
- Do not assume the tooltip is anchored to the entire main area.
|
|
244
|
+
- Do not overload the actions area with full form layout.
|