@agent-ui-kit/web-components 0.0.14 → 0.0.16

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 (211) hide show
  1. package/dist/agent-ui.css +1 -1
  2. package/dist/api.colors.json +2 -2
  3. package/dist/api.colors.yaml +2 -2
  4. package/dist/api.components.json +3878 -636
  5. package/dist/api.tokens.json +35 -3
  6. package/dist/api.tokens.yaml +27 -3
  7. package/dist/chunks/{agent-C72JZNe6.js → agent-XMhz_6OA.js} +85 -76
  8. package/dist/chunks/{agent-C72JZNe6.js.map → agent-XMhz_6OA.js.map} +1 -1
  9. package/dist/chunks/{empty-state-5M3uR5CM.js → form-oekEhwja.js} +1409 -960
  10. package/dist/chunks/form-oekEhwja.js.map +1 -0
  11. package/dist/components/agent.js +6 -6
  12. package/dist/components/avatar/avatar.d.ts +0 -0
  13. package/dist/components/badge/badge.d.ts +0 -0
  14. package/dist/components/bar/bar.d.ts +0 -0
  15. package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
  16. package/dist/components/button-group/button-group.d.ts +0 -0
  17. package/dist/components/checkbox-group/checkbox-group.d.ts +14 -0
  18. package/dist/components/checkbox-group/index.d.ts +1 -0
  19. package/dist/components/code/code.d.ts +0 -0
  20. package/dist/components/color-area/color-area.d.ts +2 -1
  21. package/dist/components/color-picker/color-picker.d.ts +1 -0
  22. package/dist/components/color-picker/oklch-utils.d.ts +18 -0
  23. package/dist/components/color-slider/color-slider.d.ts +1 -1
  24. package/dist/components/color-swatch/color-swatch.d.ts +0 -0
  25. package/dist/components/content/content.d.ts +0 -0
  26. package/dist/components/description-list/description-list.d.ts +0 -0
  27. package/dist/components/divider/divider.d.ts +0 -0
  28. package/dist/components/editor.js +1 -1
  29. package/dist/components/fieldset/fieldset.d.ts +0 -0
  30. package/dist/components/footer/footer.d.ts +0 -0
  31. package/dist/components/form/form.d.ts +12 -0
  32. package/dist/components/form/index.d.ts +1 -0
  33. package/dist/components/graph.js +1 -1
  34. package/dist/components/grid/grid.d.ts +0 -0
  35. package/dist/components/header/header.d.ts +0 -0
  36. package/dist/components/heading/heading.d.ts +0 -0
  37. package/dist/components/index.d.ts +2 -0
  38. package/dist/components/input-group/input-group.d.ts +0 -0
  39. package/dist/components/inset/inset.d.ts +0 -0
  40. package/dist/components/kbd/kbd.d.ts +0 -0
  41. package/dist/components/noodles/noodle-controller.d.ts +1 -1
  42. package/dist/components/stack/stack.d.ts +0 -0
  43. package/dist/components/stat/stat.d.ts +4 -0
  44. package/dist/components/text/text.d.ts +0 -0
  45. package/dist/components/time-field/time-field.d.ts +1 -0
  46. package/dist/components/wrap/wrap.d.ts +0 -0
  47. package/dist/components.js +115 -126
  48. package/dist/components.js.map +1 -1
  49. package/dist/docs/blocks/agent-chat.yaml +33 -25
  50. package/dist/docs/blocks/announcement-card.yaml +14 -10
  51. package/dist/docs/blocks/bpm-process.yaml +216 -4
  52. package/dist/docs/blocks/chart-activity.yaml +12 -10
  53. package/dist/docs/blocks/chart-card.yaml +14 -11
  54. package/dist/docs/blocks/chart-donut.yaml +27 -23
  55. package/dist/docs/blocks/chart-grouped.yaml +14 -11
  56. package/dist/docs/blocks/chart-horizontal.yaml +13 -10
  57. package/dist/docs/blocks/chart-interactive.yaml +20 -17
  58. package/dist/docs/blocks/chart-labeled.yaml +14 -11
  59. package/dist/docs/blocks/checkout-form.yaml +26 -16
  60. package/dist/docs/blocks/clinical-trial.yaml +180 -4
  61. package/dist/docs/blocks/contributors.yaml +17 -11
  62. package/dist/docs/blocks/cyber-threat.yaml +158 -4
  63. package/dist/docs/blocks/dashboard-layout.yaml +25 -18
  64. package/dist/docs/blocks/data-eng-dag.yaml +222 -6
  65. package/dist/docs/blocks/date-picker.yaml +11 -10
  66. package/dist/docs/blocks/ddx-workflow.yaml +202 -6
  67. package/dist/docs/blocks/empty-state.yaml +8 -11
  68. package/dist/docs/blocks/env-variables.yaml +29 -20
  69. package/dist/docs/blocks/feature-upgrade.yaml +25 -18
  70. package/dist/docs/blocks/financial-risk.yaml +161 -4
  71. package/dist/docs/blocks/flow-editor.yaml +27 -18
  72. package/dist/docs/blocks/gen-ai-pipeline.yaml +232 -5
  73. package/dist/docs/blocks/issue-assign.yaml +25 -14
  74. package/dist/docs/blocks/keyboard-shortcuts.yaml +14 -9
  75. package/dist/docs/blocks/login-branded.yaml +62 -23
  76. package/dist/docs/blocks/login-email-only.yaml +14 -13
  77. package/dist/docs/blocks/login-form.yaml +17 -11
  78. package/dist/docs/blocks/login-simple.yaml +18 -12
  79. package/dist/docs/blocks/login-social.yaml +21 -14
  80. package/dist/docs/blocks/login-two-column.yaml +42 -22
  81. package/dist/docs/blocks/marketing-automation.yaml +209 -4
  82. package/dist/docs/blocks/member-list.yaml +23 -18
  83. package/dist/docs/blocks/ml-pipeline.yaml +163 -4
  84. package/dist/docs/blocks/nav-card.yaml +13 -11
  85. package/dist/docs/blocks/notification-list.yaml +18 -13
  86. package/dist/docs/blocks/oncology-pathway.yaml +227 -4
  87. package/dist/docs/blocks/pricing-card.yaml +20 -13
  88. package/dist/docs/blocks/processing-state.yaml +14 -11
  89. package/dist/docs/blocks/profile-card.yaml +22 -16
  90. package/dist/docs/blocks/saas-onboarding.yaml +222 -4
  91. package/dist/docs/blocks/settings-form.yaml +20 -11
  92. package/dist/docs/blocks/settings-panel.yaml +23 -22
  93. package/dist/docs/blocks/sidebar-nav.yaml +23 -15
  94. package/dist/docs/blocks/signup-form.yaml +17 -11
  95. package/dist/docs/blocks/stat-cards.yaml +12 -13
  96. package/dist/docs/blocks/status-card.yaml +20 -17
  97. package/dist/docs/blocks/suggested-labs.yaml +20 -13
  98. package/dist/docs/blocks/supply-chain.yaml +160 -4
  99. package/dist/docs/blocks/survey-card.yaml +21 -13
  100. package/dist/docs/blocks/tabbed-panel.yaml +21 -15
  101. package/dist/docs/blocks/team-empty.yaml +8 -9
  102. package/dist/docs/blocks/usage-billing.yaml +20 -16
  103. package/dist/docs/components/accordion-item.yaml +13 -21
  104. package/dist/docs/components/accordion.yaml +23 -29
  105. package/dist/docs/components/agent-activity.yaml +49 -41
  106. package/dist/docs/components/agent-feed.yaml +15 -22
  107. package/dist/docs/components/agent-input.yaml +238 -0
  108. package/dist/docs/components/agent-message.yaml +29 -48
  109. package/dist/docs/components/agent-panel.yaml +21 -24
  110. package/dist/docs/components/agent-prompt.yaml +29 -47
  111. package/dist/docs/components/agent-seeds.yaml +16 -24
  112. package/dist/docs/components/agent-text.yaml +14 -24
  113. package/dist/docs/components/agent-thread.yaml +15 -24
  114. package/dist/docs/components/alert.yaml +41 -39
  115. package/dist/docs/components/avatar-group.yaml +72 -45
  116. package/dist/docs/components/avatar.yaml +99 -0
  117. package/dist/docs/components/badge.yaml +110 -0
  118. package/dist/docs/components/bar.yaml +84 -0
  119. package/dist/docs/components/breadcrumb-item.yaml +8 -17
  120. package/dist/docs/components/breadcrumb.yaml +91 -29
  121. package/dist/docs/components/button-group.yaml +93 -0
  122. package/dist/docs/components/button.yaml +188 -261
  123. package/dist/docs/components/calendar-picker.yaml +16 -35
  124. package/dist/docs/components/calendar-range-picker.yaml +11 -29
  125. package/dist/docs/components/calendar.yaml +11 -29
  126. package/dist/docs/components/canvas.yaml +44 -61
  127. package/dist/docs/components/checkbox.yaml +37 -49
  128. package/dist/docs/components/chip.yaml +89 -55
  129. package/dist/docs/components/code-block.yaml +54 -53
  130. package/dist/docs/components/code.yaml +37 -0
  131. package/dist/docs/components/color-area.yaml +119 -0
  132. package/dist/docs/components/color-field.yaml +121 -0
  133. package/dist/docs/components/color-picker.yaml +87 -35
  134. package/dist/docs/components/color-slider.yaml +153 -0
  135. package/dist/docs/components/color-swatch.yaml +98 -0
  136. package/dist/docs/components/command.yaml +13 -18
  137. package/dist/docs/components/container.yaml +84 -73
  138. package/dist/docs/components/content.yaml +100 -0
  139. package/dist/docs/components/context-menu.yaml +11 -20
  140. package/dist/docs/components/date-field.yaml +81 -33
  141. package/dist/docs/components/description-list.yaml +81 -0
  142. package/dist/docs/components/disclosure-group.yaml +61 -42
  143. package/dist/docs/components/disclosure.yaml +60 -46
  144. package/dist/docs/components/divider.yaml +63 -0
  145. package/dist/docs/components/dropdown-menu.yaml +16 -25
  146. package/dist/docs/components/feed.yaml +15 -24
  147. package/dist/docs/components/field.yaml +50 -71
  148. package/dist/docs/components/fieldset.yaml +92 -0
  149. package/dist/docs/components/footer.yaml +147 -0
  150. package/dist/docs/components/grid.yaml +87 -0
  151. package/dist/docs/components/gripper.yaml +11 -23
  152. package/dist/docs/components/header.yaml +168 -0
  153. package/dist/docs/components/heading.yaml +58 -0
  154. package/dist/docs/components/hover-card.yaml +17 -25
  155. package/dist/docs/components/icon.yaml +32 -65
  156. package/dist/docs/components/index.yaml +11 -1
  157. package/dist/docs/components/input-group.yaml +102 -0
  158. package/dist/docs/components/input-otp.yaml +20 -19
  159. package/dist/docs/components/input.yaml +100 -139
  160. package/dist/docs/components/inset.yaml +59 -0
  161. package/dist/docs/components/kbd.yaml +57 -0
  162. package/dist/docs/components/link.yaml +36 -45
  163. package/dist/docs/components/meter.yaml +54 -42
  164. package/dist/docs/components/nav-item.yaml +54 -43
  165. package/dist/docs/components/noodles.yaml +72 -104
  166. package/dist/docs/components/option.yaml +12 -23
  167. package/dist/docs/components/pagination.yaml +21 -18
  168. package/dist/docs/components/pane.yaml +18 -32
  169. package/dist/docs/components/panes.yaml +19 -27
  170. package/dist/docs/components/progress-circle.yaml +64 -55
  171. package/dist/docs/components/progress.yaml +35 -51
  172. package/dist/docs/components/radio-group.yaml +99 -40
  173. package/dist/docs/components/radio.yaml +40 -41
  174. package/dist/docs/components/range.yaml +24 -27
  175. package/dist/docs/components/segmented-control.yaml +58 -17
  176. package/dist/docs/components/select.yaml +80 -100
  177. package/dist/docs/components/skeleton.yaml +39 -39
  178. package/dist/docs/components/sparkline.yaml +28 -45
  179. package/dist/docs/components/spinner.yaml +32 -33
  180. package/dist/docs/components/stack.yaml +126 -0
  181. package/dist/docs/components/stat.yaml +164 -0
  182. package/dist/docs/components/stepper.yaml +46 -53
  183. package/dist/docs/components/switch.yaml +36 -47
  184. package/dist/docs/components/tab-panel.yaml +27 -18
  185. package/dist/docs/components/tab.yaml +25 -22
  186. package/dist/docs/components/table-header.yaml +22 -12
  187. package/dist/docs/components/tabs.yaml +103 -20
  188. package/dist/docs/components/tag-group.yaml +63 -47
  189. package/dist/docs/components/text.yaml +67 -0
  190. package/dist/docs/components/textarea.yaml +43 -60
  191. package/dist/docs/components/time-field.yaml +108 -34
  192. package/dist/docs/components/toast.yaml +13 -30
  193. package/dist/docs/components/tooltip.yaml +56 -49
  194. package/dist/docs/components/tree-item.yaml +9 -10
  195. package/dist/docs/components/tree.yaml +127 -10
  196. package/dist/docs/components/wrap.yaml +60 -0
  197. package/dist/docs/traits/toggle-theme.yaml +34 -0
  198. package/dist/element.js +1 -1
  199. package/dist/icons.js +79 -59
  200. package/dist/icons.js.map +1 -1
  201. package/dist/reactivity.js +2 -2
  202. package/dist/register.d.ts +0 -1
  203. package/dist/register.js +368 -352
  204. package/dist/register.js.map +1 -1
  205. package/dist/store.js +1 -1
  206. package/dist/traits/toggle-theme/toggle-theme.d.ts +0 -0
  207. package/dist/traits/toggle-theme/toggle-theme.trait.d.ts +2 -0
  208. package/dist/traits.js +528 -485
  209. package/dist/traits.js.map +1 -1
  210. package/package.json +1 -1
  211. package/dist/chunks/empty-state-5M3uR5CM.js.map +0 -1
