@usefidel/design-system 0.6.0 → 0.7.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 +15 -8
- package/dist/index.css +8 -1
- package/dist/index.d.cts +31 -5
- package/dist/index.d.ts +31 -5
- package/dist/index.js +14 -8
- package/package.json +1 -1
package/dist/fidel.manifest.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
Button: () => Button,
|
|
24
|
+
DiffPropertyList: () => DiffPropertyList,
|
|
24
25
|
DiffSection: () => DiffSection,
|
|
25
26
|
MismatchCard: () => MismatchCard
|
|
26
27
|
});
|
|
@@ -202,14 +203,7 @@ function ElementRow({
|
|
|
202
203
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__element-count", children: plural(element.properties.length, "property", "properties") }),
|
|
203
204
|
hasDetail && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Chevron2, { open, className: "fds-diff-section__element-caret" })
|
|
204
205
|
] }),
|
|
205
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
206
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__prop", children: line.property }),
|
|
207
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "fds-diff-section__delta", children: [
|
|
208
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__live", children: line.live }),
|
|
209
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Arrow, {}),
|
|
210
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__design", children: line.design })
|
|
211
|
-
] })
|
|
212
|
-
] }, `${line.property}-${li}`)) })
|
|
206
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DiffPropertyList, { properties: element.properties })
|
|
213
207
|
] });
|
|
214
208
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
215
209
|
"div",
|
|
@@ -236,6 +230,18 @@ function ElementRow({
|
|
|
236
230
|
}
|
|
237
231
|
);
|
|
238
232
|
}
|
|
233
|
+
function DiffPropertyList({ properties, className, ...rest }) {
|
|
234
|
+
const classes = ["fds-diff-section__lines", className].filter(Boolean).join(" ");
|
|
235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: classes, ...rest, children: properties.map((line, li) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "fds-diff-section__line", children: [
|
|
236
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__prop", children: line.property }),
|
|
237
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "fds-diff-section__delta", children: [
|
|
238
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__live", children: line.live }),
|
|
239
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Arrow, {}),
|
|
240
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__design", children: line.design })
|
|
241
|
+
] }),
|
|
242
|
+
line.trailing != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__trailing", children: line.trailing })
|
|
243
|
+
] }, `${line.property}-${li}`)) });
|
|
244
|
+
}
|
|
239
245
|
function Chevron2({ open, className }) {
|
|
240
246
|
const classes = [
|
|
241
247
|
"fds-diff-section__chevron",
|
|
@@ -279,6 +285,7 @@ function Arrow() {
|
|
|
279
285
|
// Annotate the CommonJS export names for ESM import in node:
|
|
280
286
|
0 && (module.exports = {
|
|
281
287
|
Button,
|
|
288
|
+
DiffPropertyList,
|
|
282
289
|
DiffSection,
|
|
283
290
|
MismatchCard
|
|
284
291
|
});
|
package/dist/index.css
CHANGED
|
@@ -376,7 +376,6 @@
|
|
|
376
376
|
.fds-diff-section__line {
|
|
377
377
|
display: flex;
|
|
378
378
|
align-items: center;
|
|
379
|
-
justify-content: space-between;
|
|
380
379
|
width: 100%;
|
|
381
380
|
}
|
|
382
381
|
.fds-diff-section__prop {
|
|
@@ -392,6 +391,7 @@
|
|
|
392
391
|
display: flex;
|
|
393
392
|
align-items: center;
|
|
394
393
|
gap: var(--spacing-1);
|
|
394
|
+
margin-left: auto;
|
|
395
395
|
font-family: var(--font-mono);
|
|
396
396
|
font-weight: var(--font-weight-medium);
|
|
397
397
|
font-size: 14px;
|
|
@@ -399,6 +399,13 @@
|
|
|
399
399
|
letter-spacing: -0.28px;
|
|
400
400
|
white-space: nowrap;
|
|
401
401
|
}
|
|
402
|
+
.fds-diff-section__trailing {
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
gap: var(--spacing-2);
|
|
406
|
+
margin-left: var(--spacing-3);
|
|
407
|
+
flex-shrink: 0;
|
|
408
|
+
}
|
|
402
409
|
.fds-diff-section__live {
|
|
403
410
|
color: #ef4444;
|
|
404
411
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -64,10 +64,23 @@ declare function MismatchCard({ title, properties, collapsedCount, defaultExpand
|
|
|
64
64
|
interface DiffPropertyLine {
|
|
65
65
|
/** Property name, e.g. "font-size". Rendered in mono. */
|
|
66
66
|
property: string;
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Value on the live page — what shipped. Left of the arrow (error register).
|
|
69
|
+
* A string in the common case; accepts any node so a caller can prefix it
|
|
70
|
+
* with, e.g., a colour swatch.
|
|
71
|
+
*/
|
|
72
|
+
live: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Value in the design — the target. Right of the arrow (success register).
|
|
75
|
+
* A string in the common case; accepts any node (see `live`).
|
|
76
|
+
*/
|
|
77
|
+
design: ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Optional content pinned to the right end of the row, after the delta —
|
|
80
|
+
* e.g. an occurrence count or a per-property review control. Omit for the
|
|
81
|
+
* plain read-only row. Presentational: the caller owns whatever lives here.
|
|
82
|
+
*/
|
|
83
|
+
trailing?: ReactNode;
|
|
71
84
|
}
|
|
72
85
|
interface DiffElement {
|
|
73
86
|
/** Element name, e.g. `"Pricing"`. */
|
|
@@ -150,5 +163,18 @@ interface DiffSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
150
163
|
* decision 2026-04-24): each delta reads `live → design`.
|
|
151
164
|
*/
|
|
152
165
|
declare function DiffSection({ number, name, mismatchCount, elements, defaultExpanded, headerless, onElementToggle, onElementHover, className, ...rest }: DiffSectionProps): react.JSX.Element;
|
|
166
|
+
interface DiffPropertyListProps extends HTMLAttributes<HTMLDivElement> {
|
|
167
|
+
/** Property mismatch rows to render. */
|
|
168
|
+
properties: DiffPropertyLine[];
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* The bare list of property-delta rows — `property` on the left, a
|
|
172
|
+
* `live → design` mono delta, and an optional `trailing` slot — with the left
|
|
173
|
+
* rule and indent. Extracted from DiffSection so a caller that owns its own
|
|
174
|
+
* card shell (e.g. the extension's IssueCard) can render exactly these rows
|
|
175
|
+
* without DiffSection's element/section chrome. DiffSection uses it internally,
|
|
176
|
+
* so the two surfaces render byte-identical rows.
|
|
177
|
+
*/
|
|
178
|
+
declare function DiffPropertyList({ properties, className, ...rest }: DiffPropertyListProps): react.JSX.Element;
|
|
153
179
|
|
|
154
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, type DiffElement, type DiffPropertyLine, DiffSection, type DiffSectionProps, MismatchCard, type MismatchCardProps, type MismatchProperty };
|
|
180
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, type DiffElement, type DiffPropertyLine, DiffPropertyList, type DiffPropertyListProps, DiffSection, type DiffSectionProps, MismatchCard, type MismatchCardProps, type MismatchProperty };
|
package/dist/index.d.ts
CHANGED
|
@@ -64,10 +64,23 @@ declare function MismatchCard({ title, properties, collapsedCount, defaultExpand
|
|
|
64
64
|
interface DiffPropertyLine {
|
|
65
65
|
/** Property name, e.g. "font-size". Rendered in mono. */
|
|
66
66
|
property: string;
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Value on the live page — what shipped. Left of the arrow (error register).
|
|
69
|
+
* A string in the common case; accepts any node so a caller can prefix it
|
|
70
|
+
* with, e.g., a colour swatch.
|
|
71
|
+
*/
|
|
72
|
+
live: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Value in the design — the target. Right of the arrow (success register).
|
|
75
|
+
* A string in the common case; accepts any node (see `live`).
|
|
76
|
+
*/
|
|
77
|
+
design: ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Optional content pinned to the right end of the row, after the delta —
|
|
80
|
+
* e.g. an occurrence count or a per-property review control. Omit for the
|
|
81
|
+
* plain read-only row. Presentational: the caller owns whatever lives here.
|
|
82
|
+
*/
|
|
83
|
+
trailing?: ReactNode;
|
|
71
84
|
}
|
|
72
85
|
interface DiffElement {
|
|
73
86
|
/** Element name, e.g. `"Pricing"`. */
|
|
@@ -150,5 +163,18 @@ interface DiffSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
150
163
|
* decision 2026-04-24): each delta reads `live → design`.
|
|
151
164
|
*/
|
|
152
165
|
declare function DiffSection({ number, name, mismatchCount, elements, defaultExpanded, headerless, onElementToggle, onElementHover, className, ...rest }: DiffSectionProps): react.JSX.Element;
|
|
166
|
+
interface DiffPropertyListProps extends HTMLAttributes<HTMLDivElement> {
|
|
167
|
+
/** Property mismatch rows to render. */
|
|
168
|
+
properties: DiffPropertyLine[];
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* The bare list of property-delta rows — `property` on the left, a
|
|
172
|
+
* `live → design` mono delta, and an optional `trailing` slot — with the left
|
|
173
|
+
* rule and indent. Extracted from DiffSection so a caller that owns its own
|
|
174
|
+
* card shell (e.g. the extension's IssueCard) can render exactly these rows
|
|
175
|
+
* without DiffSection's element/section chrome. DiffSection uses it internally,
|
|
176
|
+
* so the two surfaces render byte-identical rows.
|
|
177
|
+
*/
|
|
178
|
+
declare function DiffPropertyList({ properties, className, ...rest }: DiffPropertyListProps): react.JSX.Element;
|
|
153
179
|
|
|
154
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, type DiffElement, type DiffPropertyLine, DiffSection, type DiffSectionProps, MismatchCard, type MismatchCardProps, type MismatchProperty };
|
|
180
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, type DiffElement, type DiffPropertyLine, DiffPropertyList, type DiffPropertyListProps, DiffSection, type DiffSectionProps, MismatchCard, type MismatchCardProps, type MismatchProperty };
|
package/dist/index.js
CHANGED
|
@@ -174,14 +174,7 @@ function ElementRow({
|
|
|
174
174
|
/* @__PURE__ */ jsx3("span", { className: "fds-diff-section__element-count", children: plural(element.properties.length, "property", "properties") }),
|
|
175
175
|
hasDetail && /* @__PURE__ */ jsx3(Chevron2, { open, className: "fds-diff-section__element-caret" })
|
|
176
176
|
] }),
|
|
177
|
-
/* @__PURE__ */ jsx3(
|
|
178
|
-
/* @__PURE__ */ jsx3("span", { className: "fds-diff-section__prop", children: line.property }),
|
|
179
|
-
/* @__PURE__ */ jsxs3("span", { className: "fds-diff-section__delta", children: [
|
|
180
|
-
/* @__PURE__ */ jsx3("span", { className: "fds-diff-section__live", children: line.live }),
|
|
181
|
-
/* @__PURE__ */ jsx3(Arrow, {}),
|
|
182
|
-
/* @__PURE__ */ jsx3("span", { className: "fds-diff-section__design", children: line.design })
|
|
183
|
-
] })
|
|
184
|
-
] }, `${line.property}-${li}`)) })
|
|
177
|
+
/* @__PURE__ */ jsx3(DiffPropertyList, { properties: element.properties })
|
|
185
178
|
] });
|
|
186
179
|
return /* @__PURE__ */ jsxs3(
|
|
187
180
|
"div",
|
|
@@ -208,6 +201,18 @@ function ElementRow({
|
|
|
208
201
|
}
|
|
209
202
|
);
|
|
210
203
|
}
|
|
204
|
+
function DiffPropertyList({ properties, className, ...rest }) {
|
|
205
|
+
const classes = ["fds-diff-section__lines", className].filter(Boolean).join(" ");
|
|
206
|
+
return /* @__PURE__ */ jsx3("div", { className: classes, ...rest, children: properties.map((line, li) => /* @__PURE__ */ jsxs3("div", { className: "fds-diff-section__line", children: [
|
|
207
|
+
/* @__PURE__ */ jsx3("span", { className: "fds-diff-section__prop", children: line.property }),
|
|
208
|
+
/* @__PURE__ */ jsxs3("span", { className: "fds-diff-section__delta", children: [
|
|
209
|
+
/* @__PURE__ */ jsx3("span", { className: "fds-diff-section__live", children: line.live }),
|
|
210
|
+
/* @__PURE__ */ jsx3(Arrow, {}),
|
|
211
|
+
/* @__PURE__ */ jsx3("span", { className: "fds-diff-section__design", children: line.design })
|
|
212
|
+
] }),
|
|
213
|
+
line.trailing != null && /* @__PURE__ */ jsx3("span", { className: "fds-diff-section__trailing", children: line.trailing })
|
|
214
|
+
] }, `${line.property}-${li}`)) });
|
|
215
|
+
}
|
|
211
216
|
function Chevron2({ open, className }) {
|
|
212
217
|
const classes = [
|
|
213
218
|
"fds-diff-section__chevron",
|
|
@@ -250,6 +255,7 @@ function Arrow() {
|
|
|
250
255
|
}
|
|
251
256
|
export {
|
|
252
257
|
Button,
|
|
258
|
+
DiffPropertyList,
|
|
253
259
|
DiffSection,
|
|
254
260
|
MismatchCard
|
|
255
261
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usefidel/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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",
|