@adia-ai/web-components 0.8.24 → 0.8.26

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 (34) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/components/anchor-bar/anchor-bar.a2ui.json +139 -0
  3. package/components/anchor-bar/anchor-bar.class.js +124 -0
  4. package/components/anchor-bar/anchor-bar.css +140 -0
  5. package/components/anchor-bar/anchor-bar.d.ts +35 -0
  6. package/components/anchor-bar/anchor-bar.examples.md +32 -0
  7. package/components/anchor-bar/anchor-bar.js +17 -0
  8. package/components/anchor-bar/anchor-bar.yaml +167 -0
  9. package/components/chart/chart.a2ui.json +16 -0
  10. package/components/chart/chart.class.js +105 -27
  11. package/components/chart/chart.css +27 -0
  12. package/components/chart/chart.d.ts +4 -0
  13. package/components/chart/chart.yaml +28 -0
  14. package/components/index.js +1 -0
  15. package/components/richtext/richtext.css +7 -2
  16. package/components/stat/stat.a2ui.json +8 -0
  17. package/components/stat/stat.css +39 -0
  18. package/components/stat/stat.d.ts +2 -0
  19. package/components/stat/stat.js +5 -0
  20. package/components/stat/stat.yaml +11 -0
  21. package/components/tooltip/tooltip.class.js +17 -11
  22. package/dist/host.min.css +1 -1
  23. package/dist/host.sheet.js +1 -1
  24. package/dist/theme-provider.min.js +2 -2
  25. package/dist/web-components.min.css +1 -1
  26. package/dist/web-components.min.js +113 -113
  27. package/dist/web-components.sheet.js +1 -1
  28. package/package.json +1 -1
  29. package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.html +81 -93
  30. package/patterns/bulk-action-toolbar/bulk-action-toolbar.examples.js +12 -25
  31. package/patterns/bulk-action-toolbar/bulk-action-toolbar.html +8 -52
  32. package/styles/api/parametric-scope.css +81 -0
  33. package/styles/components.css +1 -0
  34. package/styles/tokens.css +1 -0
@@ -192,22 +192,28 @@ export class UITooltip extends UIElement {
192
192
  /* Copy per-series `--color-{key}` custom properties from the target chart
193
193
  to the popover so inner rows can reference them. The popover lives in
194
194
  the top layer and does NOT inherit custom properties from the host,
195
- so we bridge them explicitly at show time. */
195
+ so we bridge them explicitly at show time.
196
+
197
+ gh#561 — chart-ui no longer writes `--color-{key}` as an inline style
198
+ on itself (that shadowed ancestor overrides — the bug this issue
199
+ fixed). Resolve each declared series key's *effective* value via
200
+ getComputedStyle instead, which correctly picks up a value set on
201
+ the chart itself OR any ancestor. `legendData` (chart-ui's public
202
+ getter) enumerates every declared series key; targets without it
203
+ (non-chart-ui `for` targets, or charts with no y-keys) have nothing
204
+ to copy. */
196
205
  #copySeriesColorsFromTarget() {
197
206
  if (!this.#target || !this.#popover) return;
198
- /* Prefer inline style on the target (what chart-ui's #injectSeriesColors
199
- writes). Fall back to computed style resolution for any --color-* vars
200
- the author set on ancestors. */
201
- const inline = this.#target.style;
202
- for (let i = 0; i < inline.length; i++) {
203
- const name = inline[i];
204
- if (name.startsWith('--color-')) {
205
- this.#popover.style.setProperty(name, inline.getPropertyValue(name));
206
- }
207
+ const cs = getComputedStyle(this.#target);
208
+ const keys = Array.isArray(this.#target.legendData)
209
+ ? this.#target.legendData.map((it) => it.key).filter(Boolean)
210
+ : [];
211
+ for (const key of keys) {
212
+ const v = cs.getPropertyValue(`--color-${key}`).trim();
213
+ if (v) this.#popover.style.setProperty(`--color-${key}`, v);
207
214
  }
208
215
  /* Also copy the 10 categorical palette slots so the fallback
209
216
  `var(--color-{key}, var(--chart-{slot}))` resolves. */
210
- const cs = getComputedStyle(this.#target);
211
217
  for (let i = 0; i < 10; i++) {
212
218
  const v = cs.getPropertyValue(`--chart-${i}`).trim();
213
219
  if (v) this.#popover.style.setProperty(`--chart-${i}`, v);