@retailcrm/embed-ui-v1-components 0.9.13 → 0.9.15

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 (74) hide show
  1. package/AGENTS.md +126 -0
  2. package/README.md +24 -0
  3. package/assets/stylesheets/palette.less +11 -6
  4. package/bin/embed-ui-v1-components.mjs +209 -0
  5. package/bin/postinstall.mjs +37 -0
  6. package/dist/host.cjs +1900 -590
  7. package/dist/host.css +659 -6
  8. package/dist/host.d.ts +2374 -50
  9. package/dist/host.js +1901 -591
  10. package/dist/remote.cjs +610 -33
  11. package/dist/remote.d.ts +729 -48
  12. package/dist/remote.js +612 -35
  13. package/docs/AI.md +106 -0
  14. package/docs/COMPONENTS.md +96 -0
  15. package/docs/FORMAT.md +248 -0
  16. package/docs/PROFILES.md +64 -0
  17. package/docs/README.md +65 -0
  18. package/docs/STYLING.md +156 -0
  19. package/docs/profiles/UiAddButton.yml +45 -0
  20. package/docs/profiles/UiAlert.yml +36 -0
  21. package/docs/profiles/UiAvatar.yml +36 -0
  22. package/docs/profiles/UiAvatarList.yml +30 -0
  23. package/docs/profiles/UiButton.yml +221 -0
  24. package/docs/profiles/UiCalendar.yml +36 -0
  25. package/docs/profiles/UiCheckbox.yml +41 -0
  26. package/docs/profiles/UiCollapse.yml +28 -0
  27. package/docs/profiles/UiCollapseBox.yml +39 -0
  28. package/docs/profiles/UiCollapseGroup.yml +27 -0
  29. package/docs/profiles/UiCopyButton.yml +40 -0
  30. package/docs/profiles/UiDate.yml +26 -0
  31. package/docs/profiles/UiDatePicker.yml +47 -0
  32. package/docs/profiles/UiError.yml +20 -0
  33. package/docs/profiles/UiField.yml +229 -0
  34. package/docs/profiles/UiImage.yml +27 -0
  35. package/docs/profiles/UiInfobox.yml +33 -0
  36. package/docs/profiles/UiLink.yml +39 -0
  37. package/docs/profiles/UiLoader.yml +26 -0
  38. package/docs/profiles/UiMenuItem.yml +45 -0
  39. package/docs/profiles/UiMenuItemGroup.yml +38 -0
  40. package/docs/profiles/UiModalSidebar.yml +34 -0
  41. package/docs/profiles/UiModalWindow.yml +32 -0
  42. package/docs/profiles/UiModalWindowSurface.yml +29 -0
  43. package/docs/profiles/UiNumberStepper.yml +40 -0
  44. package/docs/profiles/UiPageHeader.yml +240 -0
  45. package/docs/profiles/UiPopper.yml +197 -0
  46. package/docs/profiles/UiPopperConnector.yml +109 -0
  47. package/docs/profiles/UiPopperTarget.yml +112 -0
  48. package/docs/profiles/UiRadio.yml +26 -0
  49. package/docs/profiles/UiRadioSwitch.yml +224 -0
  50. package/docs/profiles/UiRadioSwitchOption.yml +113 -0
  51. package/docs/profiles/UiScrollBox.yml +19 -0
  52. package/docs/profiles/UiSelect.yml +318 -0
  53. package/docs/profiles/UiSelectOption.yml +32 -0
  54. package/docs/profiles/UiSelectOptionGroup.yml +26 -0
  55. package/docs/profiles/UiSlider.yml +26 -0
  56. package/docs/profiles/UiSwitch.yml +25 -0
  57. package/docs/profiles/UiTab.yml +114 -0
  58. package/docs/profiles/UiTabGroup.yml +233 -0
  59. package/docs/profiles/UiTable.yml +148 -0
  60. package/docs/profiles/UiTableBodyCell.yml +35 -0
  61. package/docs/profiles/UiTableColumn.yml +38 -0
  62. package/docs/profiles/UiTableFooterButton.yml +32 -0
  63. package/docs/profiles/UiTableFooterSection.yml +26 -0
  64. package/docs/profiles/UiTableHeadCell.yml +32 -0
  65. package/docs/profiles/UiTableSorter.yml +33 -0
  66. package/docs/profiles/UiTag.yml +29 -0
  67. package/docs/profiles/UiTextbox.yml +388 -0
  68. package/docs/profiles/UiTimePicker.yml +34 -0
  69. package/docs/profiles/UiToolbarButton.yml +25 -0
  70. package/docs/profiles/UiToolbarLink.yml +20 -0
  71. package/docs/profiles/UiTooltip.yml +31 -0
  72. package/docs/profiles/UiTransition.yml +15 -0
  73. package/docs/profiles/UiYandexMap.yml +17 -0
  74. package/package.json +11 -2
