@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,90 +2,124 @@ name: aui-chip
2
2
  tag: aui-chip
3
3
  type: component
4
4
  summary: Compact pill-shaped label for tags, filters, and selected items.
5
- description: >
6
- Inline pill element for tags, filter tokens, and selected items.
7
- Supports intent colors via boolean attributes and a removable
8
- variant that stamps a close button and dispatches a remove event.
9
-
5
+ description: |
6
+ Inline pill element for tags, filter tokens, and selected items. Supports intent colors via boolean attributes and a removable variant that stamps a close button and dispatches a remove event.
10
7
  base: AgentElement
11
-
12
- # -- Component attributes ------------------------------------------
13
-
14
8
  attributes:
15
9
  removable:
16
10
  syntax: boolean
17
11
  type: boolean
18
12
  default: false
19
- description: >
20
- Stamps an X close button. Clicking it dispatches a "remove"
21
- CustomEvent (bubbles) and removes the element from the DOM.
22
-
23
- # -- Presentational attributes -------------------------------------
24
-
13
+ description: |
14
+ Stamps an X close button. Clicking it dispatches a "remove" CustomEvent (bubbles) and removes the element from the DOM.
25
15
  presentational:
26
16
  size:
27
17
  syntax: key-value
28
18
  attribute: size
29
19
  cascades: false
30
20
  default: default
31
- values: [sm]
21
+ values:
22
+ - sm
32
23
  description: Compact variant with smaller padding and font.
33
-
34
24
  intent:
35
25
  syntax: boolean
36
26
  exclusive: true
37
27
  cascades: false
38
28
  default: neutral
39
- values: [accent, success, warning, danger]
29
+ values:
30
+ - accent
31
+ - success
32
+ - warning
33
+ - danger
40
34
  description: Tinted background and text color.
41
-
42
- # -- Content model -------------------------------------------------
43
-
44
35
  content:
45
36
  model: inline
46
- accepts: [text, aui-icon]
37
+ accepts:
38
+ - text
39
+ - aui-icon
47
40
  required: true
48
- description: >
41
+ description: |
49
42
  Short label text. May include a leading aui-icon. Keep concise.
50
-
51
- # -- Slots ---------------------------------------------------------
52
-
53
43
  slots:
54
44
  default:
55
- accepts: [text, aui-icon]
45
+ accepts:
46
+ - text
47
+ - aui-icon
56
48
  required: true
57
49
  description: Chip label. Icons allowed before text.
58
-
59
- # -- Composition ---------------------------------------------------
60
-
61
50
  composition:
62
- parents: [aui-stack, aui-wrap, div, span]
63
- children: [aui-icon]
64
- context: >
65
- Inline element. Group chips in aui-stack direction="row" or
66
- aui-wrap. Used inside tag inputs, filter bars, member labels.
67
-
68
- # -- Examples ------------------------------------------------------
69
-
51
+ parents:
52
+ - aui-stack
53
+ - aui-wrap
54
+ - div
55
+ - span
56
+ children:
57
+ - aui-icon
58
+ context: |
59
+ Inline element. Group chips in aui-stack direction="row" or aui-wrap. Used inside tag inputs, filter bars, member labels.
70
60
  examples:
71
- - html: <aui-chip>TypeScript</aui-chip>
72
- description: Default chip.
73
-
74
- - html: <aui-chip accent>Active</aui-chip>
75
- description: Accent intent chip.
76
-
77
- - html: <aui-chip success>Deployed</aui-chip>
78
- description: Success intent chip.
79
-
80
- - html: <aui-chip removable>React</aui-chip>
81
- description: Removable chip with close button.
82
-
83
- - html: <aui-chip size="sm">Small</aui-chip>
84
- description: Compact size variant.
85
-
86
- - html: |
61
+ - description: Default chip
62
+ html: <aui-chip>TypeScript</aui-chip>
63
+ - description: Another default chip
64
+ html: |-
65
+ <aui-chip>JavaScript</aui-chip>
66
+
67
+ <!-- ===============================================================
68
+ INTENT VARIANTS
69
+ =============================================================== -->
70
+ - description: Accent intent
71
+ html: <aui-chip accent>Active</aui-chip>
72
+ - description: Success intent
73
+ html: <aui-chip success>Deployed</aui-chip>
74
+ - description: Warning intent
75
+ html: <aui-chip warning>Draft</aui-chip>
76
+ - description: Danger intent
77
+ html: |-
78
+ <aui-chip danger>Blocked</aui-chip>
79
+
80
+ <!-- ===============================================================
81
+ SIZE VARIANTS
82
+ =============================================================== -->
83
+ - description: Small size chip
84
+ html: <aui-chip size="sm">Small</aui-chip>
85
+ - description: Default size chip
86
+ html: |-
87
+ <aui-chip>Default</aui-chip>
88
+
89
+ <!-- ===============================================================
90
+ REMOVABLE
91
+ =============================================================== -->
92
+ - description: Removable chip
93
+ html: <aui-chip removable>React</aui-chip>
94
+ - description: Removable chip with intent
95
+ html: |-
96
+ <aui-chip removable success>Vue</aui-chip>
97
+
98
+ <!-- ===============================================================
99
+ WITH ICON
100
+ =============================================================== -->
101
+ - description: Chip with leading icon
102
+ html: |-
87
103
  <aui-chip>
88
- <aui-icon name="tag" size="xs"></aui-icon>
104
+ <aui-icon name="star" size="xs"></aui-icon>
89
105
  Label
90
106
  </aui-chip>
91
- description: Chip with leading icon.
107
+
108
+ <!-- ===============================================================
109
+ GROUP -- row of chips
110
+ =============================================================== -->
111
+ - description: Row of tag chips
112
+ html: |-
113
+ <aui-stack direction="row" gap="2">
114
+ <aui-chip>TypeScript</aui-chip>
115
+ <aui-chip>React</aui-chip>
116
+ <aui-chip>Node.js</aui-chip>
117
+ <aui-chip>CSS</aui-chip>
118
+ </aui-stack>
119
+ - description: Row of removable filter chips
120
+ html: |-
121
+ <aui-stack direction="row" gap="2">
122
+ <aui-chip removable>Status: Active</aui-chip>
123
+ <aui-chip removable>Type: Bug</aui-chip>
124
+ <aui-chip removable>Priority: High</aui-chip>
125
+ </aui-stack>
@@ -2,63 +2,42 @@ name: aui-code-block
2
2
  tag: aui-code-block
3
3
  type: component
4
4
  summary: Fenced code block with optional language header, filename, and copy button.
5
- description: >
6
- Wraps an aui-code element with an optional header bar showing a language
7
- label, filename, and copy-to-clipboard button. Text content placed
8
- directly inside is automatically wrapped in an aui-code child. The header
9
- is stamped by JS when language, filename, or copyable attributes are
10
- present. The copy button writes the code text to the clipboard via the
11
- Clipboard API.
12
-
5
+ description: |
6
+ Wraps an aui-code element with an optional header bar showing a language label, filename, and copy-to-clipboard button. Text content placed directly inside is automatically wrapped in an aui-code child. The header is stamped by JS when language, filename, or copyable attributes are present. The copy button writes the code text to the clipboard via the Clipboard API.
13
7
  base: AgentElement
14
-
15
- # ── Component attributes ──────────────────────────────────
16
-
17
8
  attributes:
18
9
  language:
19
10
  syntax: key-value
20
11
  type: string
21
12
  default: ""
22
- description: >
23
- Programming language label shown in the header bar.
24
- Also useful for syntax-highlighting integrations.
25
-
13
+ description: |
14
+ Programming language label shown in the header bar. Also useful for syntax-highlighting integrations.
26
15
  filename:
27
16
  syntax: key-value
28
17
  type: string
29
18
  default: ""
30
- description: >
31
- Filename shown in the header bar. Takes precedence over
32
- language for the displayed label.
33
-
19
+ description: |
20
+ Filename shown in the header bar. Takes precedence over language for the displayed label.
34
21
  copyable:
35
22
  syntax: boolean
36
23
  type: boolean
37
24
  default: false
38
- description: >
39
- When present, shows a "Copy" button in the header bar.
40
- Clicking copies the code content to the clipboard.
41
-
25
+ description: |
26
+ When present, shows a "Copy" button in the header bar. Clicking copies the code content to the clipboard.
42
27
  max-height:
43
28
  syntax: key-value
44
29
  type: string
45
30
  default: ""
46
- description: >
47
- CSS max-height applied to the code body. When set, the code
48
- area becomes scrollable if content overflows.
49
-
50
- # ── Content model ─────────────────────────────────────────
51
-
31
+ description: |
32
+ CSS max-height applied to the code body. When set, the code area becomes scrollable if content overflows.
52
33
  content:
53
34
  model: text
54
- accepts: [text, aui-code]
35
+ accepts:
36
+ - text
37
+ - aui-code
55
38
  required: true
56
- description: >
57
- Code text content. Plain text is automatically wrapped in an
58
- aui-code element by JS. An explicit aui-code child is also accepted.
59
-
60
- # ── CSS tokens consumed ──────────────────────────────────
61
-
39
+ description: |
40
+ Code text content. Plain text is automatically wrapped in an aui-code element by JS. An explicit aui-code child is also accepted.
62
41
  tokens:
63
42
  - name: --aui-code-block-background
64
43
  default: var(--aui-control)
@@ -84,43 +63,65 @@ tokens:
84
63
  - name: --aui-code-block-copy-color-hover
85
64
  default: var(--aui-ink)
86
65
  description: Copy button text color on hover.
87
-
88
- # ── Accessibility ─────────────────────────────────────────
89
-
90
66
  a11y:
91
67
  role: figure
92
68
  aria:
93
69
  aria-label: Set from language or filename when present.
94
-
95
- # ── Use cases ─────────────────────────────────────────────
96
-
97
70
  use-cases:
98
71
  - Code snippets in documentation pages.
99
72
  - Chat message code blocks in agent conversations.
100
73
  - Copyable terminal commands.
101
74
  - File previews with filename headers.
102
-
103
- # ── Examples ──────────────────────────────────────────────
104
-
105
75
  examples:
106
- - html: |
76
+ - description: Code block with language header
77
+ html: |-
107
78
  <aui-code-block language="typescript">
108
79
  export function normalize(tokens: string[]) {
109
80
  return tokens.map(t => t.trim())
110
81
  }
111
82
  </aui-code-block>
112
- description: Code block with language header.
113
-
114
- - html: |
83
+ - description: JavaScript with language label
84
+ html: |-
85
+ <aui-code-block language="javascript">
86
+ const greet = (name) => `Hello, ${name}!`
87
+ console.log(greet('world'))
88
+ </aui-code-block>
89
+ - description: Code block with filename and copy button
90
+ html: |-
115
91
  <aui-code-block language="python" filename="main.py" copyable>
116
92
  import pandas as pd
117
93
  df = pd.read_csv("data.csv")
118
94
  print(df.head())
119
95
  </aui-code-block>
120
- description: Code block with filename and copy button.
121
-
122
- - html: |
96
+ - description: CSS file with copy
97
+ html: |-
98
+ <aui-code-block language="css" filename="tokens.css" copyable>
99
+ :root {
100
+ --color-primary: oklch(0.65 0.24 265);
101
+ --color-surface: oklch(0.98 0 0);
102
+ }
103
+ </aui-code-block>
104
+ - description: Plain code block without header
105
+ html: |-
123
106
  <aui-code-block>
124
107
  npm install @agent-ui-kit/web-components
125
108
  </aui-code-block>
126
- description: Plain code block without header.
109
+ - description: Scrollable code block with max-height
110
+ html: |-
111
+ <aui-code-block language="json" filename="package.json" copyable max-height="8rem">
112
+ {
113
+ "name": "@agent-ui-kit/web-components",
114
+ "version": "0.1.0",
115
+ "type": "module",
116
+ "main": "dist/index.js",
117
+ "exports": {
118
+ ".": "./dist/index.js",
119
+ "./styles": "./dist/styles.css"
120
+ },
121
+ "dependencies": {},
122
+ "devDependencies": {
123
+ "typescript": "^5.4.0",
124
+ "vite": "^5.2.0"
125
+ }
126
+ }
127
+ </aui-code-block>
@@ -0,0 +1,37 @@
1
+ name: aui-code
2
+ tag: aui-code
3
+ type: element
4
+ summary: Preformatted code block with monospace font on a recessed surface.
5
+ description: |
6
+ A CSS-only element for displaying code snippets, terminal output, or configuration text. Renders with monospace font, pre-wrapped whitespace, and a recessed background. Scrolls vertically when content exceeds max-height. Drops border-radius when nested inside aui-container. No JavaScript required.
7
+ tokens:
8
+ typography:
9
+ - --aui-font-family-mono
10
+ - --aui-font-xs
11
+ color:
12
+ - --aui-ink-muted
13
+ - --aui-control
14
+ sizing:
15
+ - --aui-radius
16
+ - --aui-space
17
+ examples:
18
+ - description: JSON config output
19
+ html: |-
20
+ <aui-code>{
21
+ "source": ["src/tokens/**/*.json"],
22
+ "platforms": {
23
+ "css": {
24
+ "transformGroup": "css",
25
+ "buildPath": "dist/css/"
26
+ }
27
+ }
28
+ }</aui-code>
29
+ - description: Terminal log output
30
+ html: |-
31
+ <aui-code>Step 1/5 : FROM node:20-alpine
32
+ Step 2/5 : COPY package*.json ./
33
+ Step 3/5 : RUN npm ci --production
34
+ Step 4/5 : COPY . .
35
+ Step 5/5 : CMD ["node", "server.js"]</aui-code>
36
+ - description: Single-line command
37
+ html: <aui-code>npm install @agent-ui/kit</aui-code>
@@ -0,0 +1,119 @@
1
+ name: aui-color-area
2
+ tag: aui-color-area
3
+ type: component
4
+ summary: 2D OKLCH gradient surface for picking chroma and lightness at a given hue.
5
+ description: |
6
+ A rectangular color picking surface using OKLCH as the native color model. X axis controls chroma (0 to 0.4), Y axis controls lightness (1 at top to 0 at bottom). A <canvas> element renders the 2D gradient programmatically since CSS cannot produce OKLCH 2D gradients. Out-of-gamut regions are gamut-mapped via binary search to the nearest in-gamut chroma, ensuring smooth visual continuity. A draggable thumb indicator tracks the current position. Supports pointer drag and keyboard arrow navigation with Shift for 10x step. Dispatches input (continuous) and change (on release) events with { l, c, h } detail.
7
+ base: AgentElement
8
+ attributes:
9
+ hue:
10
+ syntax: key-value
11
+ type: string
12
+ default: "0"
13
+ description: Hue angle (0-360) for the gradient.
14
+ chroma:
15
+ syntax: key-value
16
+ type: string
17
+ default: "0.15"
18
+ description: Current chroma value (0-0.4, X axis).
19
+ lightness:
20
+ syntax: key-value
21
+ type: string
22
+ default: "0.65"
23
+ description: Current lightness value (0-1, Y axis).
24
+ disabled:
25
+ syntax: boolean
26
+ type: boolean
27
+ default: false
28
+ description: Prevents interaction. Dims visually.
29
+ rendering:
30
+ description: |
31
+ Canvas renders at half device-pixel resolution for performance. Each pixel computes an OKLCH color at the given hue; out-of-sRGB-gamut pixels are gamut-mapped by binary-searching chroma downward (8 iterations) to the nearest in-gamut value. A ResizeObserver triggers redraw on size change.
32
+ a11y:
33
+ role: slider (on thumb element)
34
+ keyboard:
35
+ ArrowRight: "Increase chroma by 0.004 (Shift: 0.04)."
36
+ ArrowLeft: "Decrease chroma by 0.004 (Shift: 0.04)."
37
+ ArrowUp: "Increase lightness by 0.01 (Shift: 0.1)."
38
+ ArrowDown: "Decrease lightness by 0.01 (Shift: 0.1)."
39
+ aria:
40
+ aria-valuetext: '"oklch(L C H)" on thumb.'
41
+ tokens:
42
+ - name: --aui-color-area-border-radius
43
+ default: var(--aui-color-picker-border-radius, var(--aui-radius))
44
+ description: Corner radius of the gradient surface.
45
+ - name: --aui-color-area-thumb-size
46
+ default: 16px
47
+ description: Width and height of the circular thumb.
48
+ - name: --aui-color-area-thumb-border
49
+ default: 2px solid white
50
+ description: Thumb border for contrast against the gradient.
51
+ - name: --aui-color-area-thumb-shadow
52
+ default: 0 0 0 1px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2)
53
+ description: Thumb drop shadow.
54
+ internal-structure:
55
+ - element: canvas
56
+ attr: data-color-area-canvas
57
+ description: Programmatic 2D OKLCH gradient surface.
58
+ - element: div
59
+ attr: data-color-area-thumb
60
+ description: Draggable thumb positioned via --_x and --_y custom properties.
61
+ composition:
62
+ parents:
63
+ - aui-color-picker
64
+ - aui-stack
65
+ - aui-container
66
+ - div
67
+ children: []
68
+ context: |
69
+ Typically used inside aui-color-picker alongside aui-color-slider rows and aui-copy-button output.
70
+ examples:
71
+ - description: Default color area (hue 0)
72
+ html: |-
73
+ <aui-color-area hue="0" chroma="0.15" lightness="0.65"></aui-color-area>
74
+
75
+ <!-- ===============================================================
76
+ DIFFERENT HUES
77
+ =============================================================== -->
78
+ - description: Blue hue color area
79
+ html: <aui-color-area hue="250" chroma="0.2" lightness="0.6"></aui-color-area>
80
+ - description: Green hue color area
81
+ html: <aui-color-area hue="145" chroma="0.18" lightness="0.7"></aui-color-area>
82
+ - description: Purple hue color area
83
+ html: |-
84
+ <aui-color-area hue="300" chroma="0.15" lightness="0.5"></aui-color-area>
85
+
86
+ <!-- ===============================================================
87
+ SIZES
88
+ =============================================================== -->
89
+ - description: Compact color area (150x150)
90
+ html: '<aui-color-area hue="30" style="width: 150px; height: 150px;"></aui-color-area>'
91
+ - description: Large color area (300x200)
92
+ html: |-
93
+ <aui-color-area hue="200" style="width: 300px; height: 200px;"></aui-color-area>
94
+
95
+ <!-- ===============================================================
96
+ DISABLED
97
+ =============================================================== -->
98
+ - description: Disabled color area
99
+ html: |-
100
+ <aui-color-area hue="250" chroma="0.2" lightness="0.6" disabled></aui-color-area>
101
+
102
+ <!-- ===============================================================
103
+ INTERACTIVE -- with live output
104
+ =============================================================== -->
105
+ - description: Interactive color area with change events
106
+ html: |-
107
+ <aui-stack gap="3">
108
+ <aui-color-area id="demo-area" hue="200" chroma="0.18" lightness="0.65"></aui-color-area>
109
+ <aui-text size="sm" muted id="demo-area-output">Drag the thumb to see values</aui-text>
110
+ </aui-stack>
111
+
112
+ <script type="module">
113
+ const area = document.getElementById('demo-area')
114
+ const output = document.getElementById('demo-area-output')
115
+ area?.addEventListener('input', (e) => {
116
+ const { l, c, h } = e.detail
117
+ output.textContent = `oklch(${l} ${c} ${h})`
118
+ })
119
+ </script>
@@ -0,0 +1,121 @@
1
+ name: aui-color-field
2
+ tag: aui-color-field
3
+ type: component
4
+ summary: Text input for color values with inline swatch preview.
5
+ description: |
6
+ A compact color entry field that combines a color swatch preview with a text editing surface. Supports hex, rgb, oklch, and hsl formats. The swatch updates live as valid colors are typed. Invalid values show an error state. Uses contenteditable span (no native input element) with CSS.supports() for broad format validation.
7
+ base: AgentElement
8
+ attributes:
9
+ value:
10
+ syntax: key-value
11
+ type: string
12
+ default: ""
13
+ description: Color value string in the specified format.
14
+ format:
15
+ syntax: key-value
16
+ type: string
17
+ default: hex
18
+ description: Expected color format (hex, rgb, oklch).
19
+ disabled:
20
+ syntax: boolean
21
+ type: boolean
22
+ default: false
23
+ description: Prevents interaction. Dims visually.
24
+ a11y:
25
+ role: textbox (on input surface)
26
+ keyboard:
27
+ Enter: Commits value and blurs.
28
+ aria:
29
+ aria-label: '"Color value" on input surface.'
30
+ tokens:
31
+ - name: --aui-color-field-background
32
+ default: var(--aui-control, var(--aui-fill))
33
+ description: Field background color.
34
+ - name: --aui-color-field-border
35
+ default: var(--aui-stroke)
36
+ description: Field border color.
37
+ - name: --aui-color-field-border-radius
38
+ default: var(--aui-radius)
39
+ description: Field corner radius.
40
+ - name: --aui-color-field-border-hover
41
+ default: var(--aui-stroke-hover)
42
+ description: Border color on hover.
43
+ - name: --aui-color-field-border-focus
44
+ default: var(--aui-focus)
45
+ description: Border color when focused.
46
+ - name: --aui-color-field-font-size
47
+ default: var(--aui-font-sm)
48
+ description: Text font size.
49
+ - name: --aui-color-field-font-family
50
+ default: var(--aui-font-mono, monospace)
51
+ description: Text font family.
52
+ - name: --aui-color-field-color
53
+ default: var(--aui-ink)
54
+ description: Text color.
55
+ - name: --aui-color-field-swatch-size
56
+ default: 20px
57
+ description: Swatch width and height.
58
+ - name: --aui-color-field-swatch-radius
59
+ default: 4px
60
+ description: Swatch corner radius.
61
+ composition:
62
+ parents:
63
+ - aui-field
64
+ - aui-stack
65
+ - aui-container
66
+ - div
67
+ children: []
68
+ context: |
69
+ Typically used inside aui-field for labeled color entry. Pairs with aui-color-area and aui-color-slider in color pickers.
70
+ examples:
71
+ - description: Hex color value
72
+ html: <aui-color-field value="#3b82f6"></aui-color-field>
73
+ - description: Another hex color
74
+ html: |-
75
+ <aui-color-field value="#10b981"></aui-color-field>
76
+
77
+ <!-- ===============================================================
78
+ FORMATS
79
+ =============================================================== -->
80
+ - description: RGB format
81
+ html: <aui-color-field value="rgb(59, 130, 246)" format="rgb"></aui-color-field>
82
+ - description: OKLCH format
83
+ html: <aui-color-field value="oklch(0.65 0.2 250)" format="oklch"></aui-color-field>
84
+ - description: HSL format
85
+ html: |-
86
+ <aui-color-field value="hsl(220, 90%, 60%)"></aui-color-field>
87
+
88
+ <!-- ===============================================================
89
+ EMPTY STATE
90
+ =============================================================== -->
91
+ - description: Empty color field (shows placeholder)
92
+ html: |-
93
+ <aui-color-field></aui-color-field>
94
+
95
+ <!-- ===============================================================
96
+ DISABLED
97
+ =============================================================== -->
98
+ - description: Disabled color field
99
+ html: |-
100
+ <aui-color-field value="#ef4444" disabled></aui-color-field>
101
+
102
+ <!-- ===============================================================
103
+ GROUP -- multiple color fields
104
+ =============================================================== -->
105
+ - description: Row of color fields for a palette
106
+ html: |-
107
+ <aui-stack direction="row" gap="3">
108
+ <aui-color-field value="#ef4444"></aui-color-field>
109
+ <aui-color-field value="#f59e0b"></aui-color-field>
110
+ <aui-color-field value="#10b981"></aui-color-field>
111
+ <aui-color-field value="#3b82f6"></aui-color-field>
112
+ </aui-stack>
113
+
114
+ <!-- ===============================================================
115
+ IN FORM FIELD
116
+ =============================================================== -->
117
+ - description: Color field inside aui-field with label
118
+ html: |-
119
+ <aui-field label="Brand Color">
120
+ <aui-color-field value="#6366f1"></aui-color-field>
121
+ </aui-field>