@retailcrm/embed-ui-v1-components 0.9.19 → 0.9.22-alpha.1

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 (123) hide show
  1. package/AGENTS.md +9 -1
  2. package/README.md +5 -2
  3. package/assets/sprites/actions/add-square-outlined.svg +8 -0
  4. package/assets/sprites/actions/drag.svg +8 -0
  5. package/bin/embed-ui-v1-components.mjs +231 -46
  6. package/bin/postinstall.mjs +3 -2
  7. package/dist/host.cjs +1223 -501
  8. package/dist/host.css +637 -10
  9. package/dist/host.d.ts +152 -78
  10. package/dist/host.js +1224 -502
  11. package/dist/remote.cjs +1358 -298
  12. package/dist/remote.d.ts +805 -67
  13. package/dist/remote.js +1360 -300
  14. package/docs/AI.md +99 -17
  15. package/docs/COMPONENTS.md +58 -59
  16. package/docs/FORMAT.md +10 -10
  17. package/docs/PROFILES.md +39 -22
  18. package/docs/README.md +11 -5
  19. package/docs/profiles/components/UiAddButton.yml +134 -0
  20. package/docs/profiles/components/UiAlert.yml +105 -0
  21. package/docs/profiles/components/UiAvatar.yml +88 -0
  22. package/docs/profiles/{UiAvatarList.yml → components/UiAvatarList.yml} +26 -0
  23. package/docs/profiles/{UiButton.yml → components/UiButton.yml} +14 -8
  24. package/docs/profiles/components/UiCalendar.yml +190 -0
  25. package/docs/profiles/components/UiCheckbox.yml +111 -0
  26. package/docs/profiles/components/UiCollapse.yml +129 -0
  27. package/docs/profiles/components/UiCollapseBox.yml +143 -0
  28. package/docs/profiles/{UiCollapseGroup.yml → components/UiCollapseGroup.yml} +24 -0
  29. package/docs/profiles/components/UiCopyButton.yml +104 -0
  30. package/docs/profiles/components/UiDate.yml +84 -0
  31. package/docs/profiles/components/UiDatePicker.yml +138 -0
  32. package/docs/profiles/components/UiError.yml +123 -0
  33. package/docs/profiles/{UiField.yml → components/UiField.yml} +46 -15
  34. package/docs/profiles/components/UiInfobox.yml +130 -0
  35. package/docs/profiles/components/UiLink.yml +111 -0
  36. package/docs/profiles/components/UiLoader.yml +71 -0
  37. package/docs/profiles/components/UiMenuItem.yml +93 -0
  38. package/docs/profiles/{UiMenuItemGroup.yml → components/UiMenuItemGroup.yml} +25 -0
  39. package/docs/profiles/components/UiModalSidebar.yml +156 -0
  40. package/docs/profiles/components/UiModalWindow.yml +181 -0
  41. package/docs/profiles/{UiModalWindowSurface.yml → components/UiModalWindowSurface.yml} +30 -0
  42. package/docs/profiles/components/UiNumberStepper.yml +100 -0
  43. package/docs/profiles/{UiPageHeader.yml → components/UiPageHeader.yml} +39 -23
  44. package/docs/profiles/components/UiPopconfirm.yml +164 -0
  45. package/docs/profiles/{UiPopper.yml → components/UiPopper.yml} +66 -13
  46. package/docs/profiles/{UiPopperConnector.yml → components/UiPopperConnector.yml} +5 -25
  47. package/docs/profiles/{UiPopperTarget.yml → components/UiPopperTarget.yml} +5 -25
  48. package/docs/profiles/components/UiRadio.yml +91 -0
  49. package/docs/profiles/{UiRadioSwitch.yml → components/UiRadioSwitch.yml} +55 -32
  50. package/docs/profiles/{UiRadioSwitchOption.yml → components/UiRadioSwitchOption.yml} +7 -13
  51. package/docs/profiles/components/UiScrollBox.yml +108 -0
  52. package/docs/profiles/{UiSelect.yml → components/UiSelect.yml} +133 -44
  53. package/docs/profiles/components/UiSelectOption.yml +74 -0
  54. package/docs/profiles/components/UiSelectOptionGroup.yml +66 -0
  55. package/docs/profiles/components/UiSkeleton.yml +82 -0
  56. package/docs/profiles/components/UiSlider.yml +161 -0
  57. package/docs/profiles/components/UiSwitch.yml +123 -0
  58. package/docs/profiles/components/UiTab.yml +234 -0
  59. package/docs/profiles/{UiTabGroup.yml → components/UiTabGroup.yml} +0 -30
  60. package/docs/profiles/components/UiTable.yml +622 -0
  61. package/docs/profiles/{UiTableBodyCell.yml → components/UiTableBodyCell.yml} +26 -0
  62. package/docs/profiles/components/UiTableColumn.yml +87 -0
  63. package/docs/profiles/components/UiTableFooterButton.yml +85 -0
  64. package/docs/profiles/components/UiTableFooterSection.yml +73 -0
  65. package/docs/profiles/{UiTableHeadCell.yml → components/UiTableHeadCell.yml} +26 -0
  66. package/docs/profiles/{UiTableSorter.yml → components/UiTableSorter.yml} +27 -0
  67. package/docs/profiles/components/UiTag.yml +90 -0
  68. package/docs/profiles/{UiTextbox.yml → components/UiTextbox.yml} +20 -32
  69. package/docs/profiles/components/UiTimePicker.yml +144 -0
  70. package/docs/profiles/{UiToggleButton.yml → components/UiToggleButton.yml} +16 -11
  71. package/docs/profiles/{UiToggleGroup.yml → components/UiToggleGroup.yml} +25 -13
  72. package/docs/profiles/{UiToggleGroupOption.yml → components/UiToggleGroupOption.yml} +7 -11
  73. package/docs/profiles/components/UiToolbarButton.yml +87 -0
  74. package/docs/profiles/components/UiToolbarLink.yml +80 -0
  75. package/docs/profiles/components/UiTooltip.yml +97 -0
  76. package/docs/profiles/components/UiTransition.yml +62 -0
  77. package/docs/profiles/components/UiYandexMap.yml +104 -0
  78. package/docs/profiles/pages/CardSettingsPage.yml +58 -0
  79. package/docs/profiles/pages/CollapseBlockPage.yml +46 -0
  80. package/docs/profiles/pages/EntityListPage.yml +66 -0
  81. package/docs/profiles/pages/ModalSidebar.yml +158 -0
  82. package/docs/profiles/pages/ModalWindow.yml +55 -0
  83. package/docs/profiles/pages/MultiColumnPage.yml +27 -0
  84. package/docs/profiles/pages/PageComposition.yml +56 -0
  85. package/package.json +15 -15
  86. package/docs/profiles/UiAddButton.yml +0 -57
  87. package/docs/profiles/UiAlert.yml +0 -48
  88. package/docs/profiles/UiAvatar.yml +0 -48
  89. package/docs/profiles/UiCalendar.yml +0 -48
  90. package/docs/profiles/UiCheckbox.yml +0 -53
  91. package/docs/profiles/UiCollapse.yml +0 -40
  92. package/docs/profiles/UiCollapseBox.yml +0 -51
  93. package/docs/profiles/UiCopyButton.yml +0 -52
  94. package/docs/profiles/UiDate.yml +0 -38
  95. package/docs/profiles/UiDatePicker.yml +0 -59
  96. package/docs/profiles/UiError.yml +0 -32
  97. package/docs/profiles/UiImage.yml +0 -39
  98. package/docs/profiles/UiInfobox.yml +0 -45
  99. package/docs/profiles/UiLink.yml +0 -51
  100. package/docs/profiles/UiLoader.yml +0 -38
  101. package/docs/profiles/UiMenuItem.yml +0 -57
  102. package/docs/profiles/UiModalSidebar.yml +0 -46
  103. package/docs/profiles/UiModalWindow.yml +0 -44
  104. package/docs/profiles/UiNumberStepper.yml +0 -52
  105. package/docs/profiles/UiRadio.yml +0 -38
  106. package/docs/profiles/UiScrollBox.yml +0 -31
  107. package/docs/profiles/UiSelectOption.yml +0 -44
  108. package/docs/profiles/UiSelectOptionGroup.yml +0 -38
  109. package/docs/profiles/UiSkeleton.yml +0 -41
  110. package/docs/profiles/UiSlider.yml +0 -38
  111. package/docs/profiles/UiSwitch.yml +0 -37
  112. package/docs/profiles/UiTab.yml +0 -119
  113. package/docs/profiles/UiTable.yml +0 -152
  114. package/docs/profiles/UiTableColumn.yml +0 -50
  115. package/docs/profiles/UiTableFooterButton.yml +0 -44
  116. package/docs/profiles/UiTableFooterSection.yml +0 -38
  117. package/docs/profiles/UiTag.yml +0 -41
  118. package/docs/profiles/UiTimePicker.yml +0 -46
  119. package/docs/profiles/UiToolbarButton.yml +0 -37
  120. package/docs/profiles/UiToolbarLink.yml +0 -32
  121. package/docs/profiles/UiTooltip.yml +0 -43
  122. package/docs/profiles/UiTransition.yml +0 -27
  123. package/docs/profiles/UiYandexMap.yml +0 -29