@@ -2,328 +2,274 @@ 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: [xs, sm, md, lg, xl]
38
- description: >
39
- Controls dimensions, typography, icon size, and spacing
40
- simultaneously. Swaps 7 tokens at once.
41
-
14
+ values:
15
+ - xs
16
+ - sm
17
+ - md
18
+ - lg
19
+ - xl
20
+ - fill
21
+ description: |
22
+ Controls dimensions, typography, icon size, and spacing simultaneously. Swaps 7 tokens at once. The special "fill" value stretches the button to 100% width and height of its parent cell with no minimum constraints.
42
23
  radius:
43
24
  syntax: boolean
44
25
  exclusive: true
45
26
  cascades: true
46
27
  default: medium
47
- values: [sharp, round]
28
+ values:
29
+ - sharp
30
+ - round
48
31
  description: Controls border radius. Default is a medium radius.
49
-
50
32
  density:
51
33
  syntax: key-value
52
34
  attribute: density
53
35
  cascades: true
54
36
  default: regular
55
- values: [compact, spacious]
56
- description: >
57
- Controls padding and spacing compression. Unlike size (which
58
- shifts the active step), density redefines the entire scale.
59
-
37
+ values:
38
+ - compact
39
+ - spacious
40
+ description: |
41
+ Controls padding and spacing compression. Unlike size (which shifts the active step), density redefines the entire scale.
60
42
  variant:
61
43
  syntax: boolean
62
44
  exclusive: true
63
45
  cascades: true
64
46
  default: default
65
- values: [primary, outline, ghost, scrim]
66
- description: >
67
- Surface expression — how the component fills its space.
68
- Default is a standard fill with role-appropriate background.
69
-
47
+ values:
48
+ - primary
49
+ - outline
50
+ - ghost
51
+ - scrim
52
+ description: |
53
+ Surface expression — how the component fills its space. Default is a standard fill with role-appropriate background.
70
54
  intent:
71
55
  syntax: boolean
72
56
  exclusive: true
73
57
  cascades: true
74
58
  default: neutral
75
- values: [accent, info, success, warning, danger]
76
- description: >
77
- Color family. All color tokens remap to the selected palette.
78
- Default is the neutral palette.
79
-
59
+ values:
60
+ - accent
61
+ - info
62
+ - success
63
+ - warning
64
+ - danger
65
+ description: |
66
+ Color family. All color tokens remap to the selected palette. Default is the neutral palette.
80
67
  state:
81
68
  syntax: boolean
82
69
  exclusive: false
83
70
  cascades: false
84
71
  default: none
85
- values: [active, selected, highlighted]
86
- description: >
87
- Visual state indicators. Unlike other presentational groups,
88
- state values can combine (e.g. selected + highlighted).
89
-
90
- # ── Cross-product sections ────────────────────────────────
91
-
72
+ values:
73
+ - active
74
+ - selected
75
+ - highlighted
76
+ description: |
77
+ Visual state indicators. Unlike other presentational groups, state values can combine (e.g. selected + highlighted).
92
78
  cross:
93
- - dimensions: [variant, intent]
79
+ - dimensions:
80
+ - variant
81
+ - intent
94
82
  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
-
83
+ description: |
84
+ Each variant with each intent color. The most common composition pattern for buttons.
102
85
  attributes:
103
86
  disabled:
104
87
  syntax: boolean
105
88
  type: boolean
106
89
  default: false
107
90
  description: Prevents interaction. Dims visually.
108
-
109
91
  loading:
110
92
  syntax: boolean
111
93
  type: boolean
112
94
  default: false
113
95
  description: Shows loading state. Blocks interaction but not focus.
114
-
115
96
  type:
116
97
  syntax: key-value
117
98
  type: enum
118
- values: [button, submit, reset]
99
+ values:
100
+ - button
101
+ - submit
102
+ - reset
119
103
  default: button
120
- description: >
121
- Button behavior within a form. submit calls form.requestSubmit(),
122
- reset calls form.reset().
123
-
104
+ description: |
105
+ Button behavior within a form. submit calls form.requestSubmit(), reset calls form.reset().
124
106
  label:
125
107
  syntax: key-value
126
108
  type: string
127
109
  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
-
110
+ description: |
111
+ 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
112
  icon-leading:
135
113
  syntax: key-value
136
114
  type: string
137
115
  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
-
116
+ description: |
117
+ Icon registry name for the leading icon. JS stamps an <aui-icon name="..." slot="leading"> element into the button.
142
118
  icon-trailing:
143
119
  syntax: key-value
144
120
  type: string
145
121
  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
-
122
+ description: |
123
+ Icon registry name for the trailing icon. JS stamps an <aui-icon name="..." slot="trailing"> element into the button.
150
124
  text-leading:
151
125
  syntax: key-value
152
126
  type: string
153
127
  default: ""
154
- description: >
155
- Text adornment before the label. JS stamps a
156
- <span slot="leading-text"> element. Separate from the icon slot.
157
-
128
+ description: |
129
+ Text adornment before the label. JS stamps a <span slot="leading-text"> element. Separate from the icon slot.
158
130
  text-trailing:
159
131
  syntax: key-value
160
132
  type: string
161
133
  default: ""
162
- description: >
163
- Text adornment after the label. JS stamps a
164
- <span slot="trailing-text"> element. Separate from the icon slot.
165
-
134
+ description: |
135
+ Text adornment after the label. JS stamps a <span slot="trailing-text"> element. Separate from the icon slot.
166
136
  icon:
167
137
  syntax: key-value
168
138
  type: string
169
139
  default: ""
170
- description: >
171
- Shorthand icon name from the icon registry. Convenience for
172
- hide-label buttons — equivalent to icon-leading.
173
-
140
+ description: |
141
+ Shorthand icon name from the icon registry. Convenience for hide-label buttons — equivalent to icon-leading.
174
142
  href:
175
143
  syntax: key-value
176
144
  type: string
177
145
  default: ""
178
- description: >
179
- When set, button acts as a navigation link. Clicking navigates
180
- to the given URL.
181
-
182
- # ── Modifiers ─────────────────────────────────────────────
183
-
146
+ description: |
147
+ When set, button acts as a navigation link. Clicking navigates to the given URL.
184
148
  modifiers:
185
149
  hide-label:
186
150
  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
-
151
+ description: |
152
+ Hides the label text and collapses the button to icon-only. Square button sized to --aui-size with width/height = var(--aui-size) and padding: 0. Use with a slotted icon, icon-leading, or the icon attribute. Auto-detected when no label attribute and no child text nodes are present.
153
+ icon-size:
154
+ syntax: key-value
155
+ values:
156
+ - half
157
+ - sm
158
+ - md
159
+ - lg
160
+ - full
161
+ description: |
162
+ Percentage-based icon sizing within fill-mode buttons (size="fill"). Maps to 50%, 62.5%, 75%, 87.5%, 100% respectively.
192
163
  text:
193
164
  syntax: key-value
194
- values: [left, right]
195
- description: >
196
- Overrides the default centered text alignment.
197
- Useful for wide buttons where left- or right-aligned labels
198
- feel more natural.
199
-
200
- # ── Internal data attributes ─────────────────────────────
201
-
165
+ values:
166
+ - left
167
+ - right
168
+ description: |
169
+ Overrides the default centered text alignment. Useful for wide buttons where left- or right-aligned labels feel more natural.
202
170
  data-attributes:
203
171
  data-has-text:
204
172
  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
-
173
+ description: |
174
+ 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
175
  resize:
215
176
  data-resize-small:
216
- threshold: "< 128px"
217
- description: >
177
+ threshold: < 128px
178
+ description: |
218
179
  Hides leading icon and leading-text adornment.
219
-
220
180
  data-resize-xsmall:
221
- threshold: "< 96px"
222
- description: >
181
+ threshold: < 96px
182
+ description: |
223
183
  Hides trailing icon and trailing-text adornment.
224
-
225
184
  data-resize-compact:
226
- threshold: "< 72px"
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
-
185
+ threshold: < 72px
186
+ description: |
187
+ Hides everything except the leading icon. Applies tight padding. Button collapses to near icon-only appearance.
233
188
  content:
234
189
  model: inline
235
- accepts: [text, span, svg, img, aui-icon]
190
+ accepts:
191
+ - text
192
+ - span
193
+ - svg
194
+ - img
195
+ - aui-icon
236
196
  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
-
197
+ description: |
198
+ 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
199
  slots:
246
200
  default:
247
- accepts: [text, inline elements]
201
+ accepts:
202
+ - text
203
+ - inline elements
248
204
  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
-
205
+ description: |
206
+ Button label text content. Prefer using the label attribute instead, which renders the label via CSS ::after without JS.
253
207
  leading:
254
- accepts: [aui-icon, span, svg, img]
208
+ accepts:
209
+ - aui-icon
210
+ - span
211
+ - svg
212
+ - img
255
213
  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
-
214
+ description: |
215
+ Leading icon. Typically stamped by JS from icon-leading attribute as <aui-icon slot="leading">. Manual slotting is also supported.
260
216
  trailing:
261
- accepts: [aui-icon, span, svg, img]
217
+ accepts:
218
+ - aui-icon
219
+ - span
220
+ - svg
221
+ - img
262
222
  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
-
223
+ description: |
224
+ Trailing icon. Typically stamped by JS from icon-trailing attribute as <aui-icon slot="trailing">. Manual slotting is also supported.
267
225
  leading-text:
268
- accepts: [span]
226
+ accepts:
227
+ - span
269
228
  required: false