@@ -0,0 +1,156 @@
1
+ # Styling Notes For AI
2
+
3
+ This document explains how to read styling information in `v1-components` profiles.
4
+
5
+ It exists to help AI agents reason about geometry, theming, and typography without treating
6
+ internal selectors as a guaranteed public styling API.
7
+
8
+ ## Boundary
9
+
10
+ - `.ui-v1-*` classes in profiles are primarily descriptive.
11
+ - Use them for mental modeling, debugging, and understanding layout zones.
12
+ - Prefer props and documented CSS custom properties over selector-based overrides.
13
+ - If a profile marks a variable as internal, do not treat it as a stable extension theming hook.
14
+
15
+ ## Shared Stylesheet Map
16
+
17
+ Most host component styles are built from the shared LESS files in
18
+ [`assets/stylesheets`](../assets/stylesheets/).
19
+
20
+ Use this map when a profile references shared tokens or mixins:
21
+
22
+ - [`typography.less`](../assets/stylesheets/typography.less)
23
+ primary source for font family, type scale, and typography mixins such as `h2-accent`,
24
+ `text-regular`, `text-small-accent`, and `text-tiny`.
25
+ - [`palette.less`](../assets/stylesheets/palette.less)
26
+ primary source for semantic color families such as `@blue-500`, `@grey-700`,
27
+ `@red-transparent`, and similar tokens.
28
+ - [`geometry.less`](../assets/stylesheets/geometry.less)
29
+ primary source for radius tokens and reusable geometry mixins such as
30
+ `reset-box-sizing`, `square`, `circle`, `border-radius-start`, and `border-radius-end`.
31
+ - [`variables.less`](../assets/stylesheets/variables.less)
32
+ primary source for shared spacing, drop shadows, and the common transition token used by
33
+ many components.
34
+ - [`motion.less`](../assets/stylesheets/motion.less)
35
+ narrow motion helper that currently repeats the shared transition token shape.
36
+ - [`layout.less`](../assets/stylesheets/layout.less)
37
+ legacy or narrow layout spacing aliases. Use with care and prefer `variables.less` when a
38
+ component already imports that file.
39
+
40
+ ## Component-Local Stylesheets
41
+
42
+ Some components also have local `variables.less` files next to the component styles.
43
+ Those files live in the source repository and are not part of the published package.
44
+
45
+ Typical examples include button, link, and modal component tokens.
46
+
47
+ These files usually define component-scale dimensions, icon sizes, or z-index-like local tokens.
48
+
49
+ Guideline:
50
+
51
+ - treat shared stylesheets as the primary design token layer;
52
+ - treat component-local `variables.less` as component-specific implementation tokens;
53
+ - mention local variables in a profile when they materially affect layout or generated markup decisions.
54
+
55
+ ## What To Read In A Profile
56
+
57
+ When a task is about styling or layout, read the `styling` section of the component profile:
58
+
59
+ - `root_classes`
60
+ - `state_classes`
61
+ - `zones`
62
+ - `css_variables`
63
+ - `typography`
64
+
65
+ This is the fastest path for questions like:
66
+
67
+ - which element actually owns the underline or border;
68
+ - which CSS variable changes popper padding or textbox active color;
69
+ - which typography scale is used by a given size variant;
70
+ - whether a slot creates a separate visual segment or just inline content.
71
+
72
+ ## Typography Scale
73
+
74
+ The shared type scale comes from [`../assets/stylesheets/typography.less`](../assets/stylesheets/typography.less).
75
+
76
+ Base font family:
77
+
78
+ - `-apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Roboto", sans-serif`
79
+
80
+ Main sizes:
81
+
82
+ - `h1`: `40px / 44px`
83
+ - `h2`: `24px / 32px`
84
+ - `h3`: `20px / 32px`
85
+ - `h4`: `18px / 28px`
86
+ - `text-regular`: `16px / 24px`
87
+ - `text-small`: `14px / 20px`
88
+ - `text-tiny`: `12px / 14px`
89
+
90
+ Common weights:
91
+
92
+ - normal: `400`
93
+ - accent: `500`
94
+
95
+ Notes:
96
+
97
+ - some accent heading mixins use stronger weights than the shared `@font-weight-accent` token;
98
+ - profiles should prefer recording the actual applied weight when it matters;
99
+ - size props often switch both geometry and typography together.
100
+
101
+ ## Spacing, Radius, And Motion Tokens
102
+
103
+ High-signal shared tokens:
104
+
105
+ - spacing from [`variables.less`](../assets/stylesheets/variables.less):
106
+ `@spacing-xxs`, `@spacing-xs`, `@spacing-s`, `@spacing-m`, `@spacing-l`, `@spacing-xl`, `@spacing-xxl`
107
+ - radius from [`geometry.less`](../assets/stylesheets/geometry.less):
108
+ `@border-radius-sm`, `@border-radius-md`, `@border-radius-lg`
109
+ - transition from [`variables.less`](../assets/stylesheets/variables.less) and [`motion.less`](../assets/stylesheets/motion.less):
110
+ `@transition`
111
+
112
+ When documenting a component profile:
113
+
114
+ - mention these tokens when they directly shape slot zones, paddings, or component sizes;
115
+ - avoid dumping every imported token if it does not affect component choice or layout reasoning.
116
+
117
+ ## CSS Variable Guidance
118
+
119
+ Profiles split CSS variables into practical groups:
120
+
121
+ - `public_theme_variables`
122
+ use these first when you need color, spacing, or popper-level theming.
123
+ - `inherited_component_variables`
124
+ variables reused from neighboring components, such as `UiSelect` reusing textbox color variables.
125
+ - `internal_layout_variables`
126
+ useful for reasoning and debugging, but not recommended as external override points.
127
+
128
+ ## Typical Safe Strategy
129
+
130
+ For style-sensitive generation:
131
+
132
+ 1. choose the correct component and size prop first;
133
+ 2. use documented slots to create the right visual zones;
134
+ 3. use documented CSS variables if a theme override is needed;
135
+ 4. avoid relying on internal descendant selectors unless the profile says that is safe.
136
+
137
+ ## How To Mention Styles In Profiles
138
+
139
+ A good `styling` section should answer:
140
+
141
+ - which shared stylesheet family the component mostly depends on;
142
+ - which root and state classes are useful for debugging;
143
+ - which CSS variables are realistic override points;
144
+ - which typography mixin or resulting type scale is active;
145
+ - whether local component variables materially affect size or geometry.
146
+
147
+ Do not try to mirror every imported token from LESS files. Keep only decision-making signal.
148
+
149
+ ## Reference Surface
150
+
151
+ - `assets/stylesheets/typography.less`
152
+ - `assets/stylesheets/palette.less`
153
+ - `assets/stylesheets/geometry.less`
154
+ - `assets/stylesheets/variables.less`
155
+ - `assets/stylesheets/layout.less`
156
+ - `assets/stylesheets/motion.less`
@@ -0,0 +1,45 @@
1
+ component: UiAddButton
2
+ summary: >
3
+ UiAddButton is an action-first button for add or create flows. It is close to UiButton,
4
+ but tuned for "create another item" scenarios and supports small descriptive additions.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiAddButton
10
+
11
+ related_components:
12
+ - UiButton
13
+ - UiToolbarButton
14
+
15
+ use_when:
16
+ - You need a dedicated create or add action.
17
+ - You need a compact add CTA with optional extra description.
18
+
19
+ avoid_when:
20
+ - You need a regular text link.
21
+ - You need a generic button without add semantics.
22
+
23
+ api:
24
+ key_props:
25
+ - name: color
26
+ - name: small
27
+ - name: disabled
28
+ - name: height
29
+ slots:
30
+ - name: icon
31
+ zone: leading-icon
32
+ creates: Leading icon area for the add action.
33
+ - name: description
34
+ zone: secondary-copy
35
+ creates: Optional secondary description near the main label.
36
+
37
+ behavior:
38
+ notes:
39
+ - Behaves like a clickable add action with standard button focus and click semantics.
40
+
41
+ ai_notes:
42
+ do:
43
+ - Use for create and add flows rather than generic submit actions.
44
+ avoid:
45
+ - Do not replace a plain UiButton unless the add semantics are intentional.
@@ -0,0 +1,36 @@
1
+ component: UiAlert
2
+ summary: >
3
+ UiAlert is a compact contextual message block for status, warning, success, and danger feedback.
4
+ It can be shown inline in normal page flow and can be closable.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiAlert
10
+
11
+ use_when:
12
+ - You need inline status feedback.
13
+ - You need dismissible page-level or section-level notice content.
14
+
15
+ avoid_when:
16
+ - You need a blocking modal message.
17
+ - You need a tiny field-level validation hint.
18
+
19
+ api:
20
+ key_props:
21
+ - name: variant
22
+ - name: text
23
+ - name: shown
24
+ - name: closable
25
+ - name: fluid
26
+
27
+ behavior:
28
+ notes:
29
+ - shown controls visibility.
30
+ - closable enables user dismissal.
31
+
32
+ ai_notes:
33
+ do:
34
+ - Use UiAlert for inline feedback that should stay in normal layout flow.
35
+ avoid:
36
+ - Do not use it as a replacement for modal confirmation.
@@ -0,0 +1,36 @@
1
+ component: UiAvatar
2
+ summary: >
3
+ UiAvatar renders a user or entity avatar with optional name, status, and link semantics.
4
+ It is meant for compact identity display rather than generic image rendering.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiAvatar
10
+
11
+ use_when:
12
+ - You need a compact identity marker for a user or contact.
13
+ - You need avatar display with optional status.
14
+
15
+ avoid_when:
16
+ - You need a generic content image.
17
+ - You need a large media block.
18
+
19
+ api:
20
+ key_props:
21
+ - name: src
22
+ - name: name
23
+ - name: status
24
+ - name: size
25
+ - name: href
26
+
27
+ behavior:
28
+ notes:
29
+ - Can render linked avatar behavior when href is provided.
30
+ - Name is useful as fallback identity information.
31
+
32
+ ai_notes:
33
+ do:
34
+ - Use UiAvatar for identity display, not for general media.
35
+ avoid:
36
+ - Do not use it where UiImage is the better semantic fit.
@@ -0,0 +1,30 @@
1
+ component: UiAvatarList
2
+ summary: >
3
+ UiAvatarList renders a compact list of avatars with consistent sizing. It is useful for showing
4
+ several users or actors in a narrow area.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiAvatarList
10
+
11
+ related_components:
12
+ - UiAvatar
13
+
14
+ use_when:
15
+ - You need a short list of user avatars.
16
+ - You need a compact representation of several people.
17
+
18
+ avoid_when:
19
+ - You need full profile cards or detailed user rows.
20
+
21
+ api:
22
+ key_props:
23
+ - name: avatars
24
+ - name: size
25
+
26
+ ai_notes:
27
+ do:
28
+ - Use for compact grouped identity display.
29
+ avoid:
30
+ - Do not use it as a replacement for a full people list.
@@ -0,0 +1,221 @@
1
+ component: UiButton
2
+ summary: >
3
+ UiButton is the main action component in the library. It covers primary, secondary,
4
+ tertiary, and outlined use cases, can render as either a button or an anchor,
5
+ and adapts well to text-plus-icon and icon-only content.
6
+
7
+ public_import:
8
+ from: '@retailcrm/embed-ui-v1-components/remote'
9
+ named:
10
+ - UiButton
11
+
12
+ use_when:
13
+ - You need a primary or secondary action in a form or screen.
14
+ - You need an inline action in a header, modal, infobox, or toolbar-like area.
15
+ - You need a clickable element that follows the standard visual language.
16
+ - You need a link that should read visually as a button.
17
+
18
+ avoid_when:
19
+ - You need an inline text link in copy, use UiLink instead.
20
+ - You need toolbar-specific semantics, use UiToolbarButton or UiToolbarLink instead.
21
+ - You need a toggle with its own state model, not a simple action.
22
+
23
+ api:
24
+ key_props:
25
+ - name: appearance
26
+ values:
27
+ - primary
28
+ - secondary
29
+ - tertiary
30
+ - outlined
31
+ notes: Defines visual priority.
32
+ - name: variant
33
+ values:
34
+ - default
35
+ - success
36
+ - danger
37
+ notes: Defines semantic color treatment.
38
+ - name: size
39
+ values:
40
+ - lg
41
+ - md
42
+ - sm
43
+ - xs
44
+ notes: Affects height and paddings.
45
+ - name: href
46
+ notes: If present, the root renders as an anchor.
47
+ - name: disabled
48
+ notes: Disables interaction and enables disabled styling.
49
+ props:
50
+ - name: type
51
+ notes: Native button type for button shape.
52
+ - name: active
53
+ notes: Enables pressed-like visual state.
54
+ - name: locked
55
+ notes: Separate locked state distinct from disabled.
56
+ slots:
57
+ - name: default
58
+ zone: content
59
+ creates: The full inner content of the button.
60
+ accepts:
61
+ recommended:
62
+ - text
63
+ - text plus one icon
64
+ - icon component
65
+ - svg
66
+ avoid:
67
+ - block layout containers
68
+ - nested buttons or links
69
+ - long rich markup trees
70
+ layout_effect: Text and icon nodes are normalized into inner spans; icon-only content can produce a square button.
71
+ notes: Main button content, usually text plus optional icons.
72
+ methods:
73
+ - name: click
74
+ notes: Triggers a click programmatically.
75
+ - name: focus
76
+ notes: Focuses the button or anchor root.
77
+ - name: blur
78
+ notes: Removes focus.
79
+
80
+ rendered_structure:
81
+ descriptive_only: true
82
+ notes: >
83
+ This internal DOM description is useful for reasoning, not for styling against implementation details.
84
+ root:
85
+ button_shape: button.ui-v1-button
86
+ link_shape: a.ui-v1-button
87
+ zones:
88
+ - .ui-v1-button__content
89
+ - text span
90
+ - icon span(s)
91
+ state_classes:
92
+ - .ui-v1-button_active
93
+ - .ui-v1-button_disabled
94
+ - .ui-v1-button_locked
95
+
96
+ geometry:
97
+ layout: inline-block
98
+ notes:
99
+ - Size controls dimensions and internal paddings.
100
+ - Icon-only content leads to a square-like layout through state classes.
101
+ - The component fits naturally into inline rows, header actions, and compact action zones.
102
+
103
+ styling:
104
+ notes:
105
+ - Props like appearance, variant, size, active, locked, and disabled are the primary styling API.
106
+ - Internal classes are useful for reasoning and debugging, not a guaranteed selector contract.
107
+ - The component uses local CSS variables internally, but no dedicated external theme variable set is documented for consumers.
108
+ root_classes:
109
+ - .ui-v1-button
110
+ state_classes:
111
+ - .ui-v1-button_primary
112
+ - .ui-v1-button_secondary
113
+ - .ui-v1-button_tertiary
114
+ - .ui-v1-button_outlined
115
+ - .ui-v1-button_success
116
+ - .ui-v1-button_danger
117
+ - .ui-v1-button_active
118
+ - .ui-v1-button_disabled
119
+ - .ui-v1-button_locked
120
+ - .ui-v1-button_filled
121
+ - .ui-v1-button_square
122
+ - .ui-v1-button_has-leading-icon
123
+ - .ui-v1-button_has-trailing-icon
124
+ - .ui-v1-button_lg
125
+ - .ui-v1-button_md
126
+ - .ui-v1-button_sm
127
+ - .ui-v1-button_xs
128
+ zones:
129
+ - .ui-v1-button__content
130
+ - .ui-v1-button__icon
131
+ - .ui-v1-button__text
132
+ css_variables:
133
+ internal_layout_variables:
134
+ - name: --text-color
135
+ effect: Current text and icon color.
136
+ - name: --background-color
137
+ effect: Current background color for appearance variants.
138
+ - name: --background-color-active
139
+ effect: Active background color for variants that use it.
140
+ - name: --background-color-disabled
141
+ effect: Disabled background color for variants that use it.
142
+ - name: --background-image
143
+ effect: Gradient background for appearances that use it.
144
+ - name: --border-color-active
145
+ effect: Active border color in tertiary mode.
146
+ - name: --border-color-hover
147
+ effect: Hover border color in tertiary mode.
148
+ - name: --outlined-color-main
149
+ effect: Main outline and hover-fill color in outlined mode.
150
+ - name: --outlined-color-reverse
151
+ effect: Text color after outlined hover or active inversion.
152
+ typography:
153
+ size_variants:
154
+ - name: lg
155
+ mixin: h4-accent
156
+ size: 18px
157
+ line_height: 28px
158
+ weight: 500
159
+ - name: md
160
+ mixin: text-regular-accent
161
+ size: 16px
162
+ line_height: 24px
163
+ weight: 500
164
+ - name: sm
165
+ mixin: text-small-accent
166
+ size: 14px
167
+ line_height: 20px
168
+ weight: 500
169
+ - name: xs
170
+ mixin: text-tiny-accent
171
+ size: 12px
172
+ line_height: 14px
173
+ weight: 500
174
+ notes:
175
+ - Primary buttons explicitly use medium-like weight.
176
+ - Outlined buttons raise weight further for stronger label contrast.
177
+
178
+ behavior:
179
+ states:
180
+ - name: appearance
181
+ notes: Selects the base visual priority.
182
+ - name: variant
183
+ notes: Changes semantic color without changing component type.
184
+ - name: active
185
+ notes: Enables pressed-like styling.
186
+ - name: disabled
187
+ notes: Disables interaction and native button behavior.
188
+ - name: locked
189
+ notes: Enables the separate locked state.
190
+ notes:
191
+ - If href is present, the component becomes a link-shaped action.
192
+
193
+ accessibility:
194
+ notes:
195
+ - Button shape uses native button semantics.
196
+ - Anchor shape uses native anchor semantics.
197
+ - If icons are present, text labeling should remain understandable.
198
+
199
+ composition:
200
+ works_well_with:
201
+ - UiPageHeader actions
202
+ - UiField
203
+ - UiInfobox
204
+ - modal actions
205
+
206
+ examples:
207
+ - title: Dangerous secondary action
208
+ goal: Build a secondary destructive action.
209
+ code: |
210
+ <UiButton appearance="secondary" variant="danger">
211
+ <IconDelete aria-hidden="true" />
212
+ Delete
213
+ </UiButton>
214
+
215
+ ai_notes:
216
+ do:
217
+ - Start with appearance=primary for the main CTA.
218
+ - Use secondary or tertiary for neighboring actions near titles.
219
+ avoid:
220
+ - Do not replace UiButton with UiLink when the action should read as a button.
221
+ - Do not use UiButton for regular inline text navigation.
@@ -0,0 +1,36 @@
1
+ component: UiCalendar
2
+ summary: >
3
+ UiCalendar is the date selection primitive behind date and date-range flows. It supports
4
+ single and range selection, multiple visual appearances, and locale-sensitive behavior.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiCalendar
10
+
11
+ use_when:
12
+ - You need inline date selection.
13
+ - You need single-date or date-range picking without a textbox wrapper.
14
+
15
+ avoid_when:
16
+ - You need the full textbox-plus-popper date picker flow.
17
+
18
+ api:
19
+ key_props:
20
+ - name: value
21
+ - name: type
22
+ - name: appearance
23
+ - name: minDate
24
+ - name: maxDate
25
+ - name: locale
26
+
27
+ behavior:
28
+ notes:
29
+ - Supports single and range selection.
30
+ - minDate and maxDate constrain selection.
31
+
32
+ ai_notes:
33
+ do:
34
+ - Use UiCalendar when inline calendar selection is the actual UI.
35
+ avoid:
36
+ - Use UiDatePicker instead if users expect textbox plus popup behavior.
@@ -0,0 +1,41 @@
1
+ component: UiCheckbox
2
+ summary: >
3
+ UiCheckbox is a boolean or set-membership control. It supports single boolean-like usage
4
+ as well as model-plus-value patterns for checkbox groups.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiCheckbox
10
+
11
+ use_when:
12
+ - You need a yes or no control.
13
+ - You need one value inside a checkbox group model.
14
+
15
+ avoid_when:
16
+ - You need exclusive single choice, use UiRadio instead.
17
+ - You need a more compact toggle-like control, use UiSwitch instead.
18
+
19
+ api:
20
+ key_props:
21
+ - name: model
22
+ - name: value
23
+ - name: indeterminate
24
+ - name: valueOfTruthy
25
+ - name: valueOfFalsy
26
+ - name: disabled
27
+ methods:
28
+ - name: click
29
+ - name: focus
30
+ - name: blur
31
+
32
+ behavior:
33
+ notes:
34
+ - model plus value supports group-style selection.
35
+ - indeterminate is useful for partial selection states.
36
+
37
+ ai_notes:
38
+ do:
39
+ - Use for boolean choice or checkbox-group membership.
40
+ avoid:
41
+ - Do not use for mutually exclusive options.
@@ -0,0 +1,28 @@
1
+ component: UiCollapse
2
+ summary: >
3
+ UiCollapse is a low-level show and hide container for expandable content. It controls
4
+ whether content is hidden or disposed and how the transition behaves.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiCollapse
10
+
11
+ use_when:
12
+ - You need conditional expandable content.
13
+ - You need to choose between hidden and disposed collapsed states.
14
+
15
+ avoid_when:
16
+ - You need a ready-to-use disclosure box with header UI, use UiCollapseBox instead.
17
+
18
+ api:
19
+ key_props:
20
+ - name: expanded
21
+ - name: collapseBehaviour
22
+ - name: duration
23
+
24
+ ai_notes:
25
+ do:
26
+ - Use UiCollapse as a primitive for expandable content regions.
27
+ avoid:
28
+ - Do not use it when a full disclosure component is the actual need.
@@ -0,0 +1,39 @@
1
+ component: UiCollapseBox
2
+ summary: >
3
+ UiCollapseBox is a structured expandable container with built-in header, state handling,
4
+ and visual treatment. It is a higher-level companion to UiCollapse.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiCollapseBox
10
+
11
+ related_components:
12
+ - UiCollapse
13
+ - UiCollapseGroup
14
+
15
+ use_when:
16
+ - You need a ready-to-use collapsible box.
17
+ - You need grouped expandable sections with consistent visuals.
18
+
19
+ avoid_when:
20
+ - You need a bare collapse primitive without box chrome.
21
+
22
+ api:
23
+ key_props:
24
+ - name: expanded
25
+ - name: expandable
26
+ - name: collapsible
27
+ - name: toggleable
28
+ - name: disabled
29
+ - name: color
30
+
31
+ behavior:
32
+ notes:
33
+ - Supports controlled expanded state and grouped interaction.
34
+
35
+ ai_notes:
36
+ do:
37
+ - Use UiCollapseBox for structured disclosure UI.
38
+ avoid:
39
+ - Do not rebuild collapse header UI manually when this component already fits.
@@ -0,0 +1,27 @@
1
+ component: UiCollapseGroup
2
+ summary: >
3
+ UiCollapseGroup coordinates several collapse boxes and tracks which box is active.
4
+ It is useful when multiple disclosures should behave as one grouped unit.
5
+
6
+ public_import:
7
+ from: '@retailcrm/embed-ui-v1-components/remote'
8
+ named:
9
+ - UiCollapseGroup
10
+
11
+ related_components:
12
+ - UiCollapseBox
13
+
14
+ use_when:
15
+ - You need several collapse boxes to coordinate state.
16
+ - You need one active box pattern.
17
+
18
+ avoid_when:
19
+ - You only have one collapsible section.
20
+
21
+ api:
22
+ key_props:
23
+ - name: activeBoxId
24
+
25
+ ai_notes:
26
+ do:
27
+ - Use with UiCollapseBox when grouped expansion matters.