@agent-ui-kit/web-components 0.0.3 → 0.0.5

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 (186) hide show
  1. package/README.md +429 -0
  2. package/dist/agent-ui.css +1 -1
  3. package/dist/api.json +9519 -0
  4. package/dist/docs/blocks/agent-chat.yaml +111 -0
  5. package/dist/docs/blocks/announcement-card.yaml +30 -0
  6. package/dist/docs/blocks/bpm-process.yaml +7 -0
  7. package/dist/docs/blocks/chart-activity.yaml +73 -0
  8. package/dist/docs/blocks/chart-card.yaml +55 -0
  9. package/dist/docs/blocks/chart-donut.yaml +83 -0
  10. package/dist/docs/blocks/chart-grouped.yaml +75 -0
  11. package/dist/docs/blocks/chart-horizontal.yaml +59 -0
  12. package/dist/docs/blocks/chart-interactive.yaml +58 -0
  13. package/dist/docs/blocks/chart-labeled.yaml +66 -0
  14. package/dist/docs/blocks/checkout-form.yaml +57 -0
  15. package/dist/docs/blocks/clinical-trial.yaml +7 -0
  16. package/dist/docs/blocks/contributors.yaml +51 -0
  17. package/dist/docs/blocks/cyber-threat.yaml +7 -0
  18. package/dist/docs/blocks/dashboard-layout.yaml +121 -0
  19. package/dist/docs/blocks/data-eng-dag.yaml +9 -0
  20. package/dist/docs/blocks/date-picker.yaml +30 -0
  21. package/dist/docs/blocks/ddx-workflow.yaml +9 -0
  22. package/dist/docs/blocks/empty-state.yaml +26 -0
  23. package/dist/docs/blocks/env-variables.yaml +46 -0
  24. package/dist/docs/blocks/feature-upgrade.yaml +52 -0
  25. package/dist/docs/blocks/financial-risk.yaml +7 -0
  26. package/dist/docs/blocks/flow-editor.yaml +113 -0
  27. package/dist/docs/blocks/gen-ai-pipeline.yaml +8 -0
  28. package/dist/docs/blocks/index.yaml +245 -0
  29. package/dist/docs/blocks/issue-assign.yaml +34 -0
  30. package/dist/docs/blocks/keyboard-shortcuts.yaml +49 -0
  31. package/dist/docs/blocks/login-branded.yaml +81 -0
  32. package/dist/docs/blocks/login-email-only.yaml +39 -0
  33. package/dist/docs/blocks/login-form.yaml +42 -0
  34. package/dist/docs/blocks/login-simple.yaml +54 -0
  35. package/dist/docs/blocks/login-social.yaml +73 -0
  36. package/dist/docs/blocks/login-two-column.yaml +78 -0
  37. package/dist/docs/blocks/marketing-automation.yaml +7 -0
  38. package/dist/docs/blocks/member-list.yaml +58 -0
  39. package/dist/docs/blocks/ml-pipeline.yaml +7 -0
  40. package/dist/docs/blocks/nav-card.yaml +27 -0
  41. package/dist/docs/blocks/notification-list.yaml +58 -0
  42. package/dist/docs/blocks/oncology-pathway.yaml +7 -0
  43. package/dist/docs/blocks/pricing-card.yaml +53 -0
  44. package/dist/docs/blocks/processing-state.yaml +25 -0
  45. package/dist/docs/blocks/profile-card.yaml +48 -0
  46. package/dist/docs/blocks/saas-onboarding.yaml +7 -0
  47. package/dist/docs/blocks/settings-form.yaml +42 -0
  48. package/dist/docs/blocks/settings-panel.yaml +54 -0
  49. package/dist/docs/blocks/sidebar-nav.yaml +55 -0
  50. package/dist/docs/blocks/signup-form.yaml +47 -0
  51. package/dist/docs/blocks/stat-cards.yaml +49 -0
  52. package/dist/docs/blocks/status-card.yaml +40 -0
  53. package/dist/docs/blocks/suggested-labs.yaml +79 -0
  54. package/dist/docs/blocks/supply-chain.yaml +7 -0
  55. package/dist/docs/blocks/survey-card.yaml +52 -0
  56. package/dist/docs/blocks/tabbed-panel.yaml +53 -0
  57. package/dist/docs/blocks/team-empty.yaml +27 -0
  58. package/dist/docs/blocks/usage-billing.yaml +99 -0
  59. package/dist/docs/components/accordion-item.yaml +52 -0
  60. package/dist/docs/components/accordion.yaml +69 -0
  61. package/dist/docs/components/agent-activity.yaml +79 -0
  62. package/dist/docs/components/agent-feed.yaml +83 -0
  63. package/dist/docs/components/agent-message.yaml +120 -0
  64. package/dist/docs/components/agent-panel.yaml +91 -0
  65. package/dist/docs/components/agent-prompt.yaml +78 -0
  66. package/dist/docs/components/agent-seeds.yaml +44 -0
  67. package/dist/docs/components/agent-text.yaml +57 -0
  68. package/dist/docs/components/agent-thread.yaml +82 -0
  69. package/dist/docs/components/app-shell.yaml +64 -0
  70. package/dist/docs/components/breadcrumb-item.yaml +49 -0
  71. package/dist/docs/components/breadcrumb.yaml +59 -0
  72. package/dist/docs/components/button.yaml +439 -0
  73. package/dist/docs/components/calendar.yaml +74 -0
  74. package/dist/docs/components/canvas.yaml +161 -0
  75. package/dist/docs/components/checkbox.yaml +141 -0
  76. package/dist/docs/components/command-empty.yaml +13 -0
  77. package/dist/docs/components/command-group.yaml +23 -0
  78. package/dist/docs/components/command-input.yaml +19 -0
  79. package/dist/docs/components/command-item.yaml +37 -0
  80. package/dist/docs/components/command-list.yaml +17 -0
  81. package/dist/docs/components/command.yaml +64 -0
  82. package/dist/docs/components/container.yaml +298 -0
  83. package/dist/docs/components/dialog.yaml +133 -0
  84. package/dist/docs/components/drawer.yaml +124 -0
  85. package/dist/docs/components/editor-layer.yaml +59 -0
  86. package/dist/docs/components/editor.yaml +168 -0
  87. package/dist/docs/components/feed.yaml +72 -0
  88. package/dist/docs/components/field.yaml +145 -0
  89. package/dist/docs/components/graph-layer.yaml +41 -0
  90. package/dist/docs/components/graph-node.yaml +58 -0
  91. package/dist/docs/components/graph-noodle.yaml +103 -0
  92. package/dist/docs/components/graph-port.yaml +71 -0
  93. package/dist/docs/components/graph-ui.yaml +64 -0
  94. package/dist/docs/components/gripper.yaml +55 -0
  95. package/dist/docs/components/icon.yaml +133 -0
  96. package/dist/docs/components/index.yaml +320 -0
  97. package/dist/docs/components/input-otp.yaml +59 -0
  98. package/dist/docs/components/input.yaml +289 -0
  99. package/dist/docs/components/noodles.yaml +184 -0
  100. package/dist/docs/components/optgroup.yaml +38 -0
  101. package/dist/docs/components/option.yaml +56 -0
  102. package/dist/docs/components/page-context.yaml +55 -0
  103. package/dist/docs/components/page-main.yaml +39 -0
  104. package/dist/docs/components/page.yaml +36 -0
  105. package/dist/docs/components/pagination.yaml +46 -0
  106. package/dist/docs/components/pane.yaml +102 -0
  107. package/dist/docs/components/panes.yaml +82 -0
  108. package/dist/docs/components/preview-app.yaml +170 -0
  109. package/dist/docs/components/radio-group.yaml +108 -0
  110. package/dist/docs/components/radio.yaml +132 -0
  111. package/dist/docs/components/range.yaml +97 -0
  112. package/dist/docs/components/root.yaml +18 -0
  113. package/dist/docs/components/segment.yaml +41 -0
  114. package/dist/docs/components/segmented-control.yaml +52 -0
  115. package/dist/docs/components/select.yaml +241 -0
  116. package/dist/docs/components/sidebar-content.yaml +32 -0
  117. package/dist/docs/components/sidebar-footer.yaml +28 -0
  118. package/dist/docs/components/sidebar-header.yaml +28 -0
  119. package/dist/docs/components/sidebar.yaml +133 -0
  120. package/dist/docs/components/switch.yaml +131 -0
  121. package/dist/docs/components/tab-panel.yaml +41 -0
  122. package/dist/docs/components/tab.yaml +51 -0
  123. package/dist/docs/components/table-body.yaml +11 -0
  124. package/dist/docs/components/table-cell.yaml +11 -0
  125. package/dist/docs/components/table-column.yaml +76 -0
  126. package/dist/docs/components/table-head.yaml +11 -0
  127. package/dist/docs/components/table-header.yaml +11 -0
  128. package/dist/docs/components/table-row.yaml +11 -0
  129. package/dist/docs/components/table.yaml +219 -0
  130. package/dist/docs/components/tabs.yaml +61 -0
  131. package/dist/docs/components/textarea.yaml +196 -0
  132. package/dist/docs/components/toast.yaml +62 -0
  133. package/dist/docs/components/tooltip.yaml +98 -0
  134. package/dist/docs/components/tree-item.yaml +46 -0
  135. package/dist/docs/components/tree.yaml +27 -0
  136. package/dist/docs/traits/auto-dismiss.yaml +23 -0
  137. package/dist/docs/traits/backtick-wrap.yaml +22 -0
  138. package/dist/docs/traits/clipboard.yaml +31 -0
  139. package/dist/docs/traits/collapsible.yaml +23 -0
  140. package/dist/docs/traits/confetti.yaml +37 -0
  141. package/dist/docs/traits/copy.yaml +27 -0
  142. package/dist/docs/traits/css-inspect.yaml +46 -0
  143. package/dist/docs/traits/dismiss.yaml +23 -0
  144. package/dist/docs/traits/drag.yaml +88 -0
  145. package/dist/docs/traits/drop-zone.yaml +37 -0
  146. package/dist/docs/traits/edit.yaml +39 -0
  147. package/dist/docs/traits/flip.yaml +40 -0
  148. package/dist/docs/traits/gateway.yaml +33 -0
  149. package/dist/docs/traits/hover.yaml +39 -0
  150. package/dist/docs/traits/intersect.yaml +42 -0
  151. package/dist/docs/traits/link-paste.yaml +28 -0
  152. package/dist/docs/traits/linked-scroll.yaml +37 -0
  153. package/dist/docs/traits/list-navigate.yaml +46 -0
  154. package/dist/docs/traits/magnet.yaml +33 -0
  155. package/dist/docs/traits/mention.yaml +40 -0
  156. package/dist/docs/traits/modal.yaml +28 -0
  157. package/dist/docs/traits/noodle.yaml +45 -0
  158. package/dist/docs/traits/overlay.yaml +58 -0
  159. package/dist/docs/traits/pan-zoom.yaml +47 -0
  160. package/dist/docs/traits/parallax.yaml +36 -0
  161. package/dist/docs/traits/persist.yaml +42 -0
  162. package/dist/docs/traits/popover.yaml +28 -0
  163. package/dist/docs/traits/present.yaml +42 -0
  164. package/dist/docs/traits/press-hold.yaml +34 -0
  165. package/dist/docs/traits/range-select.yaml +42 -0
  166. package/dist/docs/traits/resize.yaml +39 -0
  167. package/dist/docs/traits/ripple.yaml +20 -0
  168. package/dist/docs/traits/roving-focus.yaml +30 -0
  169. package/dist/docs/traits/search.yaml +44 -0
  170. package/dist/docs/traits/selection.yaml +41 -0
  171. package/dist/docs/traits/shortcut.yaml +25 -0
  172. package/dist/docs/traits/slash-command.yaml +40 -0
  173. package/dist/docs/traits/snap-resize.yaml +39 -0
  174. package/dist/docs/traits/sort.yaml +47 -0
  175. package/dist/docs/traits/store.yaml +32 -0
  176. package/dist/docs/traits/swipe.yaml +38 -0
  177. package/dist/docs/traits/text-trigger.yaml +35 -0
  178. package/dist/docs/traits/toast.yaml +41 -0
  179. package/dist/docs/traits/toggle-scheme.yaml +40 -0
  180. package/dist/docs/traits/toggle-state.yaml +23 -0
  181. package/dist/docs/traits/tooltip.yaml +39 -0
  182. package/dist/docs/traits/toss.yaml +40 -0
  183. package/dist/docs/traits/trap-focus.yaml +20 -0
  184. package/dist/docs/traits/validate.yaml +52 -0
  185. package/dist/docs/traits/virtual-scroll.yaml +44 -0
  186. package/package.json +4 -2