@@ -0,0 +1,87 @@
1
+ component: UiTableColumn
2
+ summary: >
3
+ UiTableColumn declares one logical column inside UiTable. It carries label and sizing metadata
4
+ and defines how header labels and cells render.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiTableColumn
10
+
11
+ related_components:
12
+ - UiTable
13
+
14
+ use_when:
15
+ - You define columns for UiTable.
16
+
17
+ avoid_when:
18
+ - You need standalone layout markup outside UiTable.
19
+
20
+ api:
21
+ key_props:
22
+ - name: label
23
+ - name: width
24
+ - name: minWidth
25
+ - name: maxWidth
26
+ - name: align
27
+ - name: valign
28
+ - name: trim
29
+ slots:
30
+ - name: default
31
+ zone: cell
32
+ creates: Cell content.
33
+ - name: cell
34
+ zone: cell
35
+ creates: Explicit cell content.
36
+ - name: label
37
+ zone: header-label
38
+ creates: Header label content.
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
51
+
52
+ composition:
53
+ works_well_with:
54
+ - UiTable
55
+ - UiTableSorter
56
+ - UiLink
57
+ - UiTag
58
+ patterns:
59
+ - title: Primary link column
60
+ notes: Put the row's main UiLink in the first meaningful text column and set link size to small.
61
+ - title: Sortable header
62
+ notes: Use the label slot with UiTableSorter when the column supports sorting.
63
+ - title: Status column
64
+ notes: Use UiTag for categorical statuses instead of raw colored text.
65
+
66
+ ai_notes:
67
+ do:
68
+ - Set minWidth for important text columns so generated tables remain scannable.
69
+ - Use align="right" for numbers, money, and percentages.
70
+ - Use trim only for narrow checkbox, icon, or action columns.
71
+ avoid:
72
+ - Do not place filters inside column labels; filters belong above the table.
73
+
74
+ behavior:
75
+ notes:
76
+ - Behavior is mostly coordinated by the parent component.
77
+ - Use this child only in the documented parent composition.
78
+
79
+ accessibility:
80
+ notes:
81
+ - This component is normally used inside its parent composition; accessibility behavior is completed by the parent component.
82
+ - Keep labels and visible text meaningful because parent keyboard and screen-reader behavior depends on child content.
83
+
84
+ styling:
85
+ notes:
86
+ - Use documented props and slots as the primary styling API.
87
+ - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
@@ -0,0 +1,85 @@
1
+ component: UiTableFooterButton
2
+ summary: >
3
+ UiTableFooterButton is a footer-scoped action control for custom table footer layouts.
4
+ It behaves like a table-specific button primitive rather than a full replacement for UiButton.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiTableFooterButton
10
+
11
+ related_components:
12
+ - UiTable
13
+ - UiTableFooterSection
14
+
15
+ use_when:
16
+ - You need an action inside a custom table footer area.
17
+
18
+ avoid_when:
19
+ - UiButton is enough outside table footer composition.
20
+ - You are not building custom footer structure.
21
+
22
+ api:
23
+ key_props:
24
+ - name: type
25
+ emits:
26
+ - name: click
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
+
40
+ ai_notes:
41
+ do:
42
+ - Keep it in table footer usage.
43
+ - Use for page-size, pagination, export, and compact table-scoped footer actions.
44
+ avoid:
45
+ - Do not substitute it for general page-level actions.
46
+
47
+ composition:
48
+ works_well_with:
49
+ - UiTableFooterSection
50
+ - UiTable
51
+ patterns:
52
+ - title: Pagination control
53
+ notes: Use inside footer-pagination slot for previous, next, and page controls.
54
+ states:
55
+ - name: ordinary-page
56
+ notes: Render the page number as UiTableFooterButton text.
57
+ - name: current-page
58
+ notes: Mark the active page with a local custom class and style it inside the table example scope.
59
+ - name: arrow
60
+ notes: Render the previous/next chevron icon inside UiTableFooterButton and provide an aria-label.
61
+ - name: passive-or-disabled
62
+ notes: Use disabled when the control is unavailable; use a local custom class only for visual passive states such as selected page size.
63
+ - title: Page-size control
64
+ notes: Use inside footer-page-size slot for compact page-size choices.
65
+
66
+ behavior:
67
+ notes:
68
+ - Behavior is mostly coordinated by the parent component.
69
+ - Use this child only in the documented parent composition.
70
+
71
+ accessibility:
72
+ notes:
73
+ - This component is normally used inside its parent composition; accessibility behavior is completed by the parent component.
74
+ - Keep labels and visible text meaningful because parent keyboard and screen-reader behavior depends on child content.
75
+
76
+ styling:
77
+ notes:
78
+ - Use documented props and slots as the primary styling API.
79
+ - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
80
+ - For footer pagination, style local custom classes on UiTableFooterButton instead of replacing it with UiButton.
81
+ - For page buttons, use a 36px square target with 4px radius, 14px text, black ordinary page color, and blue active background.
82
+ - For arrow buttons, use a 36px square target with a 24px chevron icon and grey color.
83
+ - Combine selectors like `.entity-list-table .ui-v1-table__footer-button.entity-list-table__pagination-button_current` when overriding active states, because base footer button styles set link-like colors.
84
+ root_classes:
85
+ - .ui-v1-table
@@ -0,0 +1,73 @@
1
+ component: UiTableFooterSection
2
+ summary: >
3
+ UiTableFooterSection is the low-level footer container for custom table footer layouts.
4
+ It is mainly useful when UiTable footer slots are not enough on their own.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiTableFooterSection
10
+
11
+ related_components:
12
+ - UiTable
13
+ - UiTableFooterButton
14
+
15
+ use_when:
16
+ - You compose custom footer content from public table primitives.
17
+
18
+ avoid_when:
19
+ - UiTable footer slots already solve the layout.
20
+ - You do not need explicit footer structure.
21
+
22
+ api:
23
+ slots:
24
+ - name: default
25
+ zone: footer-section-content
26
+ creates: Compact footer controls or metadata.
27
+
28
+ rendered_structure:
29
+ descriptive_only: true
30
+ root:
31
+ shape: div.ui-v1-table__footer-section
32
+ tag: div
33
+ notes: Renders one footer section wrapper inside the table footer controls area.
34
+
35
+ geometry:
36
+ layout: footer meta or control section
37
+ root_display: block
38
+ width_behavior: content-sized within the footer flex row
39
+
40
+ ai_notes:
41
+ do:
42
+ - Use it only as part of custom table footer composition.
43
+ - Keep content compact and table-scoped.
44
+ - Add local CSS on the table root for footer row height, background, typography, and pagination spacing when recreating the reference footer.
45
+ avoid:
46
+ - Do not treat it as a standalone layout section.
47
+
48
+ composition:
49
+ works_well_with:
50
+ - UiTable
51
+ - UiTableFooterButton
52
+ patterns:
53
+ - title: Structured table footer
54
+ notes: Use in footer-page-size, footer-export, and footer-pagination slots to match table footer spacing.
55
+
56
+ behavior:
57
+ notes:
58
+ - Behavior is mostly coordinated by the parent component.
59
+ - Use this child only in the documented parent composition.
60
+
61
+ accessibility:
62
+ notes:
63
+ - This component is normally used inside its parent composition; accessibility behavior is completed by the parent component.
64
+ - Keep labels and visible text meaningful because parent keyboard and screen-reader behavior depends on child content.
65
+
66
+ styling:
67
+ notes:
68
+ - Use documented props and slots as the primary styling API.
69
+ - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
70
+ - For reference-style footer controls, apply a local class to each UiTableFooterSection and style it through the UiTable root class.
71
+ - The pagination section usually needs padding-block 8px and an inner flex group with 8px gaps.
72
+ root_classes:
73
+ - .ui-v1-table
@@ -40,5 +40,31 @@ geometry:
40
40
  ai_notes:
41
41
  do:
42
42
  - Prefer UiTableColumn first for regular table headers.
43
+ - Use with UiTableSorter when building fully custom table structure.
43
44
  avoid:
44
45
  - Do not use it as a generic container outside table head rows.
46
+
47
+ composition:
48
+ works_well_with:
49
+ - UiTableSorter
50
+ - UiTableColumn
51
+ patterns:
52
+ - title: Low-level sortable head
53
+ notes: Use only when UiTableColumn label slot cannot express the needed header.
54
+
55
+ behavior:
56
+ notes:
57
+ - Behavior is mostly coordinated by the parent component.
58
+ - Use this child only in the documented parent composition.
59
+
60
+ accessibility:
61
+ notes:
62
+ - This component is normally used inside its parent composition; accessibility behavior is completed by the parent component.
63
+ - Keep labels and visible text meaningful because parent keyboard and screen-reader behavior depends on child content.
64
+
65
+ styling:
66
+ notes:
67
+ - Use documented props and slots as the primary styling API.
68
+ - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
69
+ root_classes:
70
+ - .ui-v1-table
@@ -41,5 +41,32 @@ geometry:
41
41
  ai_notes:
42
42
  do:
43
43
  - Pair it with explicit sort state in screen logic.
44
+ - Persist sort key and direction in URL query parameters when the table is routable.
45
+ - Reset the current page to 1 when sorting changes.
44
46
  avoid:
45
47
  - Do not use it as a generic icon-only control outside table headers.
48
+
49
+ composition:
50
+ works_well_with:
51
+ - UiTableColumn
52
+ - UiTableHeadCell
53
+ patterns:
54
+ - title: Column label slot
55
+ notes: Place in UiTableColumn label slot for normal sortable columns.
56
+
57
+ behavior:
58
+ notes:
59
+ - Behavior is mostly coordinated by the parent component.
60
+ - Use this child only in the documented parent composition.
61
+
62
+ accessibility:
63
+ notes:
64
+ - This component is normally used inside its parent composition; accessibility behavior is completed by the parent component.
65
+ - Keep labels and visible text meaningful because parent keyboard and screen-reader behavior depends on child content.
66
+
67
+ styling:
68
+ notes:
69
+ - Use documented props and slots as the primary styling API.
70
+ - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
71
+ root_classes:
72
+ - .ui-v1-table
@@ -0,0 +1,90 @@
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
+ examples:
11
+ - title: Slots
12
+ code: |
13
+ <template>
14
+ <UiTag background="#FEA530" saturated>
15
+ VIP
16
+ </UiTag>
17
+ </template>
18
+
19
+ <script lang="ts" setup>
20
+ import { UiTag } from '@retailcrm/embed-ui-v1-components/remote'
21
+ </script>
22
+
23
+ use_when:
24
+ - You need a short status or label pill.
25
+ - You need removable or interactive tags.
26
+
27
+ avoid_when:
28
+ - You need a full button or link.
29
+
30
+ api:
31
+ key_props:
32
+ - name: size
33
+ - name: pinned
34
+ - name: removable
35
+ - name: interactive
36
+ - name: saturated
37
+ - name: background
38
+ emits:
39
+ - name: click
40
+ - name: focus
41
+ - name: blur
42
+ - name: remove
43
+
44
+ rendered_structure:
45
+ descriptive_only: true
46
+ root:
47
+ shape: div.ui-v1-tag-wrapper
48
+ tag: div
49
+ notes: The public root is a wrapper div; the visible pill itself is the nested .ui-v1-tag node.
50
+
51
+ geometry:
52
+ layout: wrapper around a content-sized tag pill
53
+ root_display: block
54
+ width_behavior: root follows normal block flow, inner tag stays content-sized
55
+
56
+ behavior:
57
+ notes:
58
+ - interactive makes the tag feel actionable; use it only when click handling exists.
59
+ - removable should emit remove and needs a clear removal consequence.
60
+ - background is useful for semantic status palettes, but keep contrast readable.
61
+
62
+ composition:
63
+ works_well_with:
64
+ - UiTable
65
+ - UiSelectOption
66
+ - UiMenuItem
67
+ patterns:
68
+ - title: Table status
69
+ notes: Use in UiTable cells for categorical states instead of raw colored text.
70
+ - title: Removable filter chip
71
+ notes: Use removable tags to show active filters when space allows.
72
+
73
+ ai_notes:
74
+ do:
75
+ - Use for short statuses, categories, and active filter chips.
76
+ - Keep labels concise; tags should scan quickly.
77
+ avoid:
78
+ - Do not use as a full command button or as long explanatory text.
79
+
80
+ accessibility:
81
+ notes:
82
+ - Keep rendered text concise and meaningful for screen-reader users.
83
+ - Do not use this component as the only carrier of critical state if the state also needs form-level validation or focus management.
84
+
85
+ styling:
86
+ notes:
87
+ - Use documented props and slots as the primary styling API.
88
+ - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
89
+ root_classes:
90
+ - .ui-v1-tag-wrapper
@@ -13,6 +13,26 @@ related_components:
13
13
  - UiPageHeader