270
- description: >
271
- Text adornment before the label. Stamped by JS from text-leading
272
- attribute as <span slot="leading-text">.
273
-
229
+ description: |
230
+ Text adornment before the label. Stamped by JS from text-leading attribute as <span slot="leading-text">.
274
231
  trailing-text:
275
- accepts: [span]
232
+ accepts:
233
+ - span
276
234
  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
-
235
+ description: |
236
+ Text adornment after the label. Stamped by JS from text-trailing attribute as <span slot="trailing-text">.
283
237
  composition:
284
- parents: [aui-stack, aui-grid, aui-header, aui-footer, aui-inset, form, div, section]
238
+ parents:
239
+ - aui-stack
240
+ - aui-grid
241
+ - aui-header
242
+ - aui-footer
243
+ - aui-inset
244
+ - form
245
+ - div
246
+ - section
285
247
  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
-
248
+ context: |
249
+ Buttons are leaf-level interactive elements. They appear in action bars, forms, headers, toolbars. Use aui-stack direction="row" to group multiple buttons.
293
250
  constraints:
294
251
  - when: hide-label
295
252
  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
-
253
+ reason: |
254
+ Screen readers need accessible text when no visible label is present. The label attribute maps to aria-label.
300
255
  - when: href
301
- conflicts-with: [type]
302
- reason: >
303
- Link-mode buttons navigate via href. Form type attributes
304
- (submit/reset) are meaningless in link mode.
305
-
306
- # ── Deprecated / Removed ─────────────────────────────────
307
-
256
+ conflicts-with:
257
+ - type
258
+ reason: |
259
+ Link-mode buttons navigate via href. Form type attributes (submit/reset) are meaningless in link mode.
308
260
  deprecated:
309
261
  aui-icon-button:
310
262
  status: removed
311
- replacement: >
263
+ replacement: |
312
264
  Use <aui-button hide-label label="..." icon-leading="..."> instead.
313
-
314
265
  icon-only:
315
266
  status: removed
316
- replacement: >
267
+ replacement: |
317
268
  Renamed to hide-label attribute on <aui-button>.
318
-
319
269
  name-on-aui-icon:
320
270
  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
-
271
+ replacement: |
272
+ The name attribute on <aui-icon> is renamed to registry. Use <aui-icon name="..."> instead of <aui-icon name="...">.
327
273
  a11y:
328
274
  role: button
329
275
  keyboard:
@@ -335,24 +281,14 @@ a11y:
335
281
  focus:
336
282
  default: tabindex="0"
337
283
  disabled: tabindex="-1"
338
-
339
- # ── Form association ──────────────────────────────────────
340
-
341
284
  form:
342
285
  associated: true
343
286
  submit: Calls form.requestSubmit() when type="submit".
344
287
  reset: Calls form.reset() when type="reset".
345
-
346
- # ── Events ────────────────────────────────────────────────
347
-
348
288
  events:
349
289
  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
-
290
+ description: |
291
+ Native click event. Blocked when disabled or loading. Fires form submit/reset when type is set. Navigates when href is set.
356
292
  tokens:
357
293
  - name: --aui-button-size
358
294
  default: var(--aui-size)
@@ -405,9 +341,6 @@ tokens:
405
341
  - name: --aui-button-border-hover
406
342
  default: var(--aui-stroke-hover)
407
343
  description: Border color on hover.
408
-
409
- # ── Use cases ─────────────────────────────────────────────
410
-
411
344
  use-cases:
412
345
  - Primary call-to-action in forms and action bars.
413
346
  - Ghost/outline secondary actions alongside primary buttons.
@@ -416,54 +349,48 @@ use-cases:
416
349
  - Form submit/reset triggers.
417
350
  - Buttons with text adornments (e.g. "AI" badge via text-leading).
418
351
  - Resize-responsive buttons that collapse adornments as space shrinks.
419
-
420
- # ── Examples ──────────────────────────────────────────────
421
-
422
352
  examples:
423
- - html: <aui-button label="Default Action"></aui-button>
424
- description: Declarative label via attribute (rendered by CSS ::after).
425
-
426
- - html: <aui-button label="Save" icon-leading="check" primary accent></aui-button>
427
- description: Leading icon + label, primary accent.
428
-
429
- - html: <aui-button label="Delete" icon-leading="warning" primary danger></aui-button>
430
- description: Danger button with leading warning icon.
431
-
432
- - html: <aui-button label="Cancel" outline></aui-button>
433
- description: Outlined button.
434
-
435
- - html: <aui-button label="Skip" ghost></aui-button>
436
- description: Ghost button with no chrome.
437
-
438
- - html: <aui-button label="Settings" icon-leading="gear" ghost hide-label></aui-button>
439
- description: Icon-only ghost button with accessible label via hide-label.
440
-
441
- - html: <aui-button label="Generate" icon-leading="robot" text-leading="AI" primary></aui-button>
442
- description: Leading icon + text adornment + label.
443
-
444
- - html: <aui-button label="Suggestions" icon-leading="lightbulb" icon-trailing="caret-right"></aui-button>
445
- description: Leading + trailing icons with label.
446
-
447
- - html: <aui-button href="/about" label="Learn More"></aui-button>
448
- description: Link-mode button.
449
-
450
- - html: <aui-button type="submit" label="Submit" primary accent></aui-button>
451
- description: Form submit button.
452
-
453
- - html: |
353
+ - description: Text only
354
+ html: <aui-button>Default</aui-button>
355
+ - description: Declarative label
356
+ html: <aui-button label="Default Action"></aui-button>
357
+ - description: Leading icon + label
358
+ html: <aui-button label="Create project" icon-leading="plus" primary accent></aui-button>
359
+ - description: Leading icon + text-leading + label
360
+ html: <aui-button label="Generate" icon-leading="robot" text-leading="AI" primary></aui-button>
361
+ - description: Leading + trailing icons + label
362
+ html: <aui-button label="Suggestions" icon-leading="lightbulb" icon-trailing="caret-right"></aui-button>
363
+ - description: Icon-only (label hidden, used for aria)
364
+ html: <aui-button label="Settings" icon-leading="gear" ghost hide-label></aui-button>
365
+ - description: Primary accent
366
+ html: <aui-button label="Save" icon-leading="check" primary accent></aui-button>
367
+ - description: Outline
368
+ html: <aui-button label="Cancel" outline></aui-button>
369
+ - description: Ghost
370
+ html: <aui-button label="Skip" ghost></aui-button>
371
+ - description: Danger
372
+ html: <aui-button label="Delete" icon-leading="warning" primary danger></aui-button>
373
+ - description: Success
374
+ html: <aui-button label="Approved" icon-leading="check-circle" primary success></aui-button>
375
+ - description: Progressive collapse resize the container to see buttons adapt
376
+ html: |-
377
+ <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;">
378
+ <aui-button label="Toggle scheme" icon-leading="sun" icon-trailing="caret-right" outline></aui-button>
379
+ <aui-button label="Search" icon-leading="magnifying-glass" outline></aui-button>
380
+ <aui-button label="More" icon-trailing="dots-three" ghost></aui-button>
381
+ </div>
382
+ - description: Disabled
383
+ html: <aui-button label="Disabled" icon-leading="x" primary accent disabled></aui-button>
384
+ - description: Loading
385
+ html: <aui-button label="Saving…" primary accent loading></aui-button>
386
+ - description: Compact density
387
+ html: <aui-button label="Add" icon-leading="plus" primary accent density="compact"></aui-button>
388
+ - description: Round pill
389
+ html: <aui-button label="Favorite" icon-leading="star" outline round></aui-button>
390
+ - description: Manual slots — inline SVG + text children
391
+ html: |-
454
392
  <aui-button outline>
455
393
  <aui-icon name="robot" slot="leading"></aui-icon>
456
394
  Ask AI
457
395
  <aui-icon name="sparkle" slot="trailing"></aui-icon>
458
396
  </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).