@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.
- package/dist/components/ui/accordion-container/accordion-container.js +144 -0
- package/dist/components/ui/accordion-container/accordion-container.js.map +1 -0
- package/dist/components/ui/app-shell-chat/app-shell-chat.js.map +1 -1
- package/dist/components/ui/area-chart/area-chart.js +141 -139
- package/dist/components/ui/area-chart/area-chart.js.map +1 -1
- package/dist/components/ui/avatar/avatar.js +33 -22
- package/dist/components/ui/avatar/avatar.js.map +1 -1
- package/dist/components/ui/bar-chart/bar-chart.js +295 -293
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/ui/card/card.js +150 -74
- package/dist/components/ui/card/card.js.map +1 -1
- package/dist/components/ui/card-section/card-section.js +111 -0
- package/dist/components/ui/card-section/card-section.js.map +1 -0
- package/dist/components/ui/category-bar/category-bar.js +109 -93
- package/dist/components/ui/category-bar/category-bar.js.map +1 -1
- package/dist/components/ui/chart/chart-palette.js +113 -0
- package/dist/components/ui/chart/chart-palette.js.map +1 -0
- package/dist/components/ui/chart/chart.js +176 -129
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/chart-state/chart-state-illustrations.js +310 -0
- package/dist/components/ui/chart-state/chart-state-illustrations.js.map +1 -0
- package/dist/components/ui/chart-state/chart-state.js +48 -34
- package/dist/components/ui/chart-state/chart-state.js.map +1 -1
- package/dist/components/ui/chart-widget/chart-widget.js +87 -0
- package/dist/components/ui/chart-widget/chart-widget.js.map +1 -0
- package/dist/components/ui/composed-chart/composed-chart.js +117 -115
- package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
- package/dist/components/ui/confidence-cone/confidence-cone.js +166 -158
- package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
- package/dist/components/ui/data-table/data-table.js +4 -2
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/components/ui/empty-overlay/empty-overlay.js +49 -0
- package/dist/components/ui/empty-overlay/empty-overlay.js.map +1 -0
- package/dist/components/ui/funnel-chart/funnel-chart.js +162 -161
- package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
- package/dist/components/ui/histogram/histogram.js +94 -92
- package/dist/components/ui/histogram/histogram.js.map +1 -1
- package/dist/components/ui/input/input.js.map +1 -1
- package/dist/components/ui/label/label.js +2 -9
- package/dist/components/ui/label/label.js.map +1 -1
- package/dist/components/ui/line-chart/line-chart.js +143 -141
- package/dist/components/ui/line-chart/line-chart.js.map +1 -1
- package/dist/components/ui/metric/metric.js +74 -185
- package/dist/components/ui/metric/metric.js.map +1 -1
- package/dist/components/ui/page-content/page-content.js.map +1 -1
- package/dist/components/ui/pie-chart/pie-chart.js +201 -195
- package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
- package/dist/components/ui/radar-chart/radar-chart.js +133 -131
- package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +297 -265
- package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
- package/dist/components/ui/sankey-chart/sankey-chart.js +123 -101
- package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -1
- package/dist/components/ui/scatter-chart/scatter-chart.js +76 -74
- package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
- package/dist/components/ui/section/section.js +157 -31
- package/dist/components/ui/section/section.js.map +1 -1
- package/dist/components/ui/stepper/stepper.js +24 -24
- package/dist/components/ui/stepper/stepper.js.map +1 -1
- package/dist/components/ui/stepper-item/stepper-item.js +43 -24
- package/dist/components/ui/stepper-item/stepper-item.js.map +1 -1
- package/dist/components/ui/table/table.js +27 -27
- package/dist/components/ui/table/table.js.map +1 -1
- package/dist/components/ui/treemap/treemap.js +133 -124
- package/dist/components/ui/treemap/treemap.js.map +1 -1
- package/dist/components/ui/trend-indicator/trend-indicator.js +34 -69
- package/dist/components/ui/trend-indicator/trend-indicator.js.map +1 -1
- package/dist/components/ui/wizard/wizard.js +59 -0
- package/dist/components/ui/wizard/wizard.js.map +1 -0
- package/dist/hooks/use-wizard.js +75 -0
- package/dist/hooks/use-wizard.js.map +1 -0
- package/dist/index.js +540 -525
- package/dist/index.js.map +1 -1
- package/dist/llms/accordion-container.md +181 -0
- package/dist/llms/accordion.md +124 -0
- package/dist/llms/alert.md +225 -0
- package/dist/llms/app-shell-chat.md +415 -0
- package/dist/llms/area-chart.md +355 -0
- package/dist/llms/avatar.md +208 -0
- package/dist/llms/bar-chart.md +406 -0
- package/dist/llms/breadcrumb.md +326 -0
- package/dist/llms/button-group.md +298 -0
- package/dist/llms/button-icon-input.md +142 -0
- package/dist/llms/button-icon-menu.md +209 -0
- package/dist/llms/button-icon.md +128 -0
- package/dist/llms/button-menu.md +172 -0
- package/dist/llms/button.md +185 -0
- package/dist/llms/calendar-panel.md +733 -0
- package/dist/llms/calendar.md +188 -0
- package/dist/llms/card-filter.md +214 -0
- package/dist/llms/card-section.md +293 -0
- package/dist/llms/card.md +447 -0
- package/dist/llms/carousel-dialog.md +156 -0
- package/dist/llms/category-bar.md +193 -0
- package/dist/llms/chart-state.md +190 -0
- package/dist/llms/chart-widget.md +209 -0
- package/dist/llms/chart.md +182 -0
- package/dist/llms/checkbox.md +257 -0
- package/dist/llms/chip.md +195 -0
- package/dist/llms/combobox.md +164 -0
- package/dist/llms/composed-chart.md +508 -0
- package/dist/llms/confidence-cone.md +277 -0
- package/dist/llms/data-table.md +474 -0
- package/dist/llms/date-range-picker.md +272 -0
- package/dist/llms/description-list.md +131 -0
- package/dist/llms/dialog-footer-carousel.md +147 -0
- package/dist/llms/dialog-footer-default.md +142 -0
- package/dist/llms/dialog-root.md +246 -0
- package/dist/llms/dialog-welcome.md +223 -0
- package/dist/llms/dialog.md +403 -0
- package/dist/llms/dropdown-menu.md +193 -0
- package/dist/llms/empty-overlay.md +146 -0
- package/dist/llms/empty.md +156 -0
- package/dist/llms/field.md +185 -0
- package/dist/llms/filter-cards.md +157 -0
- package/dist/llms/filter-chips.md +323 -0
- package/dist/llms/filter-search.md +512 -0
- package/dist/llms/form.md +154 -0
- package/dist/llms/funnel-chart.md +333 -0
- package/dist/llms/grid.md +80 -0
- package/dist/llms/histogram.md +190 -0
- package/dist/llms/input-date-picker.md +203 -0
- package/dist/llms/input-otp.md +173 -0
- package/dist/llms/input-password.md +197 -0
- package/dist/llms/input-search.md +170 -0
- package/dist/llms/input-select.md +278 -0
- package/dist/llms/input-text-area.md +271 -0
- package/dist/llms/input-text.md +192 -0
- package/dist/llms/line-chart.md +369 -0
- package/dist/llms/link.md +209 -0
- package/dist/llms/loading.md +130 -0
- package/dist/llms/meter.md +177 -0
- package/dist/llms/metric.md +204 -0
- package/dist/llms/number-field.md +122 -0
- package/dist/llms/page-content.md +69 -0
- package/dist/llms/page-header.md +182 -0
- package/dist/llms/pagination.md +133 -0
- package/dist/llms/pie-chart.md +307 -0
- package/dist/llms/popover.md +252 -0
- package/dist/llms/progress-circle.md +126 -0
- package/dist/llms/progress.md +111 -0
- package/dist/llms/radar-chart.md +316 -0
- package/dist/llms/radial-bar-chart.md +319 -0
- package/dist/llms/radio.md +255 -0
- package/dist/llms/resizable.md +195 -0
- package/dist/llms/sankey-chart.md +208 -0
- package/dist/llms/scatter-chart.md +239 -0
- package/dist/llms/scroll-area.md +183 -0
- package/dist/llms/section.md +401 -0
- package/dist/llms/select.md +210 -0
- package/dist/llms/separator.md +87 -0
- package/dist/llms/sheet.md +202 -0
- package/dist/llms/sidebar-primary.md +360 -0
- package/dist/llms/sidebar-secondary.md +417 -0
- package/dist/llms/skeleton.md +81 -0
- package/dist/llms/slider.md +97 -0
- package/dist/llms/spinner.md +100 -0
- package/dist/llms/stack.md +80 -0
- package/dist/llms/stepper-item.md +309 -0
- package/dist/llms/stepper.md +251 -0
- package/dist/llms/switch.md +140 -0
- package/dist/llms/table.md +436 -0
- package/dist/llms/tabs.md +197 -0
- package/dist/llms/tag.md +139 -0
- package/dist/llms/timeline.md +361 -0
- package/dist/llms/timer.md +259 -0
- package/dist/llms/toast.md +241 -0
- package/dist/llms/toggle-group.md +121 -0
- package/dist/llms/toolbar.md +453 -0
- package/dist/llms/tooltip.md +164 -0
- package/dist/llms/treemap.md +254 -0
- package/dist/llms/trend-indicator.md +132 -0
- package/dist/llms/widget-placeholder.md +169 -0
- package/dist/llms/wizard.md +412 -0
- package/dist/llms.txt +142 -0
- package/dist/react.js +540 -525
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/accordion-container/accordion-container.d.ts +44 -0
- package/dist/src/components/ui/accordion-container/index.d.ts +1 -0
- package/dist/src/components/ui/area-chart/area-chart.d.ts +9 -4
- package/dist/src/components/ui/avatar/avatar.d.ts +27 -8
- package/dist/src/components/ui/bar-chart/bar-chart.d.ts +9 -4
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/card/card.d.ts +69 -8
- package/dist/src/components/ui/card/index.d.ts +1 -1
- package/dist/src/components/ui/card-section/card-section.d.ts +50 -0
- package/dist/src/components/ui/card-section/index.d.ts +1 -0
- package/dist/src/components/ui/category-bar/category-bar.d.ts +10 -4
- package/dist/src/components/ui/chart/__stories__/palette-control.d.ts +48 -0
- package/dist/src/components/ui/chart/__tests__/chart-palette.test.d.ts +1 -0
- package/dist/src/components/ui/chart/chart-palette.d.ts +128 -0
- package/dist/src/components/ui/chart/chart.d.ts +66 -15
- package/dist/src/components/ui/chart/index.d.ts +4 -2
- package/dist/src/components/ui/chart-state/chart-state-illustrations.d.ts +6 -0
- package/dist/src/components/ui/chart-state/chart-state.d.ts +13 -2
- package/dist/src/components/ui/chart-state/index.d.ts +1 -0
- package/dist/src/components/ui/chart-widget/chart-widget.d.ts +64 -0
- package/dist/src/components/ui/chart-widget/index.d.ts +1 -0
- package/dist/src/components/ui/composed-chart/composed-chart.d.ts +12 -7
- package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +10 -5
- package/dist/src/components/ui/dialog/dialog.d.ts +1 -1
- package/dist/src/components/ui/empty-overlay/empty-overlay.d.ts +20 -0
- package/dist/src/components/ui/empty-overlay/index.d.ts +2 -0
- package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +11 -5
- package/dist/src/components/ui/grid/grid.d.ts +1 -1
- package/dist/src/components/ui/histogram/histogram.d.ts +10 -4
- package/dist/src/components/ui/label/index.d.ts +1 -1
- package/dist/src/components/ui/label/label.d.ts +1 -5
- package/dist/src/components/ui/line-chart/line-chart.d.ts +9 -4
- package/dist/src/components/ui/metric/metric.d.ts +13 -14
- package/dist/src/components/ui/pie-chart/pie-chart.d.ts +17 -8
- package/dist/src/components/ui/radar-chart/radar-chart.d.ts +10 -5
- package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +17 -6
- package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +10 -5
- package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +10 -5
- package/dist/src/components/ui/section/index.d.ts +1 -1
- package/dist/src/components/ui/section/section.d.ts +75 -6
- package/dist/src/components/ui/sheet/sheet.d.ts +1 -1
- package/dist/src/components/ui/stack/stack.d.ts +1 -1
- package/dist/src/components/ui/stepper-item/stepper-item.d.ts +6 -5
- package/dist/src/components/ui/tag/tag.d.ts +1 -1
- package/dist/src/components/ui/treemap/treemap.d.ts +11 -5
- package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +3 -7
- package/dist/src/components/ui/wizard/index.d.ts +1 -0
- package/dist/src/components/ui/wizard/wizard.d.ts +6 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/use-wizard.d.ts +80 -0
- package/dist/src/index.d.ts +5 -3
- package/dist/ui-react.css +1 -1
- package/package.json +12 -6
- package/dist/components/ui/app-shell/app-shell.js +0 -75
- package/dist/components/ui/app-shell/app-shell.js.map +0 -1
- package/dist/components/ui/auth-layout/auth-layout.js +0 -56
- package/dist/components/ui/auth-layout/auth-layout.js.map +0 -1
- package/dist/components/ui/collapsible/collapsible.js +0 -22
- package/dist/components/ui/collapsible/collapsible.js.map +0 -1
- package/dist/src/components/ui/app-shell/app-shell.d.ts +0 -8
- package/dist/src/components/ui/app-shell/index.d.ts +0 -1
- package/dist/src/components/ui/auth-layout/auth-layout.d.ts +0 -6
- package/dist/src/components/ui/auth-layout/index.d.ts +0 -1
- package/dist/src/components/ui/collapsible/collapsible.d.ts +0 -5
- package/dist/src/components/ui/collapsible/index.d.ts +0 -1
- package/dist/src/components/ui/label/label.docs.d.ts +0 -10
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
> Triggers an action or event when activated. Five visual styles (default, secondary, ghost, destructive, ai) in a single 32px-tall size.
|
|
4
|
+
|
|
5
|
+
**Status:** ready · **Category:** actions · **Since:** v0.4.0
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Button } from '@acronis-platform/ui-react'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick example
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<Button variant="default" onClick={onSave}>
|
|
17
|
+
Save changes
|
|
18
|
+
</Button>
|
|
19
|
+
|
|
20
|
+
{/* Polymorphic: render as another element via the `render` prop */}
|
|
21
|
+
<Button render={<a href="/docs" />} variant="ghost">Docs</Button>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Triggers an action or event. Five styles — `default` (Primary), `secondary`,
|
|
25
|
+
`ghost`, `destructive`, `ai` — in a single 32px-tall size.
|
|
26
|
+
|
|
27
|
+
## When to use
|
|
28
|
+
|
|
29
|
+
- A user-initiated action: submit, save, cancel, open a dialog, run a command.
|
|
30
|
+
|
|
31
|
+
## When not to use
|
|
32
|
+
|
|
33
|
+
- Navigation to another page that should be a real link — compose with the
|
|
34
|
+
`render` prop so it renders an `<a>` (keeps link semantics), or use a link.
|
|
35
|
+
- An icon-only control — use **ButtonIcon**.
|
|
36
|
+
|
|
37
|
+
## Example (React — implemented)
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { Button } from '@acronis-platform/ui-react';
|
|
41
|
+
|
|
42
|
+
<Button variant="default" onClick={onSave}>Save changes</Button>
|
|
43
|
+
<Button variant="destructive" disabled>Delete</Button>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Vue and Web Component implementations are planned and will target the same
|
|
47
|
+
contract — see `api.yaml` `adapters`.
|
|
48
|
+
|
|
49
|
+
## AI variant
|
|
50
|
+
|
|
51
|
+
`variant="ai"` is special:
|
|
52
|
+
|
|
53
|
+
- The icon is **optional** (hidden by default). Pass an icon explicitly when
|
|
54
|
+
needed:
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
<Button variant="ai">Ask AI</Button>
|
|
58
|
+
<Button variant="ai"><SparklesIcon /> Ask AI</Button>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Its background is the `--ui-button-ai-container-color-*` gradient, which runs
|
|
62
|
+
**top-to-bottom** and covers the full button (including the transparent 1px
|
|
63
|
+
border box).
|
|
64
|
+
|
|
65
|
+
## Props
|
|
66
|
+
|
|
67
|
+
| Prop | Type | Default | Required | Description |
|
|
68
|
+
|------|------|---------|----------|-------------|
|
|
69
|
+
| `variant` | `'default' | 'secondary' | 'ghost' | 'destructive' | 'ai'` | `'default'` | no | Visual style. `default` is the Figma "Primary" style. Each variant maps to its dedicated `--ui-button-<style>-*` tokens. |
|
|
70
|
+
| `disabled` | `boolean` | `false` | no | Disables interaction. Applies the design's explicit per-variant disabled tokens (not an opacity dim) and suppresses click. |
|
|
71
|
+
| `type` | `'button' | 'submit' | 'reset'` | `'button'` | no | Native HTML button type. |
|
|
72
|
+
|
|
73
|
+
## Events
|
|
74
|
+
|
|
75
|
+
| Event | Payload | Description |
|
|
76
|
+
|-------|---------|-------------|
|
|
77
|
+
| `click` | `MouseEvent` | Fired on activation (pointer or keyboard). Not fired while disabled. |
|
|
78
|
+
|
|
79
|
+
## Content slots
|
|
80
|
+
|
|
81
|
+
| Slot | Description |
|
|
82
|
+
|------|-------------|
|
|
83
|
+
| `default` | Label content. Plain text and/or an icon. An SVG child is auto-sized to 16px and tinted with the label color. |
|
|
84
|
+
|
|
85
|
+
## Behavior
|
|
86
|
+
|
|
87
|
+
### Variants
|
|
88
|
+
|
|
89
|
+
#### Renders the requested visual style
|
|
90
|
+
|
|
91
|
+
**Given** a Button with `variant` set to one of `default`, `secondary`, `ghost`,
|
|
92
|
+
`destructive`, or `ai`
|
|
93
|
+
**When** it renders
|
|
94
|
+
**Then** background, label, and border resolve from that variant's
|
|
95
|
+
`--ui-button-<style>-*` tokens for the current interaction state.
|
|
96
|
+
|
|
97
|
+
#### Defaults to `default` (Primary)
|
|
98
|
+
|
|
99
|
+
**Given** a Button with no `variant`
|
|
100
|
+
**When** it renders
|
|
101
|
+
**Then** it uses the `default` (Primary) style.
|
|
102
|
+
|
|
103
|
+
#### AI variant icon is optional
|
|
104
|
+
|
|
105
|
+
**Given** a Button with `variant="ai"`
|
|
106
|
+
**When** it renders
|
|
107
|
+
**Then** it renders the consumer-provided children (icon is optional, hidden by
|
|
108
|
+
default — the consumer passes an icon explicitly when needed)
|
|
109
|
+
**And** its background is the `--ui-button-ai-container-color-*` gradient, which runs
|
|
110
|
+
**top-to-bottom** (start color → end color), covering the full button box.
|
|
111
|
+
|
|
112
|
+
### Interaction states
|
|
113
|
+
|
|
114
|
+
#### Tracks each state from its own token
|
|
115
|
+
|
|
116
|
+
**Given** any variant
|
|
117
|
+
**When** the button is idle, hovered, activated, or disabled
|
|
118
|
+
**Then** background, label, and border each resolve from the matching
|
|
119
|
+
`*-idle` / `*-hover` / `*-active` / `*-disabled` token — so brand/theme
|
|
120
|
+
overrides that differ per state are honored.
|
|
121
|
+
|
|
122
|
+
#### Ghost underlines its label on hover
|
|
123
|
+
|
|
124
|
+
**Given** a Button with `variant="ghost"` (the link-like variant)
|
|
125
|
+
**When** the pointer hovers it
|
|
126
|
+
**Then** the label is underlined (`--ui-button-ghost-label-text-decoration-hover`)
|
|
127
|
+
**And** the underline is dropped again while the button is pressed (`:active`)
|
|
128
|
+
and in every other state — idle, disabled, focus.
|
|
129
|
+
Other variants never underline.
|
|
130
|
+
|
|
131
|
+
#### Shows a pointer cursor
|
|
132
|
+
|
|
133
|
+
**Given** any enabled Button
|
|
134
|
+
**When** the pointer is over it
|
|
135
|
+
**Then** the cursor is `pointer` (disabled buttons have `pointer-events: none`).
|
|
136
|
+
|
|
137
|
+
#### Disabled uses design tokens, not opacity
|
|
138
|
+
|
|
139
|
+
**Given** a Button with `disabled`
|
|
140
|
+
**When** it renders
|
|
141
|
+
**Then** it applies the variant's `*-disabled` tokens (not a blanket opacity)
|
|
142
|
+
**And** it does not emit `click`.
|
|
143
|
+
|
|
144
|
+
### Size
|
|
145
|
+
|
|
146
|
+
**Given** any Button
|
|
147
|
+
**When** it renders
|
|
148
|
+
**Then** it has a single size — 32px tall with 12px horizontal padding (the
|
|
149
|
+
Figma button has no size variants).
|
|
150
|
+
|
|
151
|
+
### Content
|
|
152
|
+
|
|
153
|
+
#### Sizes and tints an icon child
|
|
154
|
+
|
|
155
|
+
**Given** an SVG child
|
|
156
|
+
**When** it renders
|
|
157
|
+
**Then** the icon is sized to 16px and inherits the label color via
|
|
158
|
+
`currentColor`.
|
|
159
|
+
|
|
160
|
+
### Composition
|
|
161
|
+
|
|
162
|
+
#### Renders as another element
|
|
163
|
+
|
|
164
|
+
**Given** a `render` prop (React) targeting e.g. an anchor
|
|
165
|
+
**When** it renders
|
|
166
|
+
**Then** the Button's classes/props merge onto that element instead of a
|
|
167
|
+
`<button>` (Base UI `useRender`), so a Button can be a link.
|
|
168
|
+
|
|
169
|
+
## Accessibility
|
|
170
|
+
|
|
171
|
+
- **Role:** native `<button>` (implicit `role="button"`); when composed as a
|
|
172
|
+
link via `render`, it becomes a native `<a>` with link semantics.
|
|
173
|
+
- **Accessible name:** from the text content. An **icon-only** button has no
|
|
174
|
+
text, so it MUST be given an `aria-label` (or `aria-labelledby`). For
|
|
175
|
+
icon-only buttons prefer the dedicated `ButtonIcon` component.
|
|
176
|
+
- **Keyboard:** Enter and Space activate (native). Tab focuses; a `disabled`
|
|
177
|
+
button is removed from the tab order (native).
|
|
178
|
+
- **Focus visible:** keyboard focus shows a 3px ring in `--ui-focus-primary`
|
|
179
|
+
flush to the button edge (no offset), via `:focus-visible` (no ring on pointer
|
|
180
|
+
activation).
|
|
181
|
+
- **Contrast:** label/background pairs come from the design tokens, which are
|
|
182
|
+
authored to meet WCAG contrast. State is never conveyed by color alone — the
|
|
183
|
+
disabled state also removes interactivity.
|
|
184
|
+
- **WCAG:** 2.1.1 (keyboard), 2.4.7 (focus visible), 1.4.3 / 1.4.11 (contrast),
|
|
185
|
+
4.1.2 (name/role/value).
|