14
14
  - UiSelect
15
15
 
16
+ examples:
17
+ - title: Slots
18
+ code: |
19
+ <template>
20
+ <UiTextbox v-model:value="term">
21
+ <template #leading-icon>
22
+ <IconSearch aria-hidden="true" />
23
+ </template>
24
+ </UiTextbox>
25
+ </template>
26
+
27
+ <script lang="ts" setup>
28
+ import IconSearch from '@retailcrm/embed-ui-v1-components/assets/sprites/actions/search.svg'
29
+ import { UiTextbox } from '@retailcrm/embed-ui-v1-components/remote'
30
+
31
+ import { ref } from 'vue'
32
+
33
+ const term = ref('')
34
+ </script>
35
+
16
36
  use_when:
17
37
  - You need a standard text input.
18
38
  - You need search, email, phone, url, or password input.
@@ -346,38 +366,6 @@ composition:
346
366
  - title: Inline control
347
367
  notes: Use UiTextbox as a self-contained control, not as a wrapper for arbitrary content.
348
368
 
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
369
 
382
370
  ai_notes:
383
371
  do:
@@ -0,0 +1,144 @@
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
+ examples:
16
+ - title: Example
17
+ code: |
18
+ <template>
19
+ <UiTimePicker v-model:value="value" />
20
+ </template>
21
+
22
+ <script lang="ts" setup>
23
+ import { ref } from 'vue'
24
+ import { UiTimePicker } from '@retailcrm/embed-ui-v1-components/remote'
25
+
26
+ const value = ref('10:30')
27
+ </script>
28
+ - title: Option interval (`interval`)
29
+ code: |
30
+ <template>
31
+ <UiTimePicker
32
+ v-model:value="value"
33
+ :interval="15"
34
+ />
35
+ </template>
36
+
37
+ <script lang="ts" setup>
38
+ import { ref } from 'vue'
39
+ import { UiTimePicker } from '@retailcrm/embed-ui-v1-components/remote'
40
+
41
+ const value = ref('10:30')
42
+ </script>
43
+ - title: Range limit (`minTime` / `maxTime`)
44
+ code: |
45
+ <template>
46
+ <UiTimePicker
47
+ v-model:value="value"
48
+ :min-time="[9, 30]"
49
+ :max-time="[18, 0]"
50
+ />
51
+ </template>
52
+
53
+ <script lang="ts" setup>
54
+ import { ref } from 'vue'
55
+ import { UiTimePicker } from '@retailcrm/embed-ui-v1-components/remote'
56
+
57
+ const value = ref('10:30')
58
+ </script>
59
+ - title: Custom options (`timeVariants`)
60
+ code: |
61
+ <template>
62
+ <UiTimePicker
63
+ v-model:value="value"
64
+ :time-variants="['09:00', '09:30', '12:25', '16:00']"
65
+ />
66
+
67
+ </template>
68
+
69
+ <script lang="ts" setup>
70
+ import { ref } from 'vue'
71
+ import { UiTimePicker } from '@retailcrm/embed-ui-v1-components/remote'
72
+
73
+ const value = ref('10:30')
74
+ </script>
75
+ use_when:
76
+ - You need editable time input.
77
+ - You need bounded time variants or interval-based time selection.
78
+
79
+ avoid_when:
80
+ - You need raw text input without time semantics.
81
+
82
+ api:
83
+ key_props:
84
+ - name: value
85
+ - name: placeholder
86
+ - name: interval
87
+ - name: timeVariants
88
+ - name: minTime
89
+ - name: maxTime
90
+ - name: textboxOptions
91
+ methods:
92
+ - name: open
93
+ - name: close
94
+ - name: focus
95
+
96
+ rendered_structure:
97
+ descriptive_only: true
98
+ root:
99
+ shape: div.ui-v1-time-picker
100
+ tag: div
101
+ notes: The root is a combobox wrapper around the textbox-like trigger and the popper-based listbox.
102
+
103
+ geometry:
104
+ layout: combobox wrapper with floating menu
105
+ root_display: block
106
+ width_behavior: follows normal block flow for the wrapper, with a floating dropdown layer
107
+
108
+ behavior:
109
+ notes:
110
+ - interval and timeVariants shape the selectable list.
111
+ - minTime and maxTime constrain valid selection.
112
+ - textboxOptions should be used for trigger sizing and placeholder behavior.
113
+
114
+ composition:
115
+ works_well_with:
116
+ - UiField
117
+ - UiTextbox
118
+ patterns:
119
+ - title: Time field
120
+ notes: Wrap in UiField for forms and settings screens.
121
+ - title: Bounded scheduler input
122
+ notes: Use minTime, maxTime, and interval for schedules instead of allowing arbitrary text.
123
+
124
+ ai_notes:
125
+ do:
126
+ - Use for semantic time values and schedule inputs.
127
+ avoid:
128
+ - Do not use UiTextbox alone when the value must be a valid bounded time.
129
+
130
+ accessibility:
131
+ notes:
132
+ - Prefer visible text labels for interactive controls.
133
+ - For icon-only or custom visual content, provide an accessible name through the supported label, title, or ARIA attributes exposed by the component.
134
+ - Preserve native keyboard semantics by using the component root instead of recreating the control with arbitrary markup.
135
+ keyboard:
136
+ - Tab moves focus to the control when it is focusable.
137
+ - Enter or Space activates native button-like controls when the host implementation renders a button.
138
+
139
+ styling:
140
+ notes:
141
+ - Use documented props and slots as the primary styling API.
142
+ - Internal .ui-v1-* classes are descriptive implementation details for reasoning and debugging unless a profile marks them as public theme hooks.
143
+ root_classes:
144
+ - .ui-v1-time-picker
@@ -15,6 +15,22 @@ related_components:
15
15
  - UiCheckbox
16
16
  - UiSwitch
17
17
 
18
+ examples:
19
+ - title: Single toggle
20
+ code: |
21
+ <template>
22
+ <UiToggleButton :pressed="opened" @click="opened = !opened">
23
+ Filters
24
+ </UiToggleButton>
25
+ </template>
26
+
27
+ <script lang="ts" setup>
28
+ import { ref } from 'vue'
29
+ import { UiToggleButton } from '@retailcrm/embed-ui-v1-components/remote'
30
+
31
+ const opened = ref(false)
32
+ </script>
33
+
18
34
  use_when:
19
35
  - You need a button-looking control with externally managed pressed state.
20
36
  - You need a primitive for segmented controls or compact filter chips.
@@ -189,17 +205,6 @@ composition:
189
205
  - title: Segmented multi-select primitive
190
206
  notes: Use grouped buttons when composing a custom segmented row or when extending UiToggleGroup behavior.
191
207
 
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
208
 
204
209
  ai_notes:
205
210
  do: