@agent-ui-kit/web-components 0.0.14 → 0.0.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.
- package/dist/agent-ui.css +1 -1
- package/dist/api.colors.json +2 -2
- package/dist/api.colors.yaml +2 -2
- package/dist/api.components.json +4570 -1641
- package/dist/api.tokens.json +34 -2
- package/dist/api.tokens.yaml +26 -2
- package/dist/chunks/{agent-C72JZNe6.js → agent-BF_R_HJk.js} +65 -61
- package/dist/chunks/{agent-C72JZNe6.js.map → agent-BF_R_HJk.js.map} +1 -1
- package/dist/chunks/{empty-state-5M3uR5CM.js → meter-Dju8ik6C.js} +1169 -934
- package/dist/chunks/meter-Dju8ik6C.js.map +1 -0
- package/dist/components/agent.js +6 -6
- package/dist/components/avatar/avatar.d.ts +0 -0
- package/dist/components/badge/badge.d.ts +0 -0
- package/dist/components/bar/bar.d.ts +0 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/components/button-group/button-group.d.ts +0 -0
- package/dist/components/code/code.d.ts +0 -0
- package/dist/components/color-area/color-area.d.ts +2 -1
- package/dist/components/color-picker/color-picker.d.ts +1 -0
- package/dist/components/color-picker/oklch-utils.d.ts +18 -0
- package/dist/components/color-slider/color-slider.d.ts +1 -1
- package/dist/components/color-swatch/color-swatch.d.ts +0 -0
- package/dist/components/content/content.d.ts +0 -0
- package/dist/components/description-list/description-list.d.ts +0 -0
- package/dist/components/divider/divider.d.ts +0 -0
- package/dist/components/editor.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +0 -0
- package/dist/components/footer/footer.d.ts +0 -0
- package/dist/components/graph.js +1 -1
- package/dist/components/grid/grid.d.ts +0 -0
- package/dist/components/header/header.d.ts +0 -0
- package/dist/components/heading/heading.d.ts +0 -0
- package/dist/components/input-group/input-group.d.ts +0 -0
- package/dist/components/inset/inset.d.ts +0 -0
- package/dist/components/kbd/kbd.d.ts +0 -0
- package/dist/components/stack/stack.d.ts +0 -0
- package/dist/components/stat/stat.d.ts +4 -0
- package/dist/components/text/text.d.ts +0 -0
- package/dist/components/time-field/time-field.d.ts +1 -0
- package/dist/components/wrap/wrap.d.ts +0 -0
- package/dist/components.js +114 -127
- package/dist/components.js.map +1 -1
- package/dist/docs/blocks/login-two-column.yaml +6 -6
- package/dist/docs/blocks/profile-card.yaml +5 -5
- package/dist/docs/components/accordion-item.yaml +13 -21
- package/dist/docs/components/accordion.yaml +23 -29
- package/dist/docs/components/agent-activity.yaml +27 -39
- package/dist/docs/components/agent-feed.yaml +15 -22
- package/dist/docs/components/agent-input.yaml +238 -0
- package/dist/docs/components/agent-message.yaml +29 -48
- package/dist/docs/components/agent-panel.yaml +21 -24
- package/dist/docs/components/agent-prompt.yaml +28 -46
- package/dist/docs/components/agent-seeds.yaml +15 -23
- package/dist/docs/components/agent-text.yaml +14 -24
- package/dist/docs/components/agent-thread.yaml +15 -24
- package/dist/docs/components/alert.yaml +41 -39
- package/dist/docs/components/avatar-group.yaml +72 -45
- package/dist/docs/components/avatar.yaml +99 -0
- package/dist/docs/components/badge.yaml +110 -0
- package/dist/docs/components/bar.yaml +84 -0
- package/dist/docs/components/breadcrumb-item.yaml +8 -17
- package/dist/docs/components/breadcrumb.yaml +60 -25
- package/dist/docs/components/button-group.yaml +93 -0
- package/dist/docs/components/button.yaml +177 -261
- package/dist/docs/components/calendar-picker.yaml +14 -34
- package/dist/docs/components/calendar-range-picker.yaml +11 -29
- package/dist/docs/components/calendar.yaml +11 -29
- package/dist/docs/components/canvas.yaml +44 -61
- package/dist/docs/components/checkbox.yaml +37 -49
- package/dist/docs/components/chip.yaml +88 -54
- package/dist/docs/components/code-block.yaml +54 -53
- package/dist/docs/components/code.yaml +37 -0
- package/dist/docs/components/color-area.yaml +119 -0
- package/dist/docs/components/color-field.yaml +121 -0
- package/dist/docs/components/color-picker.yaml +64 -38
- package/dist/docs/components/color-slider.yaml +153 -0
- package/dist/docs/components/color-swatch.yaml +98 -0
- package/dist/docs/components/command.yaml +13 -18
- package/dist/docs/components/container.yaml +83 -73
- package/dist/docs/components/content.yaml +100 -0
- package/dist/docs/components/context-menu.yaml +11 -20
- package/dist/docs/components/date-field.yaml +81 -33
- package/dist/docs/components/description-list.yaml +81 -0
- package/dist/docs/components/disclosure-group.yaml +61 -42
- package/dist/docs/components/disclosure.yaml +60 -46
- package/dist/docs/components/divider.yaml +63 -0
- package/dist/docs/components/dropdown-menu.yaml +16 -25
- package/dist/docs/components/feed.yaml +15 -24
- package/dist/docs/components/field.yaml +50 -71
- package/dist/docs/components/fieldset.yaml +92 -0
- package/dist/docs/components/footer.yaml +147 -0
- package/dist/docs/components/grid.yaml +87 -0
- package/dist/docs/components/gripper.yaml +11 -23
- package/dist/docs/components/header.yaml +168 -0
- package/dist/docs/components/heading.yaml +54 -0
- package/dist/docs/components/hover-card.yaml +17 -25
- package/dist/docs/components/icon.yaml +32 -65
- package/dist/docs/components/input-group.yaml +102 -0
- package/dist/docs/components/input-otp.yaml +20 -19
- package/dist/docs/components/input.yaml +92 -132
- package/dist/docs/components/inset.yaml +59 -0
- package/dist/docs/components/kbd.yaml +57 -0
- package/dist/docs/components/link.yaml +36 -45
- package/dist/docs/components/meter.yaml +27 -38
- package/dist/docs/components/nav-item.yaml +51 -40
- package/dist/docs/components/noodles.yaml +72 -104
- package/dist/docs/components/option.yaml +12 -23
- package/dist/docs/components/pagination.yaml +21 -18
- package/dist/docs/components/pane.yaml +18 -32
- package/dist/docs/components/panes.yaml +19 -27
- package/dist/docs/components/progress-circle.yaml +64 -55
- package/dist/docs/components/progress.yaml +35 -51
- package/dist/docs/components/radio-group.yaml +99 -40
- package/dist/docs/components/radio.yaml +40 -41
- package/dist/docs/components/range.yaml +24 -27
- package/dist/docs/components/segmented-control.yaml +58 -17
- package/dist/docs/components/select.yaml +80 -100
- package/dist/docs/components/skeleton.yaml +39 -39
- package/dist/docs/components/sparkline.yaml +28 -45
- package/dist/docs/components/spinner.yaml +32 -33
- package/dist/docs/components/stack.yaml +126 -0
- package/dist/docs/components/stepper.yaml +31 -38
- package/dist/docs/components/switch.yaml +36 -47
- package/dist/docs/components/tab-panel.yaml +27 -18
- package/dist/docs/components/tab.yaml +25 -22
- package/dist/docs/components/table-header.yaml +22 -12
- package/dist/docs/components/tabs.yaml +103 -20
- package/dist/docs/components/tag-group.yaml +63 -47
- package/dist/docs/components/text.yaml +67 -0
- package/dist/docs/components/textarea.yaml +43 -60
- package/dist/docs/components/time-field.yaml +74 -33
- package/dist/docs/components/toast.yaml +13 -30
- package/dist/docs/components/tooltip.yaml +56 -49
- package/dist/docs/components/tree-item.yaml +9 -10
- package/dist/docs/components/tree.yaml +127 -10
- package/dist/docs/components/wrap.yaml +60 -0
- package/dist/docs/traits/toggle-theme.yaml +34 -0
- package/dist/element.js +1 -1
- package/dist/icons.js +79 -59
- package/dist/icons.js.map +1 -1
- package/dist/reactivity.js +2 -2
- package/dist/register.d.ts +0 -1
- package/dist/register.js +258 -244
- package/dist/register.js.map +1 -1
- package/dist/store.js +1 -1
- package/dist/traits/toggle-theme/toggle-theme.d.ts +0 -0
- package/dist/traits/toggle-theme/toggle-theme.trait.d.ts +2 -0
- package/dist/traits.js +528 -485
- package/dist/traits.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/empty-state-5M3uR5CM.js.map +0 -1
|
@@ -2,328 +2,263 @@ name: aui-button
|
|
|
2
2
|
tag: aui-button
|
|
3
3
|
type: component
|
|
4
4
|
summary: Polymorphic action trigger with press semantics and resize-responsive collapse.
|
|
5
|
-
description:
|
|
6
|
-
The foundational interactive element. Uses inline-flex layout with a
|
|
7
|
-
CSS-generated label (::after { content: attr(label) }). Supports solid,
|
|
8
|
-
outline, ghost, and scrim variants across all intent families. Renders as
|
|
9
|
-
a button by default; set href to switch to link mode. Icon-only mode
|
|
10
|
-
available via the hide-label attribute. Icons are stamped as
|
|
11
|
-
<aui-icon slot="leading/trailing"> by JS from icon-leading / icon-trailing
|
|
12
|
-
attributes. Text adornments are stamped as <span slot="leading-text/trailing-text">
|
|
13
|
-
from text-leading / text-trailing attributes. The component auto-detects
|
|
14
|
-
icon-only state when no label attribute and no child text nodes are present.
|
|
15
|
-
Progressive collapse via the resize trait hides adornments as the
|
|
16
|
-
container shrinks.
|
|
17
|
-
|
|
5
|
+
description: |
|
|
6
|
+
The foundational interactive element. Uses inline-flex layout with a CSS-generated label (::after { content: attr(label) }). Supports solid, outline, ghost, and scrim variants across all intent families. Renders as a button by default; set href to switch to link mode. Icon-only mode available via the hide-label attribute. Icons are stamped as <aui-icon slot="leading/trailing"> by JS from icon-leading / icon-trailing attributes. Text adornments are stamped as <span slot="leading-text/trailing-text"> from text-leading / text-trailing attributes. The component auto-detects icon-only state when no label attribute and no child text nodes are present. Progressive collapse via the resize trait hides adornments as the container shrinks.
|
|
18
7
|
base: AgentElement
|
|
19
|
-
|
|
20
|
-
# ── Layout ───────────────────────────────────────────────
|
|
21
|
-
# Button uses inline-flex (not inline-grid).
|
|
22
|
-
# Label text is rendered via CSS ::after { content: attr(label) } — no JS stamping.
|
|
23
|
-
# Height is fixed at var(--aui-size), min-width at var(--aui-size).
|
|
24
|
-
# Padding: padding-block var(--aui-pad-control-block), padding-inline calc(var(--aui-space) * 3).
|
|
25
|
-
|
|
26
|
-
# ── Presentational attributes ─────────────────────────────
|
|
27
|
-
# Boolean HTML attributes. Each group is mutually exclusive.
|
|
28
|
-
# All cascade to descendants via CSS custom property inheritance.
|
|
29
|
-
# Default appearance = absence of attribute (no "medium", no "neutral").
|
|
30
|
-
|
|
31
8
|
presentational:
|
|
32
9
|
size:
|
|
33
10
|
syntax: key-value
|
|
34
11
|
attribute: size
|
|
35
12
|
cascades: true
|
|
36
13
|
default: medium
|
|
37
|
-
values:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
values:
|
|
15
|
+
- xs
|
|
16
|
+
- sm
|
|
17
|
+
- md
|
|
18
|
+
- lg
|
|
19
|
+
- xl
|
|
20
|
+
description: |
|
|
21
|
+
Controls dimensions, typography, icon size, and spacing simultaneously. Swaps 7 tokens at once.
|
|
42
22
|
radius:
|
|
43
23
|
syntax: boolean
|
|
44
24
|
exclusive: true
|
|
45
25
|
cascades: true
|
|
46
26
|
default: medium
|
|
47
|
-
values:
|
|
27
|
+
values:
|
|
28
|
+
- sharp
|
|
29
|
+
- round
|
|
48
30
|
description: Controls border radius. Default is a medium radius.
|
|
49
|
-
|
|
50
31
|
density:
|
|
51
32
|
syntax: key-value
|
|
52
33
|
attribute: density
|
|
53
34
|
cascades: true
|
|
54
35
|
default: regular
|
|
55
|
-
values:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
36
|
+
values:
|
|
37
|
+
- compact
|
|
38
|
+
- spacious
|
|
39
|
+
description: |
|
|
40
|
+
Controls padding and spacing compression. Unlike size (which shifts the active step), density redefines the entire scale.
|
|
60
41
|
variant:
|
|
61
42
|
syntax: boolean
|
|
62
43
|
exclusive: true
|
|
63
44
|
cascades: true
|
|
64
45
|
default: default
|
|
65
|
-
values:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
46
|
+
values:
|
|
47
|
+
- primary
|
|
48
|
+
- outline
|
|
49
|
+
- ghost
|
|
50
|
+
- scrim
|
|
51
|
+
description: |
|
|
52
|
+
Surface expression — how the component fills its space. Default is a standard fill with role-appropriate background.
|
|
70
53
|
intent:
|
|
71
54
|
syntax: boolean
|
|
72
55
|
exclusive: true
|
|
73
56
|
cascades: true
|
|
74
57
|
default: neutral
|
|
75
|
-
values:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
values:
|
|
59
|
+
- accent
|
|
60
|
+
- info
|
|
61
|
+
- success
|
|
62
|
+
- warning
|
|
63
|
+
- danger
|
|
64
|
+
description: |
|
|
65
|
+
Color family. All color tokens remap to the selected palette. Default is the neutral palette.
|
|
80
66
|
state:
|
|
81
67
|
syntax: boolean
|
|
82
68
|
exclusive: false
|
|
83
69
|
cascades: false
|
|
84
70
|
default: none
|
|
85
|
-
values:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
values:
|
|
72
|
+
- active
|
|
73
|
+
- selected
|
|
74
|
+
- highlighted
|
|
75
|
+
description: |
|
|
76
|
+
Visual state indicators. Unlike other presentational groups, state values can combine (e.g. selected + highlighted).
|
|
92
77
|
cross:
|
|
93
|
-
- dimensions:
|
|
78
|
+
- dimensions:
|
|
79
|
+
- variant
|
|
80
|
+
- intent
|
|
94
81
|
label: Variant x Intent
|
|
95
|
-
description:
|
|
96
|
-
Each variant with each intent color. The most common
|
|
97
|
-
composition pattern for buttons.
|
|
98
|
-
|
|
99
|
-
# ── Component attributes ──────────────────────────────────
|
|
100
|
-
# Signal-backed, observed. Key-value or boolean HTML attributes.
|
|
101
|
-
|
|
82
|
+
description: |
|
|
83
|
+
Each variant with each intent color. The most common composition pattern for buttons.
|
|
102
84
|
attributes:
|
|
103
85
|
disabled:
|
|
104
86
|
syntax: boolean
|
|
105
87
|
type: boolean
|
|
106
88
|
default: false
|
|
107
89
|
description: Prevents interaction. Dims visually.
|
|
108
|
-
|
|
109
90
|
loading:
|
|
110
91
|
syntax: boolean
|
|
111
92
|
type: boolean
|
|
112
93
|
default: false
|
|
113
94
|
description: Shows loading state. Blocks interaction but not focus.
|
|
114
|
-
|
|
115
95
|
type:
|
|
116
96
|
syntax: key-value
|
|
117
97
|
type: enum
|
|
118
|
-
values:
|
|
98
|
+
values:
|
|
99
|
+
- button
|
|
100
|
+
- submit
|
|
101
|
+
- reset
|
|
119
102
|
default: button
|
|
120
|
-
description:
|
|
121
|
-
Button behavior within a form. submit calls form.requestSubmit(),
|
|
122
|
-
reset calls form.reset().
|
|
123
|
-
|
|
103
|
+
description: |
|
|
104
|
+
Button behavior within a form. submit calls form.requestSubmit(), reset calls form.reset().
|
|
124
105
|
label:
|
|
125
106
|
syntax: key-value
|
|
126
107
|
type: string
|
|
127
108
|
default: ""
|
|
128
|
-
description:
|
|
129
|
-
Primary button label. Rendered via CSS ::after { content: attr(label) }
|
|
130
|
-
— no JS stamping. Also maps to aria-label for accessibility.
|
|
131
|
-
When omitted and no child text nodes exist, the button auto-detects
|
|
132
|
-
icon-only mode.
|
|
133
|
-
|
|
109
|
+
description: |
|
|
110
|
+
Primary button label. Rendered via CSS ::after { content: attr(label) } — no JS stamping. Also maps to aria-label for accessibility. When omitted and no child text nodes exist, the button auto-detects icon-only mode.
|
|
134
111
|
icon-leading:
|
|
135
112
|
syntax: key-value
|
|
136
113
|
type: string
|
|
137
114
|
default: ""
|
|
138
|
-
description:
|
|
139
|
-
Icon registry name for the leading icon. JS stamps an
|
|
140
|
-
<aui-icon name="..." slot="leading"> element into the button.
|
|
141
|
-
|
|
115
|
+
description: |
|
|
116
|
+
Icon registry name for the leading icon. JS stamps an <aui-icon name="..." slot="leading"> element into the button.
|
|
142
117
|
icon-trailing:
|
|
143
118
|
syntax: key-value
|
|
144
119
|
type: string
|
|
145
120
|
default: ""
|
|
146
|
-
description:
|
|
147
|
-
Icon registry name for the trailing icon. JS stamps an
|
|
148
|
-
<aui-icon name="..." slot="trailing"> element into the button.
|
|
149
|
-
|
|
121
|
+
description: |
|
|
122
|
+
Icon registry name for the trailing icon. JS stamps an <aui-icon name="..." slot="trailing"> element into the button.
|
|
150
123
|
text-leading:
|
|
151
124
|
syntax: key-value
|
|
152
125
|
type: string
|
|
153
126
|
default: ""
|
|
154
|
-
description:
|
|
155
|
-
Text adornment before the label. JS stamps a
|
|
156
|
-
<span slot="leading-text"> element. Separate from the icon slot.
|
|
157
|
-
|
|
127
|
+
description: |
|
|
128
|
+
Text adornment before the label. JS stamps a <span slot="leading-text"> element. Separate from the icon slot.
|
|
158
129
|
text-trailing:
|
|
159
130
|
syntax: key-value
|
|
160
131
|
type: string
|
|
161
132
|
default: ""
|
|
162
|
-
description:
|
|
163
|
-
Text adornment after the label. JS stamps a
|
|
164
|
-
<span slot="trailing-text"> element. Separate from the icon slot.
|
|
165
|
-
|
|
133
|
+
description: |
|
|
134
|
+
Text adornment after the label. JS stamps a <span slot="trailing-text"> element. Separate from the icon slot.
|
|
166
135
|
icon:
|
|
167
136
|
syntax: key-value
|
|
168
137
|
type: string
|
|
169
138
|
default: ""
|
|
170
|
-
description:
|
|
171
|
-
Shorthand icon name from the icon registry. Convenience for
|
|
172
|
-
hide-label buttons — equivalent to icon-leading.
|
|
173
|
-
|
|
139
|
+
description: |
|
|
140
|
+
Shorthand icon name from the icon registry. Convenience for hide-label buttons — equivalent to icon-leading.
|
|
174
141
|
href:
|
|
175
142
|
syntax: key-value
|
|
176
143
|
type: string
|
|
177
144
|
default: ""
|
|
178
|
-
description:
|
|
179
|
-
When set, button acts as a navigation link. Clicking navigates
|
|
180
|
-
to the given URL.
|
|
181
|
-
|
|
182
|
-
# ── Modifiers ─────────────────────────────────────────────
|
|
183
|
-
|
|
145
|
+
description: |
|
|
146
|
+
When set, button acts as a navigation link. Clicking navigates to the given URL.
|
|
184
147
|
modifiers:
|
|
185
148
|
hide-label:
|
|
186
149
|
syntax: boolean
|
|
187
|
-
description:
|
|
188
|
-
Hides the label text and collapses the button to icon-only.
|
|
189
|
-
Square button sized to --aui-size. Removes inline padding.
|
|
190
|
-
Use with a slotted icon, icon-leading, or the icon attribute.
|
|
191
|
-
|
|
150
|
+
description: |
|
|
151
|
+
Hides the label text and collapses the button to icon-only. Square button sized to --aui-size. Removes inline padding. Use with a slotted icon, icon-leading, or the icon attribute.
|
|
192
152
|
text:
|
|
193
153
|
syntax: key-value
|
|
194
|
-
values:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
feel more natural.
|
|
199
|
-
|
|
200
|
-
# ── Internal data attributes ─────────────────────────────
|
|
201
|
-
|
|
154
|
+
values:
|
|
155
|
+
- left
|
|
156
|
+
- right
|
|
157
|
+
description: |
|
|
158
|
+
Overrides the default centered text alignment. Useful for wide buttons where left- or right-aligned labels feel more natural.
|
|
202
159
|
data-attributes:
|
|
203
160
|
data-has-text:
|
|
204
161
|
set-by: JS
|
|
205
|
-
description:
|
|
206
|
-
Set automatically by JS when the button has child text nodes.
|
|
207
|
-
Used in the auto icon-only detection selector:
|
|
208
|
-
:not([label]):not([data-has-text]):has(> [slot]):not(:has(> :not([slot])))
|
|
209
|
-
|
|
210
|
-
# ── Resize-responsive collapse ───────────────────────────
|
|
211
|
-
# These data attributes are set by the resize trait based on
|
|
212
|
-
# the button's own measured width. CSS hides adornments accordingly.
|
|
213
|
-
|
|
162
|
+
description: |
|
|
163
|
+
Set automatically by JS when the button has child text nodes. Used in the auto icon-only detection selector: :not([label]):not([data-has-text]):has(> [slot]):not(:has(> :not([slot])))
|
|
214
164
|
resize:
|
|
215
165
|
data-resize-small:
|
|
216
|
-
threshold:
|
|
217
|
-
description:
|
|
166
|
+
threshold: < 128px
|
|
167
|
+
description: |
|
|
218
168
|
Hides leading icon and leading-text adornment.
|
|
219
|
-
|
|
220
169
|
data-resize-xsmall:
|
|
221
|
-
threshold:
|
|
222
|
-
description:
|
|
170
|
+
threshold: < 96px
|
|
171
|
+
description: |
|
|
223
172
|
Hides trailing icon and trailing-text adornment.
|
|
224
|
-
|
|
225
173
|
data-resize-compact:
|
|
226
|
-
threshold:
|
|
227
|
-
description:
|
|
228
|
-
Hides everything except the leading icon. Applies tight padding.
|
|
229
|
-
Button collapses to near icon-only appearance.
|
|
230
|
-
|
|
231
|
-
# ── Content model ─────────────────────────────────────────
|
|
232
|
-
|
|
174
|
+
threshold: < 72px
|
|
175
|
+
description: |
|
|
176
|
+
Hides everything except the leading icon. Applies tight padding. Button collapses to near icon-only appearance.
|
|
233
177
|
content:
|
|
234
178
|
model: inline
|
|
235
|
-
accepts:
|
|
179
|
+
accepts:
|
|
180
|
+
- text
|
|
181
|
+
- span
|
|
182
|
+
- svg
|
|
183
|
+
- img
|
|
184
|
+
- aui-icon
|
|
236
185
|
required: false
|
|
237
|
-
description:
|
|
238
|
-
Inline text label or icon content. The preferred API is to use
|
|
239
|
-
the label attribute (rendered via CSS ::after) and icon-leading /
|
|
240
|
-
icon-trailing attributes (stamped by JS as <aui-icon> children).
|
|
241
|
-
Manual slotting of <aui-icon slot="leading/trailing"> is also supported.
|
|
242
|
-
|
|
243
|
-
# ── Slots ─────────────────────────────────────────────────
|
|
244
|
-
|
|
186
|
+
description: |
|
|
187
|
+
Inline text label or icon content. The preferred API is to use the label attribute (rendered via CSS ::after) and icon-leading / icon-trailing attributes (stamped by JS as <aui-icon> children). Manual slotting of <aui-icon slot="leading/trailing"> is also supported.
|
|
245
188
|
slots:
|
|
246
189
|
default:
|
|
247
|
-
accepts:
|
|
190
|
+
accepts:
|
|
191
|
+
- text
|
|
192
|
+
- inline elements
|
|
248
193
|
required: false
|
|
249
|
-
description:
|
|
250
|
-
Button label text content. Prefer using the label attribute instead,
|
|
251
|
-
which renders the label via CSS ::after without JS.
|
|
252
|
-
|
|
194
|
+
description: |
|
|
195
|
+
Button label text content. Prefer using the label attribute instead, which renders the label via CSS ::after without JS.
|
|
253
196
|
leading:
|
|
254
|
-
accepts:
|
|
197
|
+
accepts:
|
|
198
|
+
- aui-icon
|
|
199
|
+
- span
|
|
200
|
+
- svg
|
|
201
|
+
- img
|
|
255
202
|
required: false
|
|
256
|
-
description:
|
|
257
|
-
Leading icon. Typically stamped by JS from icon-leading attribute
|
|
258
|
-
as <aui-icon slot="leading">. Manual slotting is also supported.
|
|
259
|
-
|
|
203
|
+
description: |
|
|
204
|
+
Leading icon. Typically stamped by JS from icon-leading attribute as <aui-icon slot="leading">. Manual slotting is also supported.
|
|
260
205
|
trailing:
|
|
261
|
-
accepts:
|
|
206
|
+
accepts:
|
|
207
|
+
- aui-icon
|
|
208
|
+
- span
|
|
209
|
+
- svg
|
|
210
|
+
- img
|
|
262
211
|
required: false
|
|
263
|
-
description:
|
|
264
|
-
Trailing icon. Typically stamped by JS from icon-trailing attribute
|
|
265
|
-
as <aui-icon slot="trailing">. Manual slotting is also supported.
|
|
266
|
-
|
|
212
|
+
description: |
|
|
213
|
+
Trailing icon. Typically stamped by JS from icon-trailing attribute as <aui-icon slot="trailing">. Manual slotting is also supported.
|
|
267
214
|
leading-text:
|
|
268
|
-
accepts:
|
|
215
|
+
accepts:
|
|
216
|
+
- span
|
|
269
217
|
required: false
|
|
270
|
-
description:
|
|
271
|
-
Text adornment before the label. Stamped by JS from text-leading
|
|
272
|
-
attribute as <span slot="leading-text">.
|
|
273
|
-
|
|
218
|
+
description: |
|
|
219
|
+
Text adornment before the label. Stamped by JS from text-leading attribute as <span slot="leading-text">.
|
|
274
220
|
trailing-text:
|
|
275
|
-
accepts:
|
|
221
|
+
accepts:
|
|
222
|
+
- span
|
|
276
223
|
required: false
|
|
277
|
-
description:
|
|
278
|
-
Text adornment after the label. Stamped by JS from text-trailing
|
|
279
|
-
attribute as <span slot="trailing-text">.
|
|
280
|
-
|
|
281
|
-
# ── Composition ───────────────────────────────────────────
|
|
282
|
-
|
|
224
|
+
description: |
|
|
225
|
+
Text adornment after the label. Stamped by JS from text-trailing attribute as <span slot="trailing-text">.
|
|
283
226
|
composition:
|
|
284
|
-
parents:
|
|
227
|
+
parents:
|
|
228
|
+
- aui-stack
|
|
229
|
+
- aui-grid
|
|
230
|
+
- aui-header
|
|
231
|
+
- aui-footer
|
|
232
|
+
- aui-inset
|
|
233
|
+
- form
|
|
234
|
+
- div
|
|
235
|
+
- section
|
|
285
236
|
children: null
|
|
286
|
-
context:
|
|
287
|
-
Buttons are leaf-level interactive elements. They appear in
|
|
288
|
-
action bars, forms, headers, toolbars. Use aui-stack direction="row"
|
|
289
|
-
to group multiple buttons.
|
|
290
|
-
|
|
291
|
-
# ── Constraints ───────────────────────────────────────────
|
|
292
|
-
|
|
237
|
+
context: |
|
|
238
|
+
Buttons are leaf-level interactive elements. They appear in action bars, forms, headers, toolbars. Use aui-stack direction="row" to group multiple buttons.
|
|
293
239
|
constraints:
|
|
294
240
|
- when: hide-label
|
|
295
241
|
require: label
|
|
296
|
-
reason:
|
|
297
|
-
Screen readers need accessible text when no visible label
|
|
298
|
-
is present. The label attribute maps to aria-label.
|
|
299
|
-
|
|
242
|
+
reason: |
|
|
243
|
+
Screen readers need accessible text when no visible label is present. The label attribute maps to aria-label.
|
|
300
244
|
- when: href
|
|
301
|
-
conflicts-with:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
(submit/reset) are meaningless in link mode.
|
|
305
|
-
|
|
306
|
-
# ── Deprecated / Removed ─────────────────────────────────
|
|
307
|
-
|
|
245
|
+
conflicts-with:
|
|
246
|
+
- type
|
|
247
|
+
reason: |
|
|
248
|
+
Link-mode buttons navigate via href. Form type attributes (submit/reset) are meaningless in link mode.
|
|
308
249
|
deprecated:
|
|
309
250
|
aui-icon-button:
|
|
310
251
|
status: removed
|
|
311
|
-
replacement:
|
|
252
|
+
replacement: |
|
|
312
253
|
Use <aui-button hide-label label="..." icon-leading="..."> instead.
|
|
313
|
-
|
|
314
254
|
icon-only:
|
|
315
255
|
status: removed
|
|
316
|
-
replacement:
|
|
256
|
+
replacement: |
|
|
317
257
|
Renamed to hide-label attribute on <aui-button>.
|
|
318
|
-
|
|
319
258
|
name-on-aui-icon:
|
|
320
259
|
status: removed
|
|
321
|
-
replacement:
|
|
322
|
-
The name attribute on <aui-icon> is renamed to registry.
|
|
323
|
-
Use <aui-icon name="..."> instead of <aui-icon name="...">.
|
|
324
|
-
|
|
325
|
-
# ── Accessibility ─────────────────────────────────────────
|
|
326
|
-
|
|
260
|
+
replacement: |
|
|
261
|
+
The name attribute on <aui-icon> is renamed to registry. Use <aui-icon name="..."> instead of <aui-icon name="...">.
|
|
327
262
|
a11y:
|
|
328
263
|
role: button
|
|
329
264
|
keyboard:
|
|
@@ -335,24 +270,14 @@ a11y:
|
|
|
335
270
|
focus:
|
|
336
271
|
default: tabindex="0"
|
|
337
272
|
disabled: tabindex="-1"
|
|
338
|
-
|
|
339
|
-
# ── Form association ──────────────────────────────────────
|
|
340
|
-
|
|
341
273
|
form:
|
|
342
274
|
associated: true
|
|
343
275
|
submit: Calls form.requestSubmit() when type="submit".
|
|
344
276
|
reset: Calls form.reset() when type="reset".
|
|
345
|
-
|
|
346
|
-
# ── Events ────────────────────────────────────────────────
|
|
347
|
-
|
|
348
277
|
events:
|
|
349
278
|
click:
|
|
350
|
-
description:
|
|
351
|
-
Native click event. Blocked when disabled or loading.
|
|
352
|
-
Fires form submit/reset when type is set. Navigates when href is set.
|
|
353
|
-
|
|
354
|
-
# ── CSS tokens consumed ──────────────────────────────────
|
|
355
|
-
|
|
279
|
+
description: |
|
|
280
|
+
Native click event. Blocked when disabled or loading. Fires form submit/reset when type is set. Navigates when href is set.
|
|
356
281
|
tokens:
|
|
357
282
|
- name: --aui-button-size
|
|
358
283
|
default: var(--aui-size)
|
|
@@ -405,9 +330,6 @@ tokens:
|
|
|
405
330
|
- name: --aui-button-border-hover
|
|
406
331
|
default: var(--aui-stroke-hover)
|
|
407
332
|
description: Border color on hover.
|
|
408
|
-
|
|
409
|
-
# ── Use cases ─────────────────────────────────────────────
|
|
410
|
-
|
|
411
333
|
use-cases:
|
|
412
334
|
- Primary call-to-action in forms and action bars.
|
|
413
335
|
- Ghost/outline secondary actions alongside primary buttons.
|
|
@@ -416,54 +338,48 @@ use-cases:
|
|
|
416
338
|
- Form submit/reset triggers.
|
|
417
339
|
- Buttons with text adornments (e.g. "AI" badge via text-leading).
|
|
418
340
|
- Resize-responsive buttons that collapse adornments as space shrinks.
|
|
419
|
-
|
|
420
|
-
# ── Examples ──────────────────────────────────────────────
|
|
421
|
-
|
|
422
341
|
examples:
|
|
423
|
-
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
342
|
+
- description: Text only
|
|
343
|
+
html: <aui-button>Default</aui-button>
|
|
344
|
+
- description: Declarative label
|
|
345
|
+
html: <aui-button label="Default Action"></aui-button>
|
|
346
|
+
- description: Leading icon + label
|
|
347
|
+
html: <aui-button label="Create project" icon-leading="plus" primary accent></aui-button>
|
|
348
|
+
- description: Leading icon + text-leading + label
|
|
349
|
+
html: <aui-button label="Generate" icon-leading="robot" text-leading="AI" primary></aui-button>
|
|
350
|
+
- description: Leading + trailing icons + label
|
|
351
|
+
html: <aui-button label="Suggestions" icon-leading="lightbulb" icon-trailing="caret-right"></aui-button>
|
|
352
|
+
- description: Icon-only (label hidden, used for aria)
|
|
353
|
+
html: <aui-button label="Settings" icon-leading="gear" ghost hide-label></aui-button>
|
|
354
|
+
- description: Primary accent
|
|
355
|
+
html: <aui-button label="Save" icon-leading="check" primary accent></aui-button>
|
|
356
|
+
- description: Outline
|
|
357
|
+
html: <aui-button label="Cancel" outline></aui-button>
|
|
358
|
+
- description: Ghost
|
|
359
|
+
html: <aui-button label="Skip" ghost></aui-button>
|
|
360
|
+
- description: Danger
|
|
361
|
+
html: <aui-button label="Delete" icon-leading="warning" primary danger></aui-button>
|
|
362
|
+
- description: Success
|
|
363
|
+
html: <aui-button label="Approved" icon-leading="check-circle" primary success></aui-button>
|
|
364
|
+
- description: Progressive collapse — resize the container to see buttons adapt
|
|
365
|
+
html: |-
|
|
366
|
+
<div responsive style="resize: horizontal; overflow: hidden; border: 1px dashed var(--aui-border-muted); border-radius: var(--aui-radius); padding: 1rem; width: 24rem; min-width: 3rem; display: flex; gap: 0.5rem; flex-wrap: nowrap;">
|
|
367
|
+
<aui-button label="Toggle scheme" icon-leading="sun" icon-trailing="caret-right" outline></aui-button>
|
|
368
|
+
<aui-button label="Search" icon-leading="magnifying-glass" outline></aui-button>
|
|
369
|
+
<aui-button label="More" icon-trailing="dots-three" ghost></aui-button>
|
|
370
|
+
</div>
|
|
371
|
+
- description: Disabled
|
|
372
|
+
html: <aui-button label="Disabled" icon-leading="x" primary accent disabled></aui-button>
|
|
373
|
+
- description: Loading
|
|
374
|
+
html: <aui-button label="Saving…" primary accent loading></aui-button>
|
|
375
|
+
- description: Compact density
|
|
376
|
+
html: <aui-button label="Add" icon-leading="plus" primary accent density="compact"></aui-button>
|
|
377
|
+
- description: Round pill
|
|
378
|
+
html: <aui-button label="Favorite" icon-leading="star" outline round></aui-button>
|
|
379
|
+
- description: Manual slots — inline SVG + text children
|
|
380
|
+
html: |-
|
|
454
381
|
<aui-button outline>
|
|
455
382
|
<aui-icon name="robot" slot="leading"></aui-icon>
|
|
456
383
|
Ask AI
|
|
457
384
|
<aui-icon name="sparkle" slot="trailing"></aui-icon>
|
|
458
385
|
</aui-button>
|
|
459
|
-
description: Manual slot pattern with inline text and aui-icon children.
|
|
460
|
-
|
|
461
|
-
- html: |
|
|
462
|
-
<div responsive style="resize: horizontal; overflow: hidden; width: 24rem; min-width: 3rem; display: flex; gap: 0.5rem;">
|
|
463
|
-
<aui-button label="Toggle scheme" icon-leading="sun" icon-trailing="caret-right" outline></aui-button>
|
|
464
|
-
<aui-button label="Search" icon-leading="magnifying-glass" outline></aui-button>
|
|
465
|
-
</div>
|
|
466
|
-
description: >
|
|
467
|
-
Resize-responsive collapse demo. Drag to shrink — buttons progressively
|
|
468
|
-
hide leading icons/text (< 128px), trailing icons/text (< 96px),
|
|
469
|
-
then collapse to icon-only with tight padding (< 72px).
|