@usefidel/design-system 0.5.0 → 0.6.0

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.
@@ -10,6 +10,6 @@
10
10
  "webapp.css"
11
11
  ],
12
12
  "storybookUrl": null,
13
- "packageVersion": "0.5.0",
14
- "resolvedSha": "03a49c2e8d888b7916f449d7801daa922c525737"
13
+ "packageVersion": "0.6.0",
14
+ "resolvedSha": "e08dca273c717cf832900a20e846f8e5e955a1e3"
15
15
  }
package/dist/index.cjs CHANGED
@@ -216,6 +216,8 @@ function ElementRow({
216
216
  {
217
217
  className: "fds-diff-section__element",
218
218
  "data-open": hasDetail && open ? "true" : void 0,
219
+ "data-highlighted": element.highlighted ? "true" : void 0,
220
+ "data-anchor-id": element.anchorId,
219
221
  onMouseEnter: onHover ? () => onHover(index, true) : void 0,
220
222
  onMouseLeave: onHover ? () => onHover(index, false) : void 0,
221
223
  children: [
package/dist/index.css CHANGED
@@ -310,6 +310,11 @@
310
310
  .fds-diff-section__element {
311
311
  display: flex;
312
312
  flex-direction: column;
313
+ transition: background var(--duration-quick, 150ms) ease;
314
+ }
315
+ .fds-diff-section__element[data-highlighted=true] {
316
+ background: var(--color-accent-subtle, var(--color-surface-hover));
317
+ box-shadow: inset 2px 0 0 var(--color-accent);
313
318
  }
314
319
  .fds-diff-section__element-head {
315
320
  display: flex;
package/dist/index.d.cts CHANGED
@@ -91,6 +91,19 @@ interface DiffElement {
91
91
  * screenshot highlight). Leave undefined for uncontrolled (`defaultOpen`).
92
92
  */
93
93
  open?: boolean;
94
+ /**
95
+ * Emphasise this row without expanding it. When `true` the element renders a
96
+ * highlight treatment (a subtle fill and an accent edge). Use it to reflect
97
+ * an external selection — e.g. hovering a screenshot annotation highlighting
98
+ * its matching drawer row. Purely visual; does not affect `open`.
99
+ */
100
+ highlighted?: boolean;
101
+ /**
102
+ * Stamped onto the element root as `data-anchor-id`, giving the caller a
103
+ * stable handle to scroll this row into view (e.g. from a screenshot
104
+ * annotation) without threading a ref through the component.
105
+ */
106
+ anchorId?: string;
94
107
  }
95
108
  interface DiffSectionProps extends HTMLAttributes<HTMLDivElement> {
96
109
  /** Ordinal shown before the name, e.g. "01". Omitted in `headerless` mode. */
package/dist/index.d.ts CHANGED
@@ -91,6 +91,19 @@ interface DiffElement {
91
91
  * screenshot highlight). Leave undefined for uncontrolled (`defaultOpen`).
92
92
  */
93
93
  open?: boolean;
94
+ /**
95
+ * Emphasise this row without expanding it. When `true` the element renders a
96
+ * highlight treatment (a subtle fill and an accent edge). Use it to reflect
97
+ * an external selection — e.g. hovering a screenshot annotation highlighting
98
+ * its matching drawer row. Purely visual; does not affect `open`.
99
+ */
100
+ highlighted?: boolean;
101
+ /**
102
+ * Stamped onto the element root as `data-anchor-id`, giving the caller a
103
+ * stable handle to scroll this row into view (e.g. from a screenshot
104
+ * annotation) without threading a ref through the component.
105
+ */
106
+ anchorId?: string;
94
107
  }
95
108
  interface DiffSectionProps extends HTMLAttributes<HTMLDivElement> {
96
109
  /** Ordinal shown before the name, e.g. "01". Omitted in `headerless` mode. */
package/dist/index.js CHANGED
@@ -188,6 +188,8 @@ function ElementRow({
188
188
  {
189
189
  className: "fds-diff-section__element",
190
190
  "data-open": hasDetail && open ? "true" : void 0,
191
+ "data-highlighted": element.highlighted ? "true" : void 0,
192
+ "data-anchor-id": element.anchorId,
191
193
  onMouseEnter: onHover ? () => onHover(index, true) : void 0,
192
194
  onMouseLeave: onHover ? () => onHover(index, false) : void 0,
193
195
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usefidel/design-system",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Fidel brand design tokens + React component library — DTCG token source of truth, generated per-surface CSS + Tailwind-v4 parser-compatibility output, and on-brand React components (Button, MismatchCard, DiffSection).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",