@adia-ai/web-components 0.5.8 → 0.5.10

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 (127) hide show
  1. package/USAGE.md +253 -0
  2. package/components/accordion/accordion.d.ts +22 -1
  3. package/components/action-list/action-list.d.ts +14 -1
  4. package/components/agent-artifact/agent-artifact.d.ts +1 -1
  5. package/components/agent-feedback-bar/agent-feedback-bar.d.ts +1 -1
  6. package/components/agent-questions/agent-questions.d.ts +1 -1
  7. package/components/agent-reasoning/agent-reasoning.d.ts +1 -1
  8. package/components/agent-suggestions/agent-suggestions.d.ts +1 -1
  9. package/components/agent-trace/agent-trace.d.ts +1 -1
  10. package/components/alert/alert.d.ts +1 -1
  11. package/components/avatar/avatar.d.ts +8 -1
  12. package/components/badge/badge.d.ts +1 -1
  13. package/components/block/block.d.ts +1 -1
  14. package/components/breadcrumb/breadcrumb.d.ts +1 -1
  15. package/components/button/button.d.ts +1 -1
  16. package/components/canvas/canvas.d.ts +1 -1
  17. package/components/card/card.d.ts +1 -1
  18. package/components/chart/chart.d.ts +1 -1
  19. package/components/chart-legend/chart-legend.d.ts +1 -1
  20. package/components/chat-thread/chat-thread.d.ts +40 -1
  21. package/components/code/code.css +1 -1
  22. package/components/col/col.a2ui.json +4 -4
  23. package/components/col/col.d.ts +2 -2
  24. package/components/col/col.yaml +2 -2
  25. package/components/command/command.d.ts +1 -1
  26. package/components/demo-toggle/demo-toggle.d.ts +1 -1
  27. package/components/description-list/description-list.d.ts +1 -1
  28. package/components/divider/divider.d.ts +1 -1
  29. package/components/drawer/drawer.d.ts +1 -1
  30. package/components/embed/embed.d.ts +1 -1
  31. package/components/empty-state/class.js +10 -4
  32. package/components/empty-state/empty-state.a2ui.json +5 -0
  33. package/components/empty-state/empty-state.css +36 -0
  34. package/components/empty-state/empty-state.d.ts +6 -1
  35. package/components/empty-state/empty-state.test.js +77 -0
  36. package/components/empty-state/empty-state.yaml +9 -0
  37. package/components/feed/feed.css +1 -1
  38. package/components/feed/feed.d.ts +106 -13
  39. package/components/field/field.d.ts +1 -1
  40. package/components/fields/fields.d.ts +1 -1
  41. package/components/grid/grid.d.ts +1 -1
  42. package/components/heatmap/heatmap.d.ts +1 -1
  43. package/components/icon/icon.d.ts +1 -1
  44. package/components/image/image.d.ts +1 -1
  45. package/components/input/class.js +2 -1
  46. package/components/input/input.a2ui.json +5 -0
  47. package/components/input/input.d.ts +14 -0
  48. package/components/input/input.test.js +99 -0
  49. package/components/input/input.yaml +14 -0
  50. package/components/inspector/inspector.d.ts +1 -1
  51. package/components/kbd/kbd.d.ts +1 -1
  52. package/components/link/link.d.ts +1 -1
  53. package/components/list/list.d.ts +10 -1
  54. package/components/menu/menu-divider.a2ui.json +41 -0
  55. package/components/menu/menu-divider.yaml +15 -0
  56. package/components/menu/menu-item.a2ui.json +77 -0
  57. package/components/menu/menu-item.yaml +45 -0
  58. package/components/menu/menu.d.ts +17 -1
  59. package/components/modal/modal.d.ts +1 -1
  60. package/components/nav/nav.css +1 -1
  61. package/components/nav/nav.d.ts +1 -1
  62. package/components/nav-group/nav-group.d.ts +1 -1
  63. package/components/nav-item/nav-item.d.ts +1 -1
  64. package/components/noodles/noodles.d.ts +1 -1
  65. package/components/page/page.d.ts +1 -1
  66. package/components/pagination/pagination.d.ts +1 -1
  67. package/components/pane/pane.d.ts +1 -1
  68. package/components/pipeline-status/pipeline-status.d.ts +1 -1
  69. package/components/popover/popover.d.ts +1 -1
  70. package/components/progress/progress.d.ts +1 -1
  71. package/components/progress-row/progress-row.d.ts +1 -1
  72. package/components/range/range.css +1 -1
  73. package/components/rating/rating.d.ts +8 -0
  74. package/components/richtext/richtext.a2ui.json +4 -4
  75. package/components/richtext/richtext.d.ts +2 -2
  76. package/components/richtext/richtext.yaml +2 -2
  77. package/components/row/row.d.ts +1 -1
  78. package/components/segment/segment.d.ts +1 -1
  79. package/components/select/class.js +28 -0
  80. package/components/select/select.css +1 -1
  81. package/components/select/select.d.ts +14 -0
  82. package/components/select/select.yaml +28 -0
  83. package/components/skeleton/skeleton.d.ts +1 -1
  84. package/components/slider/class.js +20 -50
  85. package/components/slider/slider.css +1 -1
  86. package/components/stack/stack.d.ts +1 -1
  87. package/components/step-progress/step-progress.d.ts +1 -1
  88. package/components/stepper/stepper-item.a2ui.json +74 -0
  89. package/components/stepper/stepper-item.yaml +45 -0
  90. package/components/stepper/stepper.d.ts +13 -1
  91. package/components/stream/stream.d.ts +1 -1
  92. package/components/swatch/swatch.css +1 -1
  93. package/components/swatch/swatch.d.ts +1 -1
  94. package/components/swiper/swiper.d.ts +1 -1
  95. package/components/switch/switch.css +1 -1
  96. package/components/table/table.d.ts +1 -1
  97. package/components/table-toolbar/table-toolbar.d.ts +1 -1
  98. package/components/tabs/tabs.d.ts +12 -1
  99. package/components/tag/tag.d.ts +1 -1
  100. package/components/text/text.d.ts +64 -13
  101. package/components/text/text.test.js +8 -2
  102. package/components/textarea/class.js +7 -1
  103. package/components/textarea/textarea.a2ui.json +5 -0
  104. package/components/textarea/textarea.yaml +14 -0
  105. package/components/timeline/timeline.d.ts +20 -1
  106. package/components/toast/class.js +9 -0
  107. package/components/toast/toast.d.ts +9 -5
  108. package/components/toast/toast.yaml +16 -0
  109. package/components/toggle-group/toggle-group.d.ts +12 -1
  110. package/components/toggle-group/toggle-option.a2ui.json +61 -0
  111. package/components/toggle-group/toggle-option.yaml +33 -0
  112. package/components/toggle-scheme/toggle-scheme.d.ts +1 -1
  113. package/components/toolbar/toolbar-group.a2ui.json +41 -0
  114. package/components/toolbar/toolbar-group.yaml +16 -0
  115. package/components/toolbar/toolbar.d.ts +4 -1
  116. package/components/tooltip/tooltip.css +2 -2
  117. package/components/tooltip/tooltip.d.ts +1 -1
  118. package/components/tree/tree.css +1 -1
  119. package/components/tree/tree.d.ts +18 -1
  120. package/core/form.d.ts +35 -0
  121. package/core/form.js +93 -0
  122. package/core/signals.d.ts +28 -0
  123. package/index.d.ts +2 -2
  124. package/package.json +1 -1
  125. package/styles/colors/semantics.css +6 -0
  126. package/styles/tokens.css +3 -0
  127. package/styles/typography.css +2 -0
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/list
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -38,3 +38,12 @@ export class UIList extends UIElement {
38
38
  ): void;
39
39
  addEventListener(type: 'selection-change', listener: (ev: ListSelectionChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
40
40
  }
41
+
42
+ export class UIListItem extends UIElement {
43
+ /** Secondary line below the primary text. Subtle color. */
44
+ description: string;
45
+ /** Optional leading icon name (Phosphor). */
46
+ icon: string;
47
+ /** Primary text. Renders as semibold inline body. */
48
+ text: string;
49
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/MenuDivider.json",
4
+ "title": "MenuDivider",
5
+ "description": "Visual separator between groups of `<menu-item-ui>` rows. Renders as a horizontal rule with role=\"separator\".",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "common_types.json#/$defs/ComponentCommon"
10
+ },
11
+ {
12
+ "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
+ }
14
+ ],
15
+ "properties": {
16
+ "component": {
17
+ "const": "MenuDivider"
18
+ }
19
+ },
20
+ "required": [
21
+ "component"
22
+ ],
23
+ "unevaluatedProperties": false,
24
+ "x-adiaui": {
25
+ "anti_patterns": [],
26
+ "category": "navigation",
27
+ "composes": [],
28
+ "events": {},
29
+ "examples": [],
30
+ "keywords": [],
31
+ "name": "UIMenuDivider",
32
+ "related": [],
33
+ "slots": {},
34
+ "states": [],
35
+ "synonyms": {},
36
+ "tag": "menu-divider-ui",
37
+ "tokens": {},
38
+ "traits": [],
39
+ "version": 1
40
+ }
41
+ }
@@ -0,0 +1,15 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ #
3
+ # §228 (v0.5.9): authored to close the §229 baseline class-export-undeclared
4
+ # drift for UIMenuDivider. Ships as a sibling class in menu/class.js +
5
+ # is registered alongside UIMenu + UIMenuItem.
6
+
7
+ # Child component of <menu-ui>. Surface only inside that parent.
8
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
9
+ name: UIMenuDivider
10
+ tag: menu-divider-ui
11
+ component: MenuDivider
12
+ category: navigation
13
+ version: 1
14
+ description: |-
15
+ Visual separator between groups of `<menu-item-ui>` rows. Renders as a horizontal rule with role="separator".
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/MenuItem.json",
4
+ "title": "MenuItem",
5
+ "description": "Child of `<menu-ui>`. One actionable row inside a menu, with optional leading icon + label + value.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "common_types.json#/$defs/ComponentCommon"
10
+ },
11
+ {
12
+ "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
+ }
14
+ ],
15
+ "properties": {
16
+ "component": {
17
+ "const": "MenuItem"
18
+ },
19
+ "disabled": {
20
+ "description": "Disabled state — blocks pointer + keyboard activation.",
21
+ "type": "boolean",
22
+ "default": false
23
+ },
24
+ "icon": {
25
+ "description": "Optional leading Phosphor icon name.",
26
+ "type": "string",
27
+ "default": ""
28
+ },
29
+ "text": {
30
+ "description": "Item label text.",
31
+ "type": "string",
32
+ "default": ""
33
+ },
34
+ "value": {
35
+ "description": "Stable identifier emitted via the parent menu's `select` event.",
36
+ "type": "string",
37
+ "default": ""
38
+ },
39
+ "variant": {
40
+ "description": "Semantic variant.",
41
+ "type": "string",
42
+ "enum": [
43
+ "default",
44
+ "danger"
45
+ ],
46
+ "default": "default"
47
+ }
48
+ },
49
+ "required": [
50
+ "component"
51
+ ],
52
+ "unevaluatedProperties": false,
53
+ "x-adiaui": {
54
+ "anti_patterns": [],
55
+ "category": "navigation",
56
+ "composes": [],
57
+ "events": {},
58
+ "examples": [],
59
+ "keywords": [],
60
+ "name": "UIMenuItem",
61
+ "related": [],
62
+ "slots": {
63
+ "icon": {
64
+ "description": "Custom leading element override; falls through to `[icon]` prop if not slotted."
65
+ },
66
+ "text": {
67
+ "description": "Custom label content; falls through to `[text]` prop if not slotted."
68
+ }
69
+ },
70
+ "states": [],
71
+ "synonyms": {},
72
+ "tag": "menu-item-ui",
73
+ "tokens": {},
74
+ "traits": [],
75
+ "version": 1
76
+ }
77
+ }
@@ -0,0 +1,45 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ #
3
+ # §228 (v0.5.9): authored to close the §229 baseline class-export-undeclared
4
+ # drift for UIMenuItem. The item ships as a sibling class in menu/class.js
5
+ # + is registered alongside UIMenu + UIMenuDivider.
6
+
7
+ # Child component of <menu-ui>. Surface only inside that parent.
8
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
9
+ name: UIMenuItem
10
+ tag: menu-item-ui
11
+ component: MenuItem
12
+ category: navigation
13
+ version: 1
14
+ description: |-
15
+ Child of `<menu-ui>`. One actionable row inside a menu, with optional leading icon + label + value.
16
+
17
+ props:
18
+ icon:
19
+ description: Optional leading Phosphor icon name.
20
+ type: string
21
+ default: ""
22
+ text:
23
+ description: Item label text.
24
+ type: string
25
+ default: ""
26
+ value:
27
+ description: Stable identifier emitted via the parent menu's `select` event.
28
+ type: string
29
+ default: ""
30
+ variant:
31
+ description: Semantic variant.
32
+ type: string
33
+ default: default
34
+ enum:
35
+ - default
36
+ - danger
37
+ disabled:
38
+ description: Disabled state — blocks pointer + keyboard activation.
39
+ type: boolean
40
+ default: false
41
+ slots:
42
+ icon:
43
+ description: Custom leading element override; falls through to `[icon]` prop if not slotted.
44
+ text:
45
+ description: Custom label content; falls through to `[text]` prop if not slotted.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/menu
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -36,3 +36,19 @@ export class UIMenu extends UIElement {
36
36
  ): void;
37
37
  addEventListener(type: 'action', listener: (ev: MenuActionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
38
38
  }
39
+
40
+ export class UIMenuDivider extends UIElement {
41
+ }
42
+
43
+ export class UIMenuItem extends UIElement {
44
+ /** Disabled state — blocks pointer + keyboard activation. */
45
+ disabled: boolean;
46
+ /** Optional leading Phosphor icon name. */
47
+ icon: string;
48
+ /** Item label text. */
49
+ text: string;
50
+ /** Stable identifier emitted via the parent menu's `select` event. */
51
+ value: string;
52
+ /** Semantic variant. */
53
+ variant: 'default' | 'danger';
54
+ }
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/modal
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -17,7 +17,7 @@
17
17
  /* Primary-variant collapse */
18
18
  --nav-width: auto;
19
19
  --nav-width-collapsed: 48px;
20
- --nav-duration: var(--a-duration-base, 200ms);
20
+ --nav-duration: var(--a-duration); /* §230-bundle (v0.5.9): canonical mid-tier duration (250ms). Was orphaned --a-duration-base. */
21
21
  --nav-easing: var(--a-easing, ease);
22
22
 
23
23
  /* Group-heading kicker */
@@ -12,7 +12,7 @@ and a [heading] kicker rendered via CSS.
12
12
  * @see https://ui-kit.exe.xyz/site/components/nav
13
13
  *
14
14
  * Type declarations generated by scripts/build/dts-codegen.mjs from
15
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
15
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
16
16
  * run `npm run build:components`, then `npm run codegen:dts` to
17
17
  * regenerate; or hand-author this file fully if rich event types are
18
18
  * needed beyond what the yaml `events:` block can express.
@@ -12,7 +12,7 @@ when [collapsible] (default true).
12
12
  * @see https://ui-kit.exe.xyz/site/components/nav-group
13
13
  *
14
14
  * Type declarations generated by scripts/build/dts-codegen.mjs from
15
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
15
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
16
16
  * run `npm run build:components`, then `npm run codegen:dts` to
17
17
  * regenerate; or hand-author this file fully if rich event types are
18
18
  * needed beyond what the yaml `events:` block can express.
@@ -12,7 +12,7 @@ bubbles a `nav-select` event.
12
12
  * @see https://ui-kit.exe.xyz/site/components/nav-item
13
13
  *
14
14
  * Type declarations generated by scripts/build/dts-codegen.mjs from
15
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
15
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
16
16
  * run `npm run build:components`, then `npm run codegen:dts` to
17
17
  * regenerate; or hand-author this file fully if rich event types are
18
18
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/noodles
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -10,7 +10,7 @@ primitives (`<header-ui>`, `<section-ui>`, `<footer-ui>`); the page's
10
10
  * @see https://ui-kit.exe.xyz/site/components/page
11
11
  *
12
12
  * Type declarations generated by scripts/build/dts-codegen.mjs from
13
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
13
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
14
14
  * run `npm run build:components`, then `npm run codegen:dts` to
15
15
  * regenerate; or hand-author this file fully if rich event types are
16
16
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/pagination
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/pane
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/pipeline-status
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/popover
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/progress
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/progress-row
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -13,7 +13,7 @@ range-ui:not([disabled]) [slot="field"]:hover [data-layer="fill"] {
13
13
  --range-fill-bg-hover: var(--a-ui-bg-hover);
14
14
  --range-fill-bg-active: var(--a-ui-bg-active);
15
15
  --range-fill-bg-disabled: var(--a-canvas-muted);
16
- --range-fill-fg: var(--a-ui-fg);
16
+ --range-fill-fg: var(--a-fg);
17
17
  --range-fill-fg-disabled: var(--a-ui-text-disabled);
18
18
  --range-fill-label-fg: var(--a-ui-text-subtle);
19
19
  --range-border: var(--a-ui-border);
@@ -23,6 +23,14 @@ export class UIRating extends UIFormElement {
23
23
  /** Allow half-step values (0.5, 1.5, …). */
24
24
  allowHalf: boolean;
25
25
  size: 'sm' | 'md' | 'lg';
26
+ /**
27
+ * §247 (v0.5.10, FB-26 §1): visual treatment family. `star` (default) /
28
+ * `heart` / `thumbs` swap the rendered icon set + selected-state color.
29
+ * Yaml-declared `enum` was not previously typed in `.d.ts`; consumers
30
+ * authoring `el.variant = 'heart'` got TS2339 despite the runtime
31
+ * accepting the value.
32
+ */
33
+ variant: 'star' | 'heart' | 'thumbs';
26
34
 
27
35
  addEventListener<K extends keyof HTMLElementEventMap>(
28
36
  type: K,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://adiaui.dev/a2ui/v0_9/components/Richtext.json",
4
- "title": "Richtext",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/RichText.json",
4
+ "title": "RichText",
5
5
  "description": "Renders markdown to styled HTML.",
6
6
  "type": "object",
7
7
  "allOf": [
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "properties": {
16
16
  "component": {
17
- "const": "Richtext"
17
+ "const": "RichText"
18
18
  },
19
19
  "markdown": {
20
20
  "description": "Component property: markdown.",
@@ -61,7 +61,7 @@
61
61
  "keywords": [
62
62
  "richtext"
63
63
  ],
64
- "name": "UIRichtext",
64
+ "name": "UIRichText",
65
65
  "related": [],
66
66
  "slots": {
67
67
  "default": {
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/richtext
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { UIElement } from '../../core/element.js';
14
14
 
15
- export class UIRichtext extends UIElement {
15
+ export class UIRichText extends UIElement {
16
16
  /** Component property: markdown. */
17
17
  markdown: string;
18
18
  /** Source URL (image, iframe, etc.). */
@@ -1,7 +1,7 @@
1
1
  $schema: ../../../../scripts/schemas/component.yaml.schema.json
2
- name: UIRichtext
2
+ name: UIRichText
3
3
  tag: richtext-ui
4
- component: Richtext
4
+ component: RichText
5
5
  category: forms
6
6
  version: 1
7
7
  description: Renders markdown to styled HTML.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/row
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/segment
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -26,6 +26,14 @@ export class UISelect extends UIFormElement {
26
26
  // (slot 11). Per FEEDBACK-06 §4 + FEEDBACK-07 §4.
27
27
  static requiredIcons = ['caret-up-down'];
28
28
 
29
+ // §225 (v0.5.9, FEEDBACK-10 §3): once-per-element console.warn dedup when
30
+ // consumer authors children that aren't native <option>/<optgroup>. The
31
+ // common authoring mistake is reaching for <select-option> (mirroring the
32
+ // <*-ui> naming convention), which #parseOptions silently ignores. Matches
33
+ // v0.5.5 §184 §8 button-ui safety-net + v0.5.7 §201 color-picker WeakSet
34
+ // pattern. WeakSet so the warn doesn't pin the element from GC.
35
+ static #warnedNonOption = new WeakSet();
36
+
29
37
  static properties = {
30
38
  ...UIFormElement.properties,
31
39
  placeholder: { type: String, default: 'Select...', reflect: true },
@@ -201,6 +209,8 @@ export class UISelect extends UIFormElement {
201
209
  /** Parse <option> and <optgroup> children into internal model. */
202
210
  #parseOptions() {
203
211
  this.#options = [];
212
+ // §225 (v0.5.9): track unknown-child-tag names so we can warn once per element.
213
+ const unknownTags = new Set();
204
214
  for (const child of this.children) {
205
215
  if (child.tagName === 'OPTGROUP') {
206
216
  const group = { label: child.label || child.getAttribute('label') || '', options: [] };
@@ -210,9 +220,27 @@ export class UISelect extends UIFormElement {
210
220
  this.#options.push(group);
211
221
  } else if (child.tagName === 'OPTION') {
212
222
  this.#options.push({ value: child.value, label: child.textContent.trim(), disabled: child.disabled });
223
+ } else if (
224
+ // §225: skip [slot="display"] / [slot="listbox"] / [slot="action"] etc. — these are
225
+ // stamped by the component itself, not consumer-authored options. Anything other
226
+ // than a slot-bearing child OR <option>/<optgroup> is a likely authoring mistake.
227
+ !child.hasAttribute('slot')
228
+ ) {
229
+ unknownTags.add(child.tagName.toLowerCase());
213
230
  }
214
231
  }
215
232
  for (const child of [...this.querySelectorAll('option, optgroup')]) child.remove();
233
+ // §225 (v0.5.9): warn once per element when consumer authored non-<option> children.
234
+ if (unknownTags.size > 0 && !UISelect.#warnedNonOption.has(this)) {
235
+ UISelect.#warnedNonOption.add(this);
236
+ // eslint-disable-next-line no-console
237
+ console.warn(
238
+ `<select-ui>: ignoring unrecognized child element(s) [${[...unknownTags].join(', ')}]. ` +
239
+ `Consumer-authored children must be native <option> or <optgroup>, NOT <select-option> ` +
240
+ `or other <*-ui> shapes. Or set element.options = [...] programmatically. ` +
241
+ `(Once-per-element warn; see select.yaml usage: for details.)`,
242
+ );
243
+ }
216
244
  }
217
245
 
218
246
  set options(list) {
@@ -314,7 +314,7 @@ select-ui[divider] [role="group"] + [role="group"] {
314
314
  select-ui > [slot="hint"] {
315
315
  display: block;
316
316
  margin-top: var(--select-hint-mt, var(--a-space-1));
317
- font-size: var(--select-hint-size, var(--a-fine-size));
317
+ font-size: var(--select-hint-size, var(--a-ui-xs));
318
318
  color: var(--select-hint-fg, var(--a-fg-muted));
319
319
  line-height: var(--select-hint-lh, 1.4);
320
320
  }
@@ -42,6 +42,20 @@ export class UISelect extends UIFormElement {
42
42
  divider: boolean;
43
43
  /** §207 (v0.5.7): hint text below the field, wired to aria-describedby. */
44
44
  hint: string;
45
+ /**
46
+ * §247 (v0.5.10, FB-26 §1): visual variant. `default` = canonical chrome
47
+ * (border + bg); `outline` = bordered transparent; `ghost` = inline
48
+ * (no border); `soft` = subtle background tint. Mirrors `<input-ui>`
49
+ * variant family.
50
+ */
51
+ variant: 'default' | 'outline' | 'ghost' | 'soft';
52
+ /**
53
+ * §247 (v0.5.10, FB-26 §1): universal `[size]` attribute system —
54
+ * `xs` / `sm` / `md` (default) / `lg` / `xl`. Sets `--a-size` token
55
+ * locally; cascades to child icons / labels via the size-cascade pattern
56
+ * documented in USAGE.md §221a.
57
+ */
58
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
45
59
 
46
60
  /**
47
61
  * Dynamic option list. Setting `.options = [...]` stamps option elements at
@@ -117,6 +117,34 @@ props:
117
117
  events:
118
118
  change:
119
119
  description: Fired when selected value changes
120
+ usage: |-
121
+ §225 (v0.5.9) — Consumer-authored children must be native `<option>` or
122
+ `<optgroup>`. The `#parseOptions()` walker reads only those two tag names;
123
+ other shapes (including hypothetical `<select-option>` mirroring the `<*-ui>`
124
+ convention) are silently ignored. v0.5.9 adds a once-per-element
125
+ `console.warn` to surface the authoring mistake at runtime.
126
+
127
+ Two canonical paths:
128
+
129
+ ```html
130
+ <!-- Path 1: native option children -->
131
+ <select-ui name="role" label="Role">
132
+ <option value="user">User</option>
133
+ <option value="admin">Admin</option>
134
+ <optgroup label="Special">
135
+ <option value="ghost">Ghost</option>
136
+ </optgroup>
137
+ </select-ui>
138
+
139
+ <!-- Path 2: programmatic .options property -->
140
+ <select-ui id="role" name="role" label="Role"></select-ui>
141
+ <script>
142
+ document.getElementById('role').options = [
143
+ { value: 'user', label: 'User' },
144
+ { value: 'admin', label: 'Admin' },
145
+ ];
146
+ </script>
147
+ ```
120
148
  slots:
121
149
  label:
122
150
  description: Label element above the trigger
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/skeleton
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.