@acronis-platform/ui-react 2.0.0 → 4.0.0

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 (243) hide show
  1. package/dist/components/ui/accordion-container/accordion-container.js +144 -0
  2. package/dist/components/ui/accordion-container/accordion-container.js.map +1 -0
  3. package/dist/components/ui/app-shell-chat/app-shell-chat.js.map +1 -1
  4. package/dist/components/ui/area-chart/area-chart.js +141 -139
  5. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  6. package/dist/components/ui/avatar/avatar.js +33 -22
  7. package/dist/components/ui/avatar/avatar.js.map +1 -1
  8. package/dist/components/ui/bar-chart/bar-chart.js +295 -293
  9. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  10. package/dist/components/ui/card/card.js +150 -74
  11. package/dist/components/ui/card/card.js.map +1 -1
  12. package/dist/components/ui/card-section/card-section.js +111 -0
  13. package/dist/components/ui/card-section/card-section.js.map +1 -0
  14. package/dist/components/ui/category-bar/category-bar.js +109 -93
  15. package/dist/components/ui/category-bar/category-bar.js.map +1 -1
  16. package/dist/components/ui/chart/chart-palette.js +113 -0
  17. package/dist/components/ui/chart/chart-palette.js.map +1 -0
  18. package/dist/components/ui/chart/chart.js +176 -129
  19. package/dist/components/ui/chart/chart.js.map +1 -1
  20. package/dist/components/ui/chart-state/chart-state-illustrations.js +310 -0
  21. package/dist/components/ui/chart-state/chart-state-illustrations.js.map +1 -0
  22. package/dist/components/ui/chart-state/chart-state.js +48 -34
  23. package/dist/components/ui/chart-state/chart-state.js.map +1 -1
  24. package/dist/components/ui/chart-widget/chart-widget.js +87 -0
  25. package/dist/components/ui/chart-widget/chart-widget.js.map +1 -0
  26. package/dist/components/ui/composed-chart/composed-chart.js +117 -115
  27. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  28. package/dist/components/ui/confidence-cone/confidence-cone.js +166 -158
  29. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  30. package/dist/components/ui/data-table/data-table.js +4 -2
  31. package/dist/components/ui/data-table/data-table.js.map +1 -1
  32. package/dist/components/ui/empty-overlay/empty-overlay.js +49 -0
  33. package/dist/components/ui/empty-overlay/empty-overlay.js.map +1 -0
  34. package/dist/components/ui/funnel-chart/funnel-chart.js +162 -161
  35. package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
  36. package/dist/components/ui/histogram/histogram.js +94 -92
  37. package/dist/components/ui/histogram/histogram.js.map +1 -1
  38. package/dist/components/ui/input/input.js.map +1 -1
  39. package/dist/components/ui/label/label.js +2 -9
  40. package/dist/components/ui/label/label.js.map +1 -1
  41. package/dist/components/ui/line-chart/line-chart.js +143 -141
  42. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  43. package/dist/components/ui/metric/metric.js +74 -185
  44. package/dist/components/ui/metric/metric.js.map +1 -1
  45. package/dist/components/ui/page-content/page-content.js.map +1 -1
  46. package/dist/components/ui/pie-chart/pie-chart.js +201 -195
  47. package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
  48. package/dist/components/ui/radar-chart/radar-chart.js +133 -131
  49. package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
  50. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +297 -265
  51. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
  52. package/dist/components/ui/sankey-chart/sankey-chart.js +123 -101
  53. package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -1
  54. package/dist/components/ui/scatter-chart/scatter-chart.js +76 -74
  55. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  56. package/dist/components/ui/section/section.js +157 -31
  57. package/dist/components/ui/section/section.js.map +1 -1
  58. package/dist/components/ui/stepper/stepper.js +24 -24
  59. package/dist/components/ui/stepper/stepper.js.map +1 -1
  60. package/dist/components/ui/stepper-item/stepper-item.js +43 -24
  61. package/dist/components/ui/stepper-item/stepper-item.js.map +1 -1
  62. package/dist/components/ui/table/table.js +27 -27
  63. package/dist/components/ui/table/table.js.map +1 -1
  64. package/dist/components/ui/treemap/treemap.js +133 -124
  65. package/dist/components/ui/treemap/treemap.js.map +1 -1
  66. package/dist/components/ui/trend-indicator/trend-indicator.js +34 -69
  67. package/dist/components/ui/trend-indicator/trend-indicator.js.map +1 -1
  68. package/dist/components/ui/wizard/wizard.js +59 -0
  69. package/dist/components/ui/wizard/wizard.js.map +1 -0
  70. package/dist/hooks/use-wizard.js +75 -0
  71. package/dist/hooks/use-wizard.js.map +1 -0
  72. package/dist/index.js +540 -525
  73. package/dist/index.js.map +1 -1
  74. package/dist/llms/accordion-container.md +181 -0
  75. package/dist/llms/accordion.md +124 -0
  76. package/dist/llms/alert.md +225 -0
  77. package/dist/llms/app-shell-chat.md +415 -0
  78. package/dist/llms/area-chart.md +355 -0
  79. package/dist/llms/avatar.md +208 -0
  80. package/dist/llms/bar-chart.md +406 -0
  81. package/dist/llms/breadcrumb.md +326 -0
  82. package/dist/llms/button-group.md +298 -0
  83. package/dist/llms/button-icon-input.md +142 -0
  84. package/dist/llms/button-icon-menu.md +209 -0
  85. package/dist/llms/button-icon.md +128 -0
  86. package/dist/llms/button-menu.md +172 -0
  87. package/dist/llms/button.md +185 -0
  88. package/dist/llms/calendar-panel.md +733 -0
  89. package/dist/llms/calendar.md +188 -0
  90. package/dist/llms/card-filter.md +214 -0
  91. package/dist/llms/card-section.md +293 -0
  92. package/dist/llms/card.md +447 -0
  93. package/dist/llms/carousel-dialog.md +156 -0
  94. package/dist/llms/category-bar.md +193 -0
  95. package/dist/llms/chart-state.md +190 -0
  96. package/dist/llms/chart-widget.md +209 -0
  97. package/dist/llms/chart.md +182 -0
  98. package/dist/llms/checkbox.md +257 -0
  99. package/dist/llms/chip.md +195 -0
  100. package/dist/llms/combobox.md +164 -0
  101. package/dist/llms/composed-chart.md +508 -0
  102. package/dist/llms/confidence-cone.md +277 -0
  103. package/dist/llms/data-table.md +474 -0
  104. package/dist/llms/date-range-picker.md +272 -0
  105. package/dist/llms/description-list.md +131 -0
  106. package/dist/llms/dialog-footer-carousel.md +147 -0
  107. package/dist/llms/dialog-footer-default.md +142 -0
  108. package/dist/llms/dialog-root.md +246 -0
  109. package/dist/llms/dialog-welcome.md +223 -0
  110. package/dist/llms/dialog.md +403 -0
  111. package/dist/llms/dropdown-menu.md +193 -0
  112. package/dist/llms/empty-overlay.md +146 -0
  113. package/dist/llms/empty.md +156 -0
  114. package/dist/llms/field.md +185 -0
  115. package/dist/llms/filter-cards.md +157 -0
  116. package/dist/llms/filter-chips.md +323 -0
  117. package/dist/llms/filter-search.md +512 -0
  118. package/dist/llms/form.md +154 -0
  119. package/dist/llms/funnel-chart.md +333 -0
  120. package/dist/llms/grid.md +80 -0
  121. package/dist/llms/histogram.md +190 -0
  122. package/dist/llms/input-date-picker.md +203 -0
  123. package/dist/llms/input-otp.md +173 -0
  124. package/dist/llms/input-password.md +197 -0
  125. package/dist/llms/input-search.md +170 -0
  126. package/dist/llms/input-select.md +278 -0
  127. package/dist/llms/input-text-area.md +271 -0
  128. package/dist/llms/input-text.md +192 -0
  129. package/dist/llms/line-chart.md +369 -0
  130. package/dist/llms/link.md +209 -0
  131. package/dist/llms/loading.md +130 -0
  132. package/dist/llms/meter.md +177 -0
  133. package/dist/llms/metric.md +204 -0
  134. package/dist/llms/number-field.md +122 -0
  135. package/dist/llms/page-content.md +69 -0
  136. package/dist/llms/page-header.md +182 -0
  137. package/dist/llms/pagination.md +133 -0
  138. package/dist/llms/pie-chart.md +307 -0
  139. package/dist/llms/popover.md +252 -0
  140. package/dist/llms/progress-circle.md +126 -0
  141. package/dist/llms/progress.md +111 -0
  142. package/dist/llms/radar-chart.md +316 -0
  143. package/dist/llms/radial-bar-chart.md +319 -0
  144. package/dist/llms/radio.md +255 -0
  145. package/dist/llms/resizable.md +195 -0
  146. package/dist/llms/sankey-chart.md +208 -0
  147. package/dist/llms/scatter-chart.md +239 -0
  148. package/dist/llms/scroll-area.md +183 -0
  149. package/dist/llms/section.md +401 -0
  150. package/dist/llms/select.md +210 -0
  151. package/dist/llms/separator.md +87 -0
  152. package/dist/llms/sheet.md +202 -0
  153. package/dist/llms/sidebar-primary.md +360 -0
  154. package/dist/llms/sidebar-secondary.md +417 -0
  155. package/dist/llms/skeleton.md +81 -0
  156. package/dist/llms/slider.md +97 -0
  157. package/dist/llms/spinner.md +100 -0
  158. package/dist/llms/stack.md +80 -0
  159. package/dist/llms/stepper-item.md +309 -0
  160. package/dist/llms/stepper.md +251 -0
  161. package/dist/llms/switch.md +140 -0
  162. package/dist/llms/table.md +436 -0
  163. package/dist/llms/tabs.md +197 -0
  164. package/dist/llms/tag.md +139 -0
  165. package/dist/llms/timeline.md +361 -0
  166. package/dist/llms/timer.md +259 -0
  167. package/dist/llms/toast.md +241 -0
  168. package/dist/llms/toggle-group.md +121 -0
  169. package/dist/llms/toolbar.md +453 -0
  170. package/dist/llms/tooltip.md +164 -0
  171. package/dist/llms/treemap.md +254 -0
  172. package/dist/llms/trend-indicator.md +132 -0
  173. package/dist/llms/widget-placeholder.md +169 -0
  174. package/dist/llms/wizard.md +412 -0
  175. package/dist/llms.txt +142 -0
  176. package/dist/react.js +540 -525
  177. package/dist/react.js.map +1 -1
  178. package/dist/src/components/ui/accordion-container/accordion-container.d.ts +44 -0
  179. package/dist/src/components/ui/accordion-container/index.d.ts +1 -0
  180. package/dist/src/components/ui/area-chart/area-chart.d.ts +9 -4
  181. package/dist/src/components/ui/avatar/avatar.d.ts +27 -8
  182. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +9 -4
  183. package/dist/src/components/ui/button/button.d.ts +1 -1
  184. package/dist/src/components/ui/card/card.d.ts +69 -8
  185. package/dist/src/components/ui/card/index.d.ts +1 -1
  186. package/dist/src/components/ui/card-section/card-section.d.ts +50 -0
  187. package/dist/src/components/ui/card-section/index.d.ts +1 -0
  188. package/dist/src/components/ui/category-bar/category-bar.d.ts +10 -4
  189. package/dist/src/components/ui/chart/__stories__/palette-control.d.ts +48 -0
  190. package/dist/src/components/ui/chart/__tests__/chart-palette.test.d.ts +1 -0
  191. package/dist/src/components/ui/chart/chart-palette.d.ts +128 -0
  192. package/dist/src/components/ui/chart/chart.d.ts +66 -15
  193. package/dist/src/components/ui/chart/index.d.ts +4 -2
  194. package/dist/src/components/ui/chart-state/chart-state-illustrations.d.ts +6 -0
  195. package/dist/src/components/ui/chart-state/chart-state.d.ts +13 -2
  196. package/dist/src/components/ui/chart-state/index.d.ts +1 -0
  197. package/dist/src/components/ui/chart-widget/chart-widget.d.ts +64 -0
  198. package/dist/src/components/ui/chart-widget/index.d.ts +1 -0
  199. package/dist/src/components/ui/composed-chart/composed-chart.d.ts +12 -7
  200. package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +10 -5
  201. package/dist/src/components/ui/dialog/dialog.d.ts +1 -1
  202. package/dist/src/components/ui/empty-overlay/empty-overlay.d.ts +20 -0
  203. package/dist/src/components/ui/empty-overlay/index.d.ts +2 -0
  204. package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +11 -5
  205. package/dist/src/components/ui/grid/grid.d.ts +1 -1
  206. package/dist/src/components/ui/histogram/histogram.d.ts +10 -4
  207. package/dist/src/components/ui/label/index.d.ts +1 -1
  208. package/dist/src/components/ui/label/label.d.ts +1 -5
  209. package/dist/src/components/ui/line-chart/line-chart.d.ts +9 -4
  210. package/dist/src/components/ui/metric/metric.d.ts +13 -14
  211. package/dist/src/components/ui/pie-chart/pie-chart.d.ts +17 -8
  212. package/dist/src/components/ui/radar-chart/radar-chart.d.ts +10 -5
  213. package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +17 -6
  214. package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +10 -5
  215. package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +10 -5
  216. package/dist/src/components/ui/section/index.d.ts +1 -1
  217. package/dist/src/components/ui/section/section.d.ts +75 -6
  218. package/dist/src/components/ui/sheet/sheet.d.ts +1 -1
  219. package/dist/src/components/ui/stack/stack.d.ts +1 -1
  220. package/dist/src/components/ui/stepper-item/stepper-item.d.ts +6 -5
  221. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  222. package/dist/src/components/ui/treemap/treemap.d.ts +11 -5
  223. package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +3 -7
  224. package/dist/src/components/ui/wizard/index.d.ts +1 -0
  225. package/dist/src/components/ui/wizard/wizard.d.ts +6 -0
  226. package/dist/src/hooks/index.d.ts +1 -0
  227. package/dist/src/hooks/use-wizard.d.ts +80 -0
  228. package/dist/src/index.d.ts +5 -3
  229. package/dist/ui-react.css +1 -1
  230. package/package.json +12 -6
  231. package/dist/components/ui/app-shell/app-shell.js +0 -75
  232. package/dist/components/ui/app-shell/app-shell.js.map +0 -1
  233. package/dist/components/ui/auth-layout/auth-layout.js +0 -56
  234. package/dist/components/ui/auth-layout/auth-layout.js.map +0 -1
  235. package/dist/components/ui/collapsible/collapsible.js +0 -22
  236. package/dist/components/ui/collapsible/collapsible.js.map +0 -1
  237. package/dist/src/components/ui/app-shell/app-shell.d.ts +0 -8
  238. package/dist/src/components/ui/app-shell/index.d.ts +0 -1
  239. package/dist/src/components/ui/auth-layout/auth-layout.d.ts +0 -6
  240. package/dist/src/components/ui/auth-layout/index.d.ts +0 -1
  241. package/dist/src/components/ui/collapsible/collapsible.d.ts +0 -5
  242. package/dist/src/components/ui/collapsible/index.d.ts +0 -1
  243. package/dist/src/components/ui/label/label.docs.d.ts +0 -10
