@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.
- package/dist/fidel.manifest.json +2 -2
- package/dist/index.cjs +2 -0
- package/dist/index.css +5 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/fidel.manifest.json
CHANGED
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.
|
|
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",
|