@adia-ai/web-components 0.6.37 → 0.6.38

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 (53) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/components/accordion/accordion-item.a2ui.json +3 -0
  3. package/components/accordion/accordion-item.yaml +5 -0
  4. package/components/action-list/action-item.a2ui.json +5 -1
  5. package/components/action-list/action-item.yaml +7 -0
  6. package/components/card/card.a2ui.json +17 -1
  7. package/components/card/card.yaml +24 -1
  8. package/components/empty-state/empty-state.a2ui.json +9 -0
  9. package/components/empty-state/empty-state.yaml +15 -0
  10. package/components/feed/feed-item.a2ui.json +5 -0
  11. package/components/feed/feed-item.yaml +10 -0
  12. package/components/field/field.a2ui.json +6 -0
  13. package/components/field/field.yaml +10 -0
  14. package/components/index.js +2 -0
  15. package/components/inline-edit/inline-edit.a2ui.json +159 -0
  16. package/components/inline-edit/inline-edit.class.js +184 -0
  17. package/components/inline-edit/inline-edit.css +62 -0
  18. package/components/inline-edit/inline-edit.d.ts +52 -0
  19. package/components/inline-edit/inline-edit.js +12 -0
  20. package/components/inline-edit/inline-edit.yaml +125 -0
  21. package/components/list/list-item.a2ui.json +8 -1
  22. package/components/list/list-item.yaml +12 -0
  23. package/components/list/list.css +36 -6
  24. package/components/mark/mark.a2ui.json +109 -0
  25. package/components/mark/mark.class.js +22 -0
  26. package/components/mark/mark.css +39 -0
  27. package/components/mark/mark.d.ts +27 -0
  28. package/components/mark/mark.js +12 -0
  29. package/components/mark/mark.yaml +87 -0
  30. package/components/modal/modal.a2ui.json +9 -0
  31. package/components/modal/modal.yaml +14 -0
  32. package/components/nav-group/nav-group.a2ui.json +3 -0
  33. package/components/nav-group/nav-group.yaml +5 -0
  34. package/components/nav-item/nav-item.a2ui.json +3 -0
  35. package/components/nav-item/nav-item.yaml +5 -0
  36. package/components/segmented/segmented.class.js +10 -2
  37. package/components/select/select.a2ui.json +3 -0
  38. package/components/select/select.yaml +5 -0
  39. package/components/slider/slider.a2ui.json +6 -0
  40. package/components/slider/slider.yaml +10 -0
  41. package/components/stat/stat.css +18 -14
  42. package/components/stepper/stepper-item.a2ui.json +3 -0
  43. package/components/stepper/stepper-item.yaml +5 -0
  44. package/components/timeline/timeline-item.a2ui.json +8 -1
  45. package/components/timeline/timeline-item.yaml +12 -0
  46. package/components/tree/tree-item.a2ui.json +5 -1
  47. package/components/tree/tree-item.yaml +7 -0
  48. package/components/tree/tree.a2ui.json +3 -0
  49. package/components/tree/tree.yaml +5 -0
  50. package/dist/web-components.min.css +1 -1
  51. package/dist/web-components.min.js +74 -74
  52. package/package.json +1 -1
  53. package/styles/components.css +2 -0
@@ -105,6 +105,9 @@
105
105
  "slots": {
106
106
  "default": {
107
107
  "description": "Optional override of the default icon + text + badge stamping."
108
+ },
109
+ "icon": {
110
+ "description": "Override the leading [icon] glyph with a custom slotted element (custom icon-ui, image, avatar). Mutually exclusive with the [icon] attribute — slot child wins."
108
111
  }
109
112
  },