@@ -0,0 +1,210 @@
1
+ # Select
2
+
3
+ > A form control that displays the current selection and reveals a list of predefined options when activated. Composed from parts (trigger, value, content, item); supports single or multiple selection. An alias of the next-gen `InputSelect` family, themed with the `--ui-input-select-*` token tier.
4
+
5
+ **Status:** ready · **Category:** forms · **Since:** v0.10.0
6
+
7
+ ## Import
8
+
9
+ ```tsx
10
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, SelectGroup, SelectGroupLabel } from '@acronis-platform/ui-react'
11
+ ```
12
+
13
+ ## Quick example
14
+
15
+ ```tsx
16
+ <Select items={{ apple: 'Apple', banana: 'Banana' }} value={fruit} onValueChange={setFruit}>
17
+ <SelectTrigger aria-label="Fruit">
18
+ <SelectValue placeholder="Select an option" />
19
+ </SelectTrigger>
20
+ <SelectContent>
21
+ <SelectItem value="apple">Apple</SelectItem>
22
+ <SelectItem value="banana">Banana</SelectItem>
23
+ </SelectContent>
24
+ </Select>
25
+ ```
26
+
27
+ A form control that shows the current selection and reveals a list of
28
+ predefined options when activated. Single or multiple selection.
29
+
30
+ ## When to use
31
+
32
+ - Choosing from a list of predefined options when screen space is limited.
33
+ - Single selection (default) or multiple selection (`multiple`).
34
+
35
+ ## When not to use
36
+
37
+ - A small number of options that should stay visible — use radio buttons
38
+ (single) or checkboxes (multiple) instead.
39
+ - Free-text entry or filtering a large/remote dataset — use an input or a
40
+ combobox/autocomplete pattern.
41
+
42
+ ## Anatomy
43
+
44
+ A composable set of parts:
45
+
46
+ | Part | Element | Role | Purpose |
47
+ | ------------------ | ---------- | ---------- | ----------------------------------- |
48
+ | `Select` | — (no DOM) | — | Owns open + selection state. |
49
+ | `SelectTrigger` | `button` | `combobox` | The control; opens the popup. |
50
+ | `SelectValue` | `span` | — | Selected label or placeholder. |
51
+ | `SelectContent` | `div` | `listbox` | Floating options panel (portaled). |
52
+ | `SelectItem` | `div` | `option` | A single option (+ selected check). |
53
+ | `SelectGroup` | `div` | `group` | Optional labelled section. |
54
+ | `SelectGroupLabel` | `div` | — | Heading for a group. |
55
+
56
+ ## Examples
57
+
58
+ ```tsx
59
+ import {
60
+ Select,
61
+ SelectTrigger,
62
+ SelectValue,
63
+ SelectContent,
64
+ SelectItem,
65
+ } from '@acronis-platform/ui-react';
66
+
67
+ // Pass `items` so the trigger can show the selected option's label while closed.
68
+ <Select items={{ apple: 'Apple', banana: 'Banana' }} defaultValue="apple">
69
+ <SelectTrigger aria-label="Fruit">
70
+ <SelectValue placeholder="Select an option" />
71
+ </SelectTrigger>
72
+ <SelectContent>
73
+ <SelectItem value="apple">Apple</SelectItem>
74
+ <SelectItem value="banana">Banana</SelectItem>
75
+ </SelectContent>
76
+ </Select>;
77
+ ```
78
+
79
+ Controlled:
80
+
81
+ ```tsx
82
+ <Select value={fruit} onValueChange={setFruit} items={items}>
83
+ …
84
+ </Select>
85
+ ```
86
+
87
+ Grouped options use `SelectGroup` + `SelectGroupLabel`. Label, description, and
88
+ error messaging are composed by the consumer (a Field component is future work).
89
+
90
+ ## Props
91
+
92
+ | Prop | Type | Default | Required | Description |
93
+ |------|------|---------|----------|-------------|
94
+ | `value` | `string | string[]` | — | no | Controlled selected value(s). Pair with the change event. |
95
+ | `default-value` | `string | string[]` | — | no | Initial selection when uncontrolled. |
96
+ | `open` | `boolean` | — | no | Controlled open state of the options popup. |
97
+ | `default-open` | `boolean` | `false` | no | Whether the popup is initially open when uncontrolled. |
98
+ | `disabled` | `boolean` | `false` | no | Disables the control; applies the disabled tokens and blocks opening. |
99
+ | `multiple` | `boolean` | `false` | no | Whether more than one option can be selected. |
100
+ | `required` | `boolean` | `false` | no | Marks the control as required in a form. |
101
+ | `name` | `string` | — | no | Form field name submitted with the form (via a hidden input). |
102
+ | `placeholder` | `string` | — | no | Hint shown by the value part when nothing is selected. |
103
+
104
+ ## Events
105
+
106
+ | Event | Payload | Description |
107
+ |-------|---------|-------------|
108
+ | `value-change` | `string | string[]` | Fired when the selection changes (React: `onValueChange`). Payload is the new value. |
109
+ | `open-change` | `boolean` | Fired when the popup opens or closes (React: `onOpenChange`). Payload is the new open state. |
110
+
111
+ ## Content slots
112
+
113
+ | Slot | Description |
114
+ |------|-------------|
115
+ | `default` | The composed select. Author it from the parts: a trigger wrapping the value, then content wrapping the items (optionally grouped). Provide an `items` map on the root so the value part can render a selected option's label while the popup is closed. |
116
+
117
+ ## Behavior
118
+
119
+ ### Opening
120
+
121
+ - **Given** an enabled, closed select
122
+ **When** the user presses the trigger (click, Space, Enter, or ArrowDown)
123
+ **Then** the popup opens (`open-change(true)`), the chevron rotates 180°, and
124
+ keyboard focus moves into the list.
125
+
126
+ - **Given** a disabled select
127
+ **When** the user presses the trigger
128
+ **Then** nothing happens — the popup does not open.
129
+
130
+ ### Selecting
131
+
132
+ - **Given** an open select
133
+ **When** the user clicks an option (or highlights it and presses Enter)
134
+ **Then** that option becomes the value, `value-change` fires with the new
135
+ value, the trigger shows the option's label, and — for a single select — the
136
+ popup closes.
137
+
138
+ - **Given** `multiple` is set
139
+ **When** the user activates options
140
+ **Then** each toggles in/out of the selection and the popup stays open.
141
+
142
+ - **Given** a selection exists
143
+ **When** the popup is open
144
+ **Then** the selected option shows its check indicator and is the initially
145
+ highlighted item.
146
+
147
+ ### Closing
148
+
149
+ - **Given** an open select
150
+ **When** the user presses Escape, clicks outside, or makes a single selection
151
+ **Then** the popup closes (`open-change(false)`) and focus returns to the
152
+ trigger.
153
+
154
+ ### Value display
155
+
156
+ - **Given** a value is selected but the popup is closed
157
+ **When** an `items` map is provided on the root
158
+ **Then** the trigger renders the selected option's **label** (not the raw
159
+ value). Without `items`, the raw value is shown.
160
+
161
+ ### Controlled vs uncontrolled
162
+
163
+ - **Given** `value` (or `open`) is controlled
164
+ **When** the user makes a selection (or toggles open)
165
+ **Then** internal state does **not** change on its own; the component emits the
166
+ change event and the consumer must update the prop to reflect it.
167
+ - **Given** only `default-value` / `default-open` is provided
168
+ **Then** the component manages the state itself.
169
+
170
+ ## Accessibility
171
+
172
+ Provided by the Base UI Select primitive; verify these hold after styling.
173
+
174
+ ## Roles & ARIA
175
+
176
+ - The trigger has `role="combobox"` with `aria-haspopup="listbox"` and
177
+ `aria-expanded` reflecting the open state.
178
+ - The popup has `role="listbox"` (with `aria-multiselectable` when `multiple`).
179
+ - Each option has `role="option"` with `aria-selected` reflecting selection;
180
+ a disabled option exposes `aria-disabled`.
181
+ - A group uses `role="group"` labelled by its group label.
182
+ - Provide an accessible name for the trigger (`aria-label` or a visible label
183
+ associated via `aria-labelledby`); the component ships no built-in label.
184
+ - A hidden form input carries `name`/`value` for form submission.
185
+
186
+ ## Keyboard
187
+
188
+ | Key | Action |
189
+ | ----------------------------------- | ------------------------------------------------- |
190
+ | Space / Enter / ArrowDown / ArrowUp | Open the popup when the trigger is focused. |
191
+ | ArrowUp / ArrowDown | Move the highlight between options while open. |
192
+ | Home / End | Highlight the first / last option. |
193
+ | Type-ahead | Jump to the option matching the typed characters. |
194
+ | Enter / Space | Select the highlighted option. |
195
+ | Escape | Close the popup without changing the selection. |
196
+ | Tab | Move focus out (closes the popup). |
197
+
198
+ ## Focus
199
+
200
+ - The trigger is the single tab stop. Opening moves focus into the list;
201
+ closing returns focus to the trigger.
202
+ - Keyboard focus paints a 3px `--ui-focus-primary` ring on the trigger
203
+ (`:focus-visible`), matching the Figma "Focused" state.
204
+
205
+ ## Contrast
206
+
207
+ - Trigger value text, placeholder, border, and the chevron all resolve to
208
+ `--ui-input-select-*` tokens that meet contrast in both light and dark themes.
209
+ - The disabled state uses the dedicated disabled tokens (not opacity), keeping
210
+ text legible.
@@ -0,0 +1,87 @@
1
+ # Separator
2
+
3
+ > A thin rule that visually and semantically divides content. Built on the Base UI Separator primitive (sets the `separator` role + aria-orientation). Ported from the legacy shadcn-uikit `Separator`; uses the shared divider token.
4
+
5
+ **Status:** draft · **Category:** layout · **Since:** v0.15.0
6
+
7
+ ## Import
8
+
9
+ ```tsx
10
+ import { Separator } from '@acronis-platform/ui-react'
11
+ ```
12
+
13
+ ## Quick example
14
+
15
+ ```tsx
16
+ <Separator className="my-4" />
17
+ <Separator orientation="vertical" />
18
+ ```
19
+
20
+ A thin rule that divides content, horizontally or vertically.
21
+
22
+ > **Status: draft (design-pending v1).** Ported from the legacy
23
+ > `@acronis-platform/shadcn-uikit` `Separator`; uses the shared `bg-border`
24
+ > divider token (no `--ui-separator-*` tier). Reconcile with
25
+ > `/figma-component Separator <url> --update` once a mockup lands.
26
+
27
+ ## When to use
28
+
29
+ - To separate groups of content or controls (sections, toolbar items, menu groups).
30
+
31
+ ## When not to use
32
+
33
+ - As spacing alone — use margins/padding.
34
+ - Inside a menu — group items into `DropdownMenuGroup`s instead; non-first
35
+ groups render a top-border separator automatically.
36
+
37
+ ## Example
38
+
39
+ ```tsx
40
+ import { Separator } from '@acronis-platform/ui-react';
41
+
42
+ <Separator className="my-4" />
43
+
44
+ <div className="flex h-5 items-center gap-4">
45
+ <span>Backup</span>
46
+ <Separator orientation="vertical" />
47
+ <span>Recovery</span>
48
+ </div>
49
+ ```
50
+
51
+ ## Props
52
+
53
+ | Prop | Type | Default | Required | Description |
54
+ |------|------|---------|----------|-------------|
55
+ | `orientation` | `'horizontal' | 'vertical'` | `'horizontal'` | no | Direction of the rule; sets aria-orientation and swaps the 1px dimension. |
56
+
57
+ ## Behavior
58
+
59
+ Separator is a static divider. It has no props beyond `orientation`, no state,
60
+ and no interaction.
61
+
62
+ ```gherkin
63
+ Scenario: Horizontal rule (default)
64
+ Given a Separator with no orientation
65
+ Then it renders a full-width, 1px-tall rule
66
+ ```
67
+
68
+ ```gherkin
69
+ Scenario: Vertical rule
70
+ Given a Separator with orientation="vertical"
71
+ Then it renders a full-height, 1px-wide rule and sets aria-orientation="vertical"
72
+ And it needs a sized (height-bearing) flex/inline context to be visible
73
+ ```
74
+
75
+ ## Accessibility
76
+
77
+ - Renders `role="separator"` (Base UI), with `aria-orientation` reflecting the
78
+ `orientation` prop — so assistive tech announces a divider.
79
+ - Use a separator to convey a _meaningful_ break between groups. For a purely
80
+ decorative line that should be ignored by assistive tech, hide it
81
+ (`aria-hidden`) instead.
82
+ - It is non-interactive and not in the tab order.
83
+
84
+ ## Contrast
85
+
86
+ The line uses `--ui-border-on-surface-border`, which meets non-text contrast
87
+ against the page surface in light and dark themes.
@@ -0,0 +1,202 @@
1
+ # Sheet
2
+
3
+ > A modal side panel anchored to a screen edge — for showing or acting on detailed information without leaving the page. Composable parts (trigger, overlay, content, header, title, close, body, description, footer) on the Base UI Dialog primitive, with a slide transition. Was `Details` in the Vue kit (re-exported under `Details*` aliases). Initial version ported from the legacy shadcn-uikit `Sheet`; design reconciliation against Figma (Cyber-Compliance node 3442-31542) is pending.
4
+
5
+ **Status:** draft · **Category:** overlays · **Since:** v0.42.0
6
+
7
+ ## Import
8
+
9
+ ```tsx
10
+ import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetCloseButton, SheetBody, SheetDescription, SheetFooter } from '@acronis-platform/ui-react'
11
+ ```
12
+
13
+ ## Quick example
14
+
15
+ ```tsx
16
+ <Sheet>
17
+ <SheetTrigger render={<Button variant="secondary">Open details</Button>} />
18
+ <SheetContent side="right">
19
+ <SheetHeader>
20
+ <SheetTitle>Workload details</SheetTitle>
21
+ <SheetCloseButton />
22
+ </SheetHeader>
23
+ <SheetBody>
24
+ <SheetDescription>Inspect the selected workload.</SheetDescription>
25
+ </SheetBody>
26
+ <SheetFooter>
27
+ <SheetClose render={<Button variant="ghost">Close</Button>} />
28
+ <Button>Edit</Button>
29
+ </SheetFooter>
30
+ </SheetContent>
31
+ </Sheet>
32
+ // `Details*` aliases (e.g. <Details>/<DetailsContent>) are equivalent — the
33
+ // Vue kit called this component Details.
34
+ ```
35
+
36
+ A modal side panel anchored to a screen edge — for showing or acting on detailed
37
+ information without leaving the page.
38
+
39
+ > **Status: draft (design-pending v1).** Ported from the legacy
40
+ > `@acronis-platform/shadcn-uikit` `Sheet` (the same Base UI Dialog primitive the
41
+ > `Dialog` component uses, edge-anchored). Themes on the shared semantic tokens
42
+ > like the Dialog family — no `--ui-sheet-*` tier yet. Reconcile with
43
+ > `/figma-component Sheet <url> --update` (Cyber-Compliance node 3442-31542).
44
+
45
+ ## `Details` is an alias
46
+
47
+ The Vue UI kit called this side panel **`Details`**. For a 1:1 migration the full
48
+ part family is re-exported under `Details*` (`Details`, `DetailsContent`,
49
+ `DetailsHeader`, `DetailsTitle`, `DetailsBody`, `DetailsFooter`, …). New code
50
+ should prefer `Sheet`.
51
+
52
+ ## When to use
53
+
54
+ - Inspecting or editing the details of a selected item (a row, a workload) beside
55
+ its list.
56
+ - A focused, dismissible task that shouldn't navigate away from the page.
57
+
58
+ ## When not to use
59
+
60
+ - A centered confirmation or short form — use `Dialog`.
61
+ - Persistent, non-modal page chrome — use a sidebar (`SidebarSecondary`), not a
62
+ modal sheet.
63
+
64
+ ## Parts
65
+
66
+ | Part | Element | Purpose |
67
+ | ------------------ | ------- | ------------------------------------------- |
68
+ | `Sheet` | — | Root; owns open state (`Details`). |
69
+ | `SheetTrigger` | button | Opens the sheet (polymorphic via `render`). |
70
+ | `SheetContent` | div | The portaled panel; `side` picks the edge. |
71
+ | `SheetHeader` | div | Title + close bar. |
72
+ | `SheetTitle` | h2 | Accessible name. |
73
+ | `SheetCloseButton` | button | Dismiss (×) button. |
74
+ | `SheetBody` | div | Scrollable content region. |
75
+ | `SheetDescription` | p | Supporting text. |
76
+ | `SheetFooter` | div | Right-aligned action bar. |
77
+ | `SheetClose` | button | Any element that dismisses (polymorphic). |
78
+
79
+ ## Example
80
+
81
+ ```tsx
82
+ import {
83
+ Sheet,
84
+ SheetTrigger,
85
+ SheetContent,
86
+ SheetHeader,
87
+ SheetTitle,
88
+ SheetCloseButton,
89
+ SheetBody,
90
+ SheetDescription,
91
+ SheetFooter,
92
+ } from '@acronis-platform/ui-react';
93
+
94
+ <Sheet>
95
+ <SheetTrigger render={<Button variant="secondary">Open details</Button>} />
96
+ <SheetContent side="right">
97
+ <SheetHeader>
98
+ <SheetTitle>Workload details</SheetTitle>
99
+ <SheetCloseButton />
100
+ </SheetHeader>
101
+ <SheetBody>
102
+ <SheetDescription>Inspect the selected workload.</SheetDescription>
103
+ </SheetBody>
104
+ <SheetFooter>
105
+ <Button>Edit</Button>
106
+ </SheetFooter>
107
+ </SheetContent>
108
+ </Sheet>;
109
+ ```
110
+
111
+ ## Props
112
+
113
+ | Prop | Type | Default | Required | Description |
114
+ |------|------|---------|----------|-------------|
115
+ | `open` | `boolean` | — | no | Controlled open state. Pair with the change event. |
116
+ | `default-open` | `boolean` | `false` | no | Initial open state when uncontrolled. |
117
+ | `modal` | `boolean | 'trap-focus'` | `true` | no | Modal behavior — traps focus and locks background scroll while open. `'trap-focus'` keeps the focus trap but allows background interaction. |
118
+ | `side` | `'top' | 'right' | 'bottom' | 'left'` | `'right'` | no | Screen edge the panel anchors to and slides in from (on the content part). Left/right are full-height; top/bottom are full-width. |
119
+ | `portal` | `boolean` | `true` | no | Render the content inside a portal (the content part). Required by the underlying primitive for correct stacking; disable only when supplying your own portal ancestor. |
120
+ | `render` | `RenderProp` | `undefined` | no | Composition prop available on the trigger, close, title, description, and other primitive parts — replaces the rendered element with another component (e.g. render the trigger as a Button) while merging props. React-only; other frameworks use their own polymorphism. |
121
+
122
+ ## Events
123
+
124
+ | Event | Payload | Description |
125
+ |-------|---------|-------------|
126
+ | `open-change` | `boolean` | Fired when the sheet opens or closes (React: `onOpenChange`). Payload is the new open value. |
127
+
128
+ ## Content slots
129
+
130
+ | Slot | Description |
131
+ |------|-------------|
132
+ | `default` | The composed sheet. Author it from the parts: an optional trigger, plus the content (panel) wrapping an optional header (title + close), a body (with a description), and an optional footer for actions. |
133
+
134
+ ## Behavior
135
+
136
+ Sheet is a modal side panel built on the Base UI Dialog primitive. It owns one
137
+ piece of state, `open`; `side` chooses the edge.
138
+
139
+ ```gherkin
140
+ Scenario: Open from a trigger
141
+ Given a Sheet with a SheetTrigger
142
+ When the user activates the trigger
143
+ Then the panel slides in from its side and the overlay covers the page
144
+ And open-change(true) is emitted
145
+ ```
146
+
147
+ ```gherkin
148
+ Scenario: Side
149
+ Given a SheetContent with side="left"
150
+ Then the panel anchors to the left edge and slides in from the left
151
+ (right is the default; top/bottom are full-width, left/right full-height)
152
+ ```
153
+
154
+ ```gherkin
155
+ Scenario: Dismiss
156
+ Given an open Sheet
157
+ When the user clicks the close button, presses Esc, or clicks the overlay
158
+ Then the panel slides out and open-change(false) is emitted
159
+ ```
160
+
161
+ ```gherkin
162
+ Scenario: Controlled
163
+ Given a Sheet with a controlled `open` prop
164
+ When a dismiss interaction occurs
165
+ Then open-change is emitted but the panel stays until the consumer updates `open`
166
+ ```
167
+
168
+ ```gherkin
169
+ Scenario: Focus + scroll
170
+ Given an open modal Sheet
171
+ Then focus is trapped within the panel and background scroll is locked
172
+ And focus returns to the trigger on close
173
+ ```
174
+
175
+ ```gherkin
176
+ Scenario: Details alias
177
+ Given the Vue kit's `Details` component
178
+ Then `Details*` (Details / DetailsContent / …) are aliases of `Sheet*` for a
179
+ 1:1 drop-in migration
180
+ ```
181
+
182
+ ## Accessibility
183
+
184
+ - The panel is a Base UI `Dialog.Popup`: `role="dialog"` + `aria-modal`, labelled
185
+ by `SheetTitle` (`aria-labelledby`) and described by `SheetDescription`
186
+ (`aria-describedby`). Always include a `SheetTitle` so the panel has an
187
+ accessible name.
188
+ - Focus is trapped within the open panel and returns to the trigger on close;
189
+ background scroll is locked while open (Base UI). `Esc` and an outside press
190
+ dismiss an uncontrolled sheet.
191
+ - The close button is a real button labelled "Close" (sr-only text) and shows a
192
+ visible focus ring (`--ui-focus-primary`).
193
+ - A side panel is still a modal dialog — keep it for focused tasks/detail views;
194
+ don't trap the user in one for primary navigation.
195
+
196
+ ## Contrast
197
+
198
+ Title uses `--ui-text-on-surface-primary` and description/close use
199
+ `--ui-text-on-surface-secondary` over the `--ui-background-surface-secondary`
200
+ panel; the header/footer bars use `--ui-background-surface-primary` divided by
201
+ `--ui-border-on-surface-border`. All meet text/non-text contrast in light and
202
+ dark.