@@ -0,0 +1,439 @@
1
+ name: aui-button
2
+ tag: aui-button
3
+ type: component
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
+
18
+ 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
+ presentational:
32
+ size:
33
+ syntax: key-value
34
+ attribute: size
35
+ cascades: true
36
+ 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
+
42
+ radius:
43
+ syntax: boolean
44
+ exclusive: true
45
+ cascades: true
46
+ default: medium
47
+ values: [sharp, round]
48
+ description: Controls border radius. Default is a medium radius.
49
+
50
+ density:
51
+ syntax: key-value
52
+ attribute: density
53
+ cascades: true
54
+ 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
+
60
+ variant:
61
+ syntax: boolean
62
+ exclusive: true
63
+ cascades: true
64
+ 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
+
70
+ intent:
71
+ syntax: boolean
72
+ exclusive: true
73
+ cascades: true
74
+ 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
+
80
+ state:
81
+ syntax: boolean
82
+ exclusive: false
83
+ cascades: false
84
+ 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
+
92
+ cross:
93
+ - dimensions: [variant, intent]
94
+ 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
+
102
+ attributes:
103
+ disabled:
104
+ syntax: boolean
105
+ type: boolean
106
+ default: false
107
+ description: Prevents interaction. Dims visually.
108
+
109
+ loading:
110
+ syntax: boolean
111
+ type: boolean
112
+ default: false
113
+ description: Shows loading state. Blocks interaction but not focus.
114
+
115
+ type:
116
+ syntax: key-value
117
+ type: enum
118
+ values: [button, submit, reset]
119
+ default: button
120
+ description: >
121
+ Button behavior within a form. submit calls form.requestSubmit(),
122
+ reset calls form.reset().
123
+
124
+ label:
125
+ syntax: key-value
126
+ type: string
127
+ 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
+
134
+ icon-leading:
135
+ syntax: key-value
136
+ type: string
137
+ 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
+
142
+ icon-trailing:
143
+ syntax: key-value
144
+ type: string
145
+ 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
+
150
+ text-leading:
151
+ syntax: key-value
152
+ type: string
153
+ default: ""
154
+ description: >
155
+ Text adornment before the label. JS stamps a
156
+ <span slot="leading-text"> element. Separate from the icon slot.
157
+
158
+ text-trailing:
159
+ syntax: key-value
160
+ type: string
161
+ default: ""
162
+ description: >
163
+ Text adornment after the label. JS stamps a
164
+ <span slot="trailing-text"> element. Separate from the icon slot.
165
+
166
+ icon:
167
+ syntax: key-value
168
+ type: string
169
+ default: ""
170
+ description: >
171
+ Shorthand icon name from the icon registry. Convenience for
172
+ hide-label buttons — equivalent to icon-leading.
173
+
174
+ href:
175
+ syntax: key-value
176
+ type: string
177
+ default: ""
178
+ description: >
179
+ When set, button acts as a navigation link. Clicking navigates
180
+ to the given URL.
181
+
182
+ # ── Modifiers ─────────────────────────────────────────────
183
+
184
+ modifiers:
185
+ hide-label:
186
+ 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
+
192
+ text:
193
+ 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
+
202
+ data-attributes:
203
+ data-has-text:
204
+ 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
+
214
+ resize:
215
+ data-resize-small:
216
+ threshold: "< 128px"
217
+ description: >
218
+ Hides leading icon and leading-text adornment.
219
+
220
+ data-resize-xsmall:
221
+ threshold: "< 96px"
222
+ description: >
223
+ Hides trailing icon and trailing-text adornment.
224
+
225
+ 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
+
233
+ content:
234
+ model: inline
235
+ accepts: [text, span, svg, img, aui-icon]
236
+ 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
+
245
+ slots:
246
+ default:
247
+ accepts: [text, inline elements]
248
+ 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
+
253
+ leading:
254
+ accepts: [aui-icon, span, svg, img]
255
+ 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
+
260
+ trailing:
261
+ accepts: [aui-icon, span, svg, img]
262
+ 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
+
267
+ leading-text:
268
+ accepts: [span]
269
+ required: false
270
+ description: >
271
+ Text adornment before the label. Stamped by JS from text-leading
272
+ attribute as <span slot="leading-text">.
273
+
274
+ trailing-text:
275
+ accepts: [span]
276
+ 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
+
283
+ composition:
284
+ parents: [aui-stack, aui-grid, aui-header, aui-footer, aui-inset, form, div, section]
285
+ 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
+
293
+ constraints:
294
+ - when: hide-label
295
+ 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
+
300
+ - 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
+
308
+ deprecated:
309
+ aui-icon-button:
310
+ status: removed
311
+ replacement: >
312
+ Use <aui-button hide-label label="..." icon-leading="..."> instead.
313
+
314
+ icon-only:
315
+ status: removed
316
+ replacement: >
317
+ Renamed to hide-label attribute on <aui-button>.
318
+
319
+ name-on-aui-icon:
320
+ 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
+
327
+ a11y:
328
+ role: button
329
+ keyboard:
330
+ Enter: Fires click.
331
+ Space: Fires click.
332
+ aria:
333
+ aria-disabled: Set automatically when disabled attribute is present.
334
+ aria-label: Set from label attribute when present.
335
+ focus:
336
+ default: tabindex="0"
337
+ disabled: tabindex="-1"
338
+
339
+ # ── Form association ──────────────────────────────────────
340
+
341
+ form:
342
+ associated: true
343
+ submit: Calls form.requestSubmit() when type="submit".
344
+ reset: Calls form.reset() when type="reset".
345
+
346
+ # ── Events ────────────────────────────────────────────────
347
+
348
+ events:
349
+ 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
+
356
+ tokens:
357
+ sizing:
358
+ - --aui-size
359
+ - --aui-font-size
360
+ - --aui-font-family
361
+ - --aui-icon-size
362
+ spacing:
363
+ - --aui-pad-control-block
364
+ - --aui-pad-control-inline
365
+ - --aui-pad-gap-control
366
+ - --aui-space
367
+ color:
368
+ - --aui-fill
369
+ - --aui-stroke
370
+ - --aui-indicator
371
+ - --aui-ink
372
+ - --aui-focus
373
+ shape:
374
+ - --aui-radius
375
+ motion:
376
+ - --aui-duration
377
+ - --aui-easing
378
+
379
+ # ── Use cases ─────────────────────────────────────────────
380
+
381
+ use-cases:
382
+ - Primary call-to-action in forms and action bars.
383
+ - Ghost/outline secondary actions alongside primary buttons.
384
+ - Icon-only toolbar actions (hide-label + icon-leading).
385
+ - Navigation links styled as buttons (href mode).
386
+ - Form submit/reset triggers.
387
+ - Buttons with text adornments (e.g. "AI" badge via text-leading).
388
+ - Resize-responsive buttons that collapse adornments as space shrinks.
389
+
390
+ # ── Examples ──────────────────────────────────────────────
391
+
392
+ examples:
393
+ - html: <aui-button label="Default Action"></aui-button>
394
+ description: Declarative label via attribute (rendered by CSS ::after).
395
+
396
+ - html: <aui-button label="Save" icon-leading="check" primary accent></aui-button>
397
+ description: Leading icon + label, primary accent.
398
+
399
+ - html: <aui-button label="Delete" icon-leading="warning" primary danger></aui-button>
400
+ description: Danger button with leading warning icon.
401
+
402
+ - html: <aui-button label="Cancel" outline></aui-button>
403
+ description: Outlined button.
404
+
405
+ - html: <aui-button label="Skip" ghost></aui-button>
406
+ description: Ghost button with no chrome.
407
+
408
+ - html: <aui-button label="Settings" icon-leading="gear" ghost hide-label></aui-button>
409
+ description: Icon-only ghost button with accessible label via hide-label.
410
+
411
+ - html: <aui-button label="Generate" icon-leading="robot" text-leading="AI" primary></aui-button>
412
+ description: Leading icon + text adornment + label.
413
+
414
+ - html: <aui-button label="Suggestions" icon-leading="lightbulb" icon-trailing="caret-right"></aui-button>
415
+ description: Leading + trailing icons with label.
416
+
417
+ - html: <aui-button href="/about" label="Learn More"></aui-button>
418
+ description: Link-mode button.
419
+
420
+ - html: <aui-button type="submit" label="Submit" primary accent></aui-button>
421
+ description: Form submit button.
422
+
423
+ - html: |
424
+ <aui-button outline>
425
+ <aui-icon name="robot" slot="leading"></aui-icon>
426
+ Ask AI
427
+ <aui-icon name="sparkle" slot="trailing"></aui-icon>
428
+ </aui-button>
429
+ description: Manual slot pattern with inline text and aui-icon children.
430
+
431
+ - html: |
432
+ <div responsive style="resize: horizontal; overflow: hidden; width: 24rem; min-width: 3rem; display: flex; gap: 0.5rem;">
433
+ <aui-button label="Toggle scheme" icon-leading="sun" icon-trailing="caret-right" outline></aui-button>
434
+ <aui-button label="Search" icon-leading="magnifying-glass" outline></aui-button>
435
+ </div>
436
+ description: >
437
+ Resize-responsive collapse demo. Drag to shrink — buttons progressively
438
+ hide leading icons/text (< 128px), trailing icons/text (< 96px),
439
+ then collapse to icon-only with tight padding (< 72px).
@@ -0,0 +1,74 @@
1
+ name: aui-calendar
2
+ tag: aui-calendar
3
+ type: component
4
+ summary: Date picker with day, month, and year views.
5
+ description: >
6
+ An interactive calendar for selecting dates. Supports single selection
7
+ and range selection with hover preview. Click the title to drill up
8
+ from day → month → year views. Keyboard navigable with arrow keys,
9
+ Home/End, PageUp/PageDown. Min and max attributes constrain the
10
+ selectable date range.
11
+
12
+ base: AgentElement
13
+
14
+ attributes:
15
+ value:
16
+ syntax: key-value
17
+ type: string
18
+ default: ""
19
+ description: Selected date in ISO format (YYYY-MM-DD).
20
+ min:
21
+ syntax: key-value
22
+ type: string
23
+ default: ""
24
+ description: Minimum selectable date. Dates before this are disabled.
25
+ max:
26
+ syntax: key-value
27
+ type: string
28
+ default: ""
29
+ description: Maximum selectable date. Dates after this are disabled.
30
+ range:
31
+ syntax: boolean
32
+ description: Enables range selection (click start, hover to preview, click to commit).
33
+
34
+ modifiers:
35
+ disabled:
36
+ syntax: boolean
37
+ description: Disables all interaction.
38
+
39
+ a11y:
40
+ role: group
41
+ keyboard:
42
+ ArrowLeft: Previous day.
43
+ ArrowRight: Next day.
44
+ ArrowUp: Same day previous week.
45
+ ArrowDown: Same day next week.
46
+ Home: First day of current week.
47
+ End: Last day of current week.
48
+ PageUp: Previous month (Shift previous year).
49
+ PageDown: Next month (Shift next year).
50
+ Enter: Select focused date.
51
+ Space: Select focused date.
52
+
53
+ events:
54
+ aui:change:
55
+ description: Fired on single date selection. Detail contains { value }.
56
+ aui:range-select:
57
+ description: Fired on range commit. Detail contains { start, end }.
58
+
59
+ examples:
60
+ - html: |
61
+ <aui-calendar></aui-calendar>
62
+ description: Default calendar — current month, no selection.
63
+
64
+ - html: |
65
+ <aui-calendar value="2026-03-17"></aui-calendar>
66
+ description: Calendar with a pre-selected date.
67
+
68
+ - html: |
69
+ <aui-calendar min="2026-03-10" max="2026-03-25"></aui-calendar>
70
+ description: Constrained date range — only March 10-25 selectable.
71
+
72
+ - html: |
73
+ <aui-calendar range></aui-calendar>
74
+ description: Range selection mode — click start, hover preview, click to commit.
@@ -0,0 +1,161 @@
1
+ name: aui-canvas
2
+ tag: aui-canvas
3
+ type: component
4
+ summary: Versatile preview surface with pan/zoom, backgrounds, and editor layout slots.
5
+ description: >
6
+ A composable canvas surface that serves three roles:
7
+ 1. Simple preview container with background patterns (replaces .block-render)
8
+ 2. Infinite canvas with pan and zoom for visual editors
9
+ 3. Full editor layout with leading/trailing panels and floating toolbars
10
+
11
+ The canvas uses a slot-based architecture. Content goes in the default
12
+ slot. Panels attach via leading/trailing slots. Floating UI (toolbars,
13
+ indicators) uses float-top/bottom/left/right slots positioned absolutely
14
+ within the canvas viewport.
15
+
16
+ Pan uses pointer-captured drag on the background. Zoom uses wheel events.
17
+ Both expose CSS custom properties (--_canvas-x, --_canvas-y, --_canvas-zoom)
18
+ so content transforms are CSS-driven.
19
+
20
+ base: AgentElement
21
+
22
+ presentational:
23
+ size:
24
+ syntax: key-value
25
+ attribute: size
26
+ cascades: true
27
+ default: medium
28
+ values: [xs, sm, md, lg, xl]
29
+ description: Cascades size to all children.
30
+
31
+ attributes:
32
+ background:
33
+ syntax: key-value
34
+ type: enum
35
+ values: [none, grid, dots]
36
+ default: none
37
+ description: >
38
+ Background pattern. grid = checkerboard squares.
39
+ dots = dot matrix. none = transparent.
40
+
41
+ orientation:
42
+ syntax: key-value
43
+ type: enum
44
+ values: [horizontal, vertical]
45
+ default: horizontal
46
+ description: >
47
+ Layout direction. horizontal = [leading][content][trailing].
48
+ vertical = [content] over [leading][trailing].
49
+
50
+ modifiers:
51
+ pan-enabled:
52
+ syntax: boolean
53
+ description: Enable click-and-drag panning of the canvas content.
54
+
55
+ zoom-enabled:
56
+ syntax: boolean
57
+ description: Enable scroll-to-zoom on the canvas content.
58
+
59
+ infinite:
60
+ syntax: boolean
61
+ description: >
62
+ Infinite canvas mode. Content is not constrained to the
63
+ viewport bounds. Combines pan-enabled + zoom-enabled.
64
+
65
+ bordered:
66
+ syntax: boolean
67
+ description: Adds a visible border around the canvas.
68
+
69
+ slots:
70
+ default:
71
+ accepts: [any]
72
+ required: true
73
+ description: Main canvas content.
74
+
75
+ leading:
76
+ accepts: [any]
77
+ description: Left panel (horizontal) or top panel (vertical).
78
+
79
+ trailing:
80
+ accepts: [any]
81
+ description: Right panel (horizontal) or bottom panel (vertical).
82
+
83
+ float-top:
84
+ accepts: [any]
85
+ description: Floating toolbar at top center of the viewport.
86
+
87
+ float-bottom:
88
+ accepts: [any]
89
+ description: Floating toolbar at bottom center of the viewport.
90
+
91
+ float-left:
92
+ accepts: [any]
93
+ description: Floating indicator at left center of the viewport.
94
+
95
+ float-right:
96
+ accepts: [any]
97
+ description: Floating indicator at right center of the viewport.
98
+
99
+ tokens:
100
+ custom:
101
+ - --_canvas-x — Current pan X offset in px
102
+ - --_canvas-y — Current pan Y offset in px
103
+ - --_canvas-zoom — Current zoom level (1 = 100%)
104
+
105
+ events:
106
+ aui:canvas-pan:
107
+ description: Fires on pan change. Detail contains { x, y }.
108
+ aui:canvas-zoom:
109
+ description: Fires on zoom change. Detail contains { zoom }.
110
+
111
+ a11y:
112
+ role: region
113
+ keyboard:
114
+ "0": Reset zoom to 100%.
115
+ "+": Zoom in.
116
+ "-": Zoom out.
117
+ Escape: Reset pan and zoom.
118
+
119
+ examples:
120
+ - html: |
121
+ <aui-canvas bordered background="grid" style="height: 12rem;">
122
+ <aui-container kind="card" bordered max-width="xs">
123
+ <aui-inset>
124
+ <aui-heading size="md">Preview</aui-heading>
125
+ <aui-text muted size="sm">Component rendered on a grid canvas.</aui-text>
126
+ </aui-inset>
127
+ </aui-container>
128
+ </aui-canvas>
129
+ description: Simple preview with grid background.
130
+
131
+ - html: |
132
+ <aui-canvas bordered background="dots" infinite style="height: 20rem;">
133
+ <div style="position: absolute; top: 5rem; left: 5rem;">
134
+ <aui-container kind="widget" bordered accent>
135
+ <aui-inset><aui-text size="sm">Node A</aui-text></aui-inset>
136
+ </aui-container>
137
+ </div>
138
+ <div style="position: absolute; top: 5rem; left: 20rem;">
139
+ <aui-container kind="widget" bordered>
140
+ <aui-inset><aui-text size="sm">Node B</aui-text></aui-inset>
141
+ </aui-container>
142
+ </div>
143
+ </aui-canvas>
144
+ description: Infinite canvas with pan and zoom.
145
+
146
+ - html: |
147
+ <aui-canvas bordered background="dots" style="height: 24rem;">
148
+ <div slot="leading" style="width: 14rem; background: var(--aui-panel); border-right: 1px solid var(--aui-border-muted); padding: 1rem;">
149
+ <aui-heading size="sm">Sidebar</aui-heading>
150
+ </div>
151
+ <div slot="float-top">
152
+ <aui-container kind="widget" bordered shadow="1">
153
+ <aui-inset><aui-text size="xs">Toolbar</aui-text></aui-inset>
154
+ </aui-container>
155
+ </div>
156
+ Main content area
157
+ <div slot="trailing" style="width: 14rem; background: var(--aui-panel); border-left: 1px solid var(--aui-border-muted); padding: 1rem;">
158
+ <aui-heading size="sm">Properties</aui-heading>
159
+ </div>
160
+ </aui-canvas>
161
+ description: Full editor layout with panels and floating toolbar.