110
113
  "states": [
@@ -68,6 +68,11 @@ events:
68
68
  slots:
69
69
  default:
70
70
  description: "Optional override of the default icon + text + badge stamping."
71
+ icon:
72
+ description: >-
73
+ Override the leading [icon] glyph with a custom slotted element
74
+ (custom icon-ui, image, avatar). Mutually exclusive with the
75
+ [icon] attribute — slot child wins.
71
76
 
72
77
  states:
73
78
  - name: idle
@@ -152,9 +152,17 @@ export class UISegmented extends UIFormElement {
152
152
  return;
153
153
  }
154
154
 
155
- // Lazy-create indicator (prepend so it's behind segments in paint order)
156
- const isNew = !this.#indicator;
155
+ // Indicator there must be EXACTLY ONE [data-indicator] child at all
156
+ // times. If the instance ref is missing OR detached, strip every stale
157
+ // indicator from the DOM (defensive: re-renders after disconnect/
158
+ // reconnect cycles, HMR, or stamp() can leave the field nulled while
159
+ // the previous indicator span persists in DOM → multiple translateX'd
160
+ // pills paint simultaneously). Then create a fresh one.
161
+ const isNew = !this.#indicator || !this.contains(this.#indicator);
157
162
  if (isNew) {
163
+ for (const stale of this.querySelectorAll(':scope > [data-indicator]')) {
164
+ stale.remove();
165
+ }
158
166
  this.#indicator = document.createElement('span');
159
167
  this.#indicator.setAttribute('data-indicator', '');
160
168
  this.prepend(this.#indicator);
@@ -220,6 +220,9 @@
220
220
  "upload"
221
221
  ],
222
222
  "slots": {
223
+ "hint": {
224
+ "description": "Override slot for hint markup richer than the plain [hint] attribute string (inline links, code spans). Renders beneath the trigger at body-subtle typography. Mutually exclusive with [hint]."
225
+ },
223
226
  "label": {
224
227
  "description": "Label element above the trigger"
225
228
  },
@@ -220,6 +220,11 @@ slots:
220
220
  description: Popover container for options (role=listbox)
221
221
  trigger:
222
222
  description: Button that opens the listbox
223
+ hint:
224
+ description: >-
225
+ Override slot for hint markup richer than the plain [hint] attribute
226
+ string (inline links, code spans). Renders beneath the trigger at
227
+ body-subtle typography. Mutually exclusive with [hint].
223
228
  states:
224
229
  - name: idle
225
230
  description: Default, ready for interaction.
@@ -133,6 +133,12 @@
133
133
  "embed"
134
134
  ],
135
135
  "slots": {
136
+ "header": {
137
+ "description": "Wholesale override of the stamped label + value-readout header row. Use only when full custom-header markup is needed; otherwise prefer the granular `label` / `value` slots and the [label] attribute."
138
+ },
139
+ "hint": {
140
+ "description": "Override slot for hint markup richer than the plain [hint] attribute string (inline links, code spans). Renders beneath the slider at body-subtle typography. Mutually exclusive with [hint]."
141
+ },
136
142
  "input": {
137
143
  "description": "Native range input element"
138
144
  },
@@ -96,6 +96,16 @@ slots:
96
96
  description: Label element above the slider
97
97
  value:
98
98
  description: Current value display
99
+ header:
100
+ description: >-
101
+ Wholesale override of the stamped label + value-readout header row.
102
+ Use only when full custom-header markup is needed; otherwise prefer
103
+ the granular `label` / `value` slots and the [label] attribute.
104
+ hint:
105
+ description: >-
106
+ Override slot for hint markup richer than the plain [hint] attribute
107
+ string (inline links, code spans). Renders beneath the slider at
108
+ body-subtle typography. Mutually exclusive with [hint].
99
109
  states:
100
110
  - name: idle
101
111
  description: Default, ready for interaction.
@@ -38,34 +38,38 @@
38
38
 
39
39
  /* ── Chart slot (inline sparkline) ──
40
40
  When an author adds <chart-ui slot="chart"> (or any sparkline-shape
41
- child), the grid reflows so the chart occupies the right column
42
- across the value + change rows, fixed to the stat's right edge.
43
- Hero number and chart read as a single visual unit. */
41
+ child), the grid reflows so the chart sits in the value row and
42
+ ends at the value's baseline hero number and chart read as one
43
+ visual unit, the chart "resting on" the value text. */
44
44
  :scope:has([slot="chart"]) {
45
45
  grid-template-columns: minmax(0, 1fr) minmax(5rem, 40%);
46
46
  grid-template-areas:
47
47
  "label icon"
48
48
  "value chart"
49
- "change chart";
49
+ "change .";
50
50
  align-items: end;
51
51
  }
52
52
 
53
- /* Cap the chart slot at a sparkline-appropriate size otherwise the
54
- chart's default aspect ratio stretches the row heights and bloats
55
- the whole card. Consumers who want a taller inline chart can
56
- override --stat-chart-max-height on the host. Uses `chart-ui[slot]`
57
- compound selector to beat chart-ui's own `:scope { max-height: 28rem }`
58
- (specificity 0,1,1 beats 0,0,1). `[slot="chart"]` alone is (0,1,0)
59
- — enough on paper but empirically losing to chart-ui's own scope in
60
- practice; the type selector makes it explicit. */
53
+ /* Chart cell bottom-aligned to the value row's baseline; aspect
54
+ ratio 4:3 (width:height) keeps it readable as a small inline chart
55
+ rather than a thin sparkline rail. Consumers override via
56
+ --stat-chart-aspect. */
61
57
  [slot="chart"] {
62
58
  grid-area: chart;
63
- align-self: center;
59
+ align-self: end;
64
60
  min-width: 0;
65
61
  width: 100%;
62
+ aspect-ratio: var(--stat-chart-aspect, 4 / 3);
66
63
  }
67
64
  chart-ui[slot="chart"] {
68
- max-height: var(--stat-chart-max-height, 3rem);
65
+ height: 100%;
66
+ }
67
+
68
+ /* When chart is present, value must NOT span into the chart column
69
+ (its default `grid-column: 1 / -1` would overlap the chart cell and
70
+ misalign both). Confine it to col 1. */
71
+ :scope:has([slot="chart"]) [slot="value"] {
72
+ grid-column: 1;
69
73
  }
70
74
 
71
75
  /* ── Label (eyebrow) ── */
@@ -70,6 +70,9 @@
70
70
  "description": {
71
71
  "description": "Custom description content; falls through to `[description]` prop if not slotted."
72
72
  },
73
+ "icon": {
74
+ "description": "Override the step-status glyph with a custom slotted element. By default the step renders a numeral / check / x indicator based on [status]; slot an `<icon-ui>` or image to customize."
75
+ },
73
76
  "label": {
74
77
  "description": "Custom label content; falls through to `[text]` prop if not slotted."
75
78
  }
@@ -44,6 +44,11 @@ slots:
44
44
  description: Custom label content; falls through to `[text]` prop if not slotted.
45
45
  description:
46
46
  description: Custom description content; falls through to `[description]` prop if not slotted.
47
+ icon:
48
+ description: >-
49
+ Override the step-status glyph with a custom slotted element. By default
50
+ the step renders a numeral / check / x indicator based on [status];
51
+ slot an `<icon-ui>` or image to customize.
47
52
 
48
53
  keywords:
49
54
  - stepper-item
@@ -75,7 +75,14 @@
75
75
  "FeedItem",
76
76
  "Stepper"
77
77
  ],
78
- "slots": {},
78
+ "slots": {
79
+ "description": {
80
+ "description": "Override slot for rich description markup (inline links, code spans, embedded badges). Renders beneath the primary text at body-subtle typography."
81
+ },
82
+ "icon": {
83
+ "description": "Override the [icon] glyph with a custom slotted element. Use for branded icons, avatars, or non-Phosphor sources. Mutually exclusive with the [icon] attribute."
84
+ }
85
+ },
79
86
  "states": [],
80
87
  "status": "stable",
81
88
  "synonyms": {
@@ -47,6 +47,18 @@ props:
47
47
  type: boolean
48
48
  default: false
49
49
 
50
+ slots:
51
+ icon:
52
+ description: >-
53
+ Override the [icon] glyph with a custom slotted element. Use for
54
+ branded icons, avatars, or non-Phosphor sources. Mutually exclusive
55
+ with the [icon] attribute.
56
+ description:
57
+ description: >-
58
+ Override slot for rich description markup (inline links, code spans,
59
+ embedded badges). Renders beneath the primary text at body-subtle
60
+ typography.
61
+
50
62
  keywords:
51
63
  - timeline-item
52
64
  - timeline-row
@@ -64,7 +64,11 @@
64
64
  "Nav",
65
65
  "Accordion"
66
66
  ],
67
- "slots": {},
67
+ "slots": {
68
+ "icon": {
69
+ "description": "Override the leading [icon] glyph with a custom slotted element (custom icon-ui, folder open/closed glyph, file-type marker). Mutually exclusive with the [icon] attribute — slot child wins."
70
+ }
71
+ },
68
72
  "states": [],
69
73
  "status": "stable",
70
74
  "synonyms": {
@@ -41,6 +41,13 @@ props:
41
41
  Added in §184 (v0.5.5, FEEDBACK-08 §1).
42
42
  type: string
43
43
 
44
+ slots:
45
+ icon:
46
+ description: >-
47
+ Override the leading [icon] glyph with a custom slotted element (custom
48
+ icon-ui, folder open/closed glyph, file-type marker). Mutually exclusive
49
+ with the [icon] attribute — slot child wins.
50
+
44
51
  a2ui:
45
52
  rules:
46
53
  - >-
@@ -79,6 +79,9 @@
79
79
  "slots": {
80
80
  "default (tree-item-ui children)": {
81
81
  "description": "Child content region for the `default (tree-item-ui children)` slot."
82
+ },
83
+ "icon": {
84
+ "description": "Override slot for the per-node icon glyph. Tree-item's `[icon]` attr stamps a default Phosphor icon; the slot lets consumers fill custom icons (folder open/closed, file-type glyphs, branded markers)."
82
85
  }
83
86
  },
84
87
  "states": [
@@ -43,6 +43,11 @@ events:
43
43
  slots:
44
44
  default (tree-item-ui children):
45
45
  description: "Child content region for the `default (tree-item-ui children)` slot."
46
+ icon:
47
+ description: >-
48
+ Override slot for the per-node icon glyph. Tree-item's `[icon]` attr
49
+ stamps a default Phosphor icon; the slot lets consumers fill custom
50
+ icons (folder open/closed, file-type glyphs, branded markers).
46
51
  states:
47
52
  - name: idle
48
53
  description: Default, ready for interaction.