@usefidel/design-system 0.10.0 → 0.11.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/admin.css CHANGED
@@ -7,6 +7,7 @@
7
7
  --color-text: #171717;
8
8
  --color-text-secondary: #525252;
9
9
  --color-text-muted: #a3a3a3;
10
+ --color-text-tertiary: #737373;
10
11
  --color-border: #e5e5e5;
11
12
  --color-border-light: #f5f5f5;
12
13
  --color-border-strong: #d4d4d4;
@@ -45,6 +46,8 @@
45
46
  --color-actual-text: #dc2626;
46
47
  --color-focus: #ea580c;
47
48
  --color-info: #1d4ed8;
49
+ --color-info-strong: #2563eb;
50
+ --color-info-surface: #eff6ff;
48
51
  --font-display: 'Rethink Sans', system-ui, -apple-system, sans-serif;
49
52
  --font-body: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
50
53
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
@@ -7,6 +7,7 @@
7
7
  --color-text: #0f172a;
8
8
  --color-text-secondary: #475569;
9
9
  --color-text-muted: #a3a3a3;
10
+ --color-text-tertiary: #737373;
10
11
  --color-border: #e2e5ea;
11
12
  --color-border-light: #ebeff3;
12
13
  --color-border-strong: #d1d5db;
@@ -45,6 +46,8 @@
45
46
  --color-actual-text: #dc2626;
46
47
  --color-focus: #ea580c;
47
48
  --color-info: #1d4ed8;
49
+ --color-info-strong: #2563eb;
50
+ --color-info-surface: #eff6ff;
48
51
  --font-display: 'Rethink Sans', system-ui, -apple-system, sans-serif;
49
52
  --font-body: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
50
53
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
@@ -10,6 +10,6 @@
10
10
  "webapp.css"
11
11
  ],
12
12
  "storybookUrl": null,
13
- "packageVersion": "0.10.0",
14
- "resolvedSha": "0d5b73828f4b82fe22b102a3e67c3d246963644a"
13
+ "packageVersion": "0.11.0",
14
+ "resolvedSha": "40acd49195f775e019c290143a6f0b6fa27ab9c9"
15
15
  }
package/dist/index.cjs CHANGED
@@ -166,11 +166,13 @@ function DiffSection({
166
166
  onClick: () => setExpanded((v) => !v),
167
167
  children: [
168
168
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "fds-diff-section__head-left", children: [
169
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Chevron2, { open: expanded }),
170
169
  number != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__number", children: number }),
171
170
  name != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__name", children: name })
172
171
  ] }),
173
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__count", children: plural(count, "mismatch", "mismatches") })
172
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "fds-diff-section__head-right", children: [
173
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__count", children: plural(count, "mismatch", "mismatches") }),
174
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HeaderChevron, { expanded })
175
+ ] })
174
176
  ]
175
177
  }
176
178
  ),
@@ -231,6 +233,7 @@ function ElementRow({
231
233
  children: lines
232
234
  }
233
235
  ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "fds-diff-section__element-head", children: lines }),
236
+ element.sourceUrl != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ViewSource, { href: element.sourceUrl, label: element.sourceLabel ?? "View source" }),
234
237
  hasDetail && open && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "fds-diff-section__detail", children: element.detail })
235
238
  ]
236
239
  }
@@ -248,6 +251,47 @@ function DiffPropertyList({ properties, className, ...rest }) {
248
251
  line.trailing != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__trailing", children: line.trailing })
249
252
  ] }, `${line.property}-${li}`)) });
250
253
  }
254
+ function ViewSource({ href, label }) {
255
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
256
+ "a",
257
+ {
258
+ className: "fds-diff-section__source",
259
+ href,
260
+ target: "_blank",
261
+ rel: "noreferrer noopener",
262
+ onClick: (e) => e.stopPropagation(),
263
+ children: [
264
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "fds-diff-section__source-label", children: label }),
265
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
266
+ "path",
267
+ {
268
+ d: "M7.5 12.5 12.5 7.5M8 7.5h4.5V12",
269
+ stroke: "currentColor",
270
+ strokeWidth: "1.5",
271
+ strokeLinecap: "round",
272
+ strokeLinejoin: "round"
273
+ }
274
+ ) })
275
+ ]
276
+ }
277
+ );
278
+ }
279
+ function HeaderChevron({ expanded }) {
280
+ const classes = [
281
+ "fds-diff-section__header-chevron",
282
+ expanded && "fds-diff-section__header-chevron--expanded"
283
+ ].filter(Boolean).join(" ");
284
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
285
+ "path",
286
+ {
287
+ d: "M5 11 9 7l4 4",
288
+ stroke: "currentColor",
289
+ strokeWidth: "1.5",
290
+ strokeLinecap: "round",
291
+ strokeLinejoin: "round"
292
+ }
293
+ ) });
294
+ }
251
295
  function Chevron2({ open, className }) {
252
296
  const classes = [
253
297
  "fds-diff-section__chevron",
package/dist/index.css CHANGED
@@ -292,6 +292,20 @@
292
292
  line-height: 22px;
293
293
  color: var(--color-text);
294
294
  }
295
+ .fds-diff-section__head-right {
296
+ display: flex;
297
+ align-items: center;
298
+ justify-content: center;
299
+ gap: var(--spacing-2);
300
+ }
301
+ .fds-diff-section__header-chevron {
302
+ flex-shrink: 0;
303
+ color: var(--color-text-secondary);
304
+ transition: transform var(--duration-quick, 150ms) ease;
305
+ }
306
+ .fds-diff-section__header-chevron--expanded {
307
+ transform: rotate(180deg);
308
+ }
295
309
  .fds-diff-section__count {
296
310
  font-weight: var(--font-weight-regular);
297
311
  font-size: 14px;
@@ -305,6 +319,7 @@
305
319
  gap: var(--spacing-3);
306
320
  }
307
321
  .fds-diff-section__element {
322
+ position: relative;
308
323
  display: flex;
309
324
  flex-direction: column;
310
325
  transition: background var(--duration-quick, 150ms) ease;
@@ -352,15 +367,21 @@
352
367
  border-top: 1px solid var(--color-border-light);
353
368
  }
354
369
  .fds-diff-section__element-name {
370
+ display: inline-flex;
371
+ align-items: center;
372
+ justify-content: center;
373
+ padding: 2px var(--spacing-1);
374
+ background: var(--color-info-surface);
375
+ border-radius: var(--radius-xs);
355
376
  font-weight: var(--font-weight-medium);
356
- font-size: 14px;
357
- line-height: 22px;
377
+ font-size: var(--font-size-text-xs);
378
+ line-height: var(--line-height-text-xs);
358
379
  color: var(--color-text);
359
380
  }
360
381
  .fds-diff-section__element-count {
361
382
  font-weight: var(--font-weight-regular);
362
- font-size: 12px;
363
- line-height: 18px;
383
+ font-size: var(--font-size-text-xs);
384
+ line-height: var(--line-height-text-xs);
364
385
  color: var(--color-text-secondary);
365
386
  }
366
387
  .fds-diff-section__lines {
@@ -378,9 +399,9 @@
378
399
  .fds-diff-section__prop {
379
400
  font-family: var(--font-mono);
380
401
  font-weight: var(--font-weight-regular);
381
- font-size: 14px;
382
- line-height: 22px;
383
- letter-spacing: -0.28px;
402
+ font-size: var(--font-size-label-xs);
403
+ line-height: var(--line-height-label-xs);
404
+ letter-spacing: -0.24px;
384
405
  color: var(--color-text-secondary);
385
406
  white-space: nowrap;
386
407
  }
@@ -391,9 +412,9 @@
391
412
  margin-left: auto;
392
413
  font-family: var(--font-mono);
393
414
  font-weight: var(--font-weight-medium);
394
- font-size: 14px;
395
- line-height: 22px;
396
- letter-spacing: -0.28px;
415
+ font-size: var(--font-size-label-xs);
416
+ line-height: var(--line-height-label-xs);
417
+ letter-spacing: -0.24px;
397
418
  white-space: nowrap;
398
419
  }
399
420
  .fds-diff-section__trailing {
@@ -404,14 +425,53 @@
404
425
  flex-shrink: 0;
405
426
  }
406
427
  .fds-diff-section__live {
407
- color: #ef4444;
428
+ color: var(--color-text-tertiary);
429
+ text-decoration: line-through;
430
+ text-decoration-skip-ink: none;
408
431
  }
409
432
  .fds-diff-section__arrow {
410
433
  flex-shrink: 0;
411
434
  color: var(--color-text-muted);
412
435
  }
413
436
  .fds-diff-section__design {
414
- color: #1e8902;
437
+ color: var(--color-info-strong);
438
+ }
439
+ .fds-diff-section__source {
440
+ position: absolute;
441
+ top: var(--spacing-6);
442
+ left: var(--spacing-6);
443
+ z-index: 2;
444
+ display: inline-flex;
445
+ align-items: center;
446
+ gap: var(--spacing-2);
447
+ padding: var(--spacing-1) var(--spacing-2);
448
+ border-radius: var(--radius-lg);
449
+ background: var(--color-text);
450
+ color: var(--color-primary-text);
451
+ font-family: var(--font-body);
452
+ font-weight: var(--font-weight-medium);
453
+ font-size: var(--font-size-text-xs);
454
+ line-height: var(--line-height-text-xs);
455
+ text-decoration: none;
456
+ white-space: nowrap;
457
+ box-shadow: var(--shadow-lg);
458
+ opacity: 0;
459
+ visibility: hidden;
460
+ transition: opacity var(--duration-quick, 150ms) ease, visibility var(--duration-quick, 150ms) ease;
461
+ }
462
+ .fds-diff-section__element:hover .fds-diff-section__source,
463
+ .fds-diff-section__source:focus-visible {
464
+ opacity: 1;
465
+ visibility: visible;
466
+ }
467
+ .fds-diff-section__source:focus-visible {
468
+ outline: 2px solid var(--color-focus);
469
+ outline-offset: 2px;
470
+ }
471
+ @media (prefers-reduced-motion: reduce) {
472
+ .fds-diff-section__source {
473
+ transition: none;
474
+ }
415
475
  }
416
476
 
417
477
  /* src/components/Select/select.css */
package/dist/index.d.cts CHANGED
@@ -124,6 +124,15 @@ interface DiffElement {
124
124
  * annotation) without threading a ref through the component.
125
125
  */
126
126
  anchorId?: string;
127
+ /**
128
+ * Where this element came from — a repo permalink, a Storybook story, a
129
+ * Figma node. When set, a "View source" affordance appears on hover (and on
130
+ * keyboard focus) next to the element name. Omit it and no affordance
131
+ * renders at all: the DS never invents a destination it cannot know.
132
+ */
133
+ sourceUrl?: string;
134
+ /** Accessible label for the source link. @default "View source" */
135
+ sourceLabel?: string;
127
136
  }
128
137
  interface DiffSectionProps extends HTMLAttributes<HTMLDivElement> {
129
138
  /** Ordinal shown before the name, e.g. "01". Omitted in `headerless` mode. */
package/dist/index.d.ts CHANGED
@@ -124,6 +124,15 @@ interface DiffElement {
124
124
  * annotation) without threading a ref through the component.
125
125
  */
126
126
  anchorId?: string;
127
+ /**
128
+ * Where this element came from — a repo permalink, a Storybook story, a
129
+ * Figma node. When set, a "View source" affordance appears on hover (and on
130
+ * keyboard focus) next to the element name. Omit it and no affordance
131
+ * renders at all: the DS never invents a destination it cannot know.
132
+ */
133
+ sourceUrl?: string;
134
+ /** Accessible label for the source link. @default "View source" */
135
+ sourceLabel?: string;
127
136
  }
128
137
  interface DiffSectionProps extends HTMLAttributes<HTMLDivElement> {
129
138
  /** Ordinal shown before the name, e.g. "01". Omitted in `headerless` mode. */
package/dist/index.js CHANGED
@@ -135,11 +135,13 @@ function DiffSection({
135
135
  onClick: () => setExpanded((v) => !v),
136
136
  children: [
137
137
  /* @__PURE__ */ jsxs3("span", { className: "fds-diff-section__head-left", children: [
138
- /* @__PURE__ */ jsx3(Chevron2, { open: expanded }),
139
138
  number != null && /* @__PURE__ */ jsx3("span", { className: "fds-diff-section__number", children: number }),
140
139
  name != null && /* @__PURE__ */ jsx3("span", { className: "fds-diff-section__name", children: name })
141
140
  ] }),
142
- /* @__PURE__ */ jsx3("span", { className: "fds-diff-section__count", children: plural(count, "mismatch", "mismatches") })
141
+ /* @__PURE__ */ jsxs3("span", { className: "fds-diff-section__head-right", children: [
142
+ /* @__PURE__ */ jsx3("span", { className: "fds-diff-section__count", children: plural(count, "mismatch", "mismatches") }),
143
+ /* @__PURE__ */ jsx3(HeaderChevron, { expanded })
144
+ ] })
143
145
  ]
144
146
  }
145
147
  ),
@@ -200,6 +202,7 @@ function ElementRow({
200
202
  children: lines
201
203
  }
202
204
  ) : /* @__PURE__ */ jsx3("div", { className: "fds-diff-section__element-head", children: lines }),
205
+ element.sourceUrl != null && /* @__PURE__ */ jsx3(ViewSource, { href: element.sourceUrl, label: element.sourceLabel ?? "View source" }),
203
206
  hasDetail && open && /* @__PURE__ */ jsx3("div", { className: "fds-diff-section__detail", children: element.detail })
204
207
  ]
205
208
  }
@@ -217,6 +220,47 @@ function DiffPropertyList({ properties, className, ...rest }) {
217
220
  line.trailing != null && /* @__PURE__ */ jsx3("span", { className: "fds-diff-section__trailing", children: line.trailing })
218
221
  ] }, `${line.property}-${li}`)) });
219
222
  }
223
+ function ViewSource({ href, label }) {
224
+ return /* @__PURE__ */ jsxs3(
225
+ "a",
226
+ {
227
+ className: "fds-diff-section__source",
228
+ href,
229
+ target: "_blank",
230
+ rel: "noreferrer noopener",
231
+ onClick: (e) => e.stopPropagation(),
232
+ children: [
233
+ /* @__PURE__ */ jsx3("span", { className: "fds-diff-section__source-label", children: label }),
234
+ /* @__PURE__ */ jsx3("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx3(
235
+ "path",
236
+ {
237
+ d: "M7.5 12.5 12.5 7.5M8 7.5h4.5V12",
238
+ stroke: "currentColor",
239
+ strokeWidth: "1.5",
240
+ strokeLinecap: "round",
241
+ strokeLinejoin: "round"
242
+ }
243
+ ) })
244
+ ]
245
+ }
246
+ );
247
+ }
248
+ function HeaderChevron({ expanded }) {
249
+ const classes = [
250
+ "fds-diff-section__header-chevron",
251
+ expanded && "fds-diff-section__header-chevron--expanded"
252
+ ].filter(Boolean).join(" ");
253
+ return /* @__PURE__ */ jsx3("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", className: classes, children: /* @__PURE__ */ jsx3(
254
+ "path",
255
+ {
256
+ d: "M5 11 9 7l4 4",
257
+ stroke: "currentColor",
258
+ strokeWidth: "1.5",
259
+ strokeLinecap: "round",
260
+ strokeLinejoin: "round"
261
+ }
262
+ ) });
263
+ }
220
264
  function Chevron2({ open, className }) {
221
265
  const classes = [
222
266
  "fds-diff-section__chevron",
package/dist/landing.css CHANGED
@@ -7,6 +7,7 @@
7
7
  --color-text: #171717;
8
8
  --color-text-secondary: #525252;
9
9
  --color-text-muted: #a3a3a3;
10
+ --color-text-tertiary: #737373;
10
11
  --color-border: #e5e5e5;
11
12
  --color-border-light: #f5f5f5;
12
13
  --color-border-strong: #d4d4d4;
@@ -45,6 +46,8 @@
45
46
  --color-actual-text: #dc2626;
46
47
  --color-focus: #ea580c;
47
48
  --color-info: #1d4ed8;
49
+ --color-info-strong: #2563eb;
50
+ --color-info-surface: #eff6ff;
48
51
  --font-display: 'Rethink Sans', system-ui, -apple-system, sans-serif;
49
52
  --font-body: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
50
53
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
package/dist/theme.css CHANGED
@@ -9,6 +9,7 @@
9
9
  --color-text: #171717;
10
10
  --color-text-secondary: #525252;
11
11
  --color-text-muted: #a3a3a3;
12
+ --color-text-tertiary: #737373;
12
13
  --color-border: #e5e5e5;
13
14
  --color-border-light: #f5f5f5;
14
15
  --color-border-strong: #d4d4d4;
@@ -47,6 +48,8 @@
47
48
  --color-actual-text: #dc2626;
48
49
  --color-focus: #ea580c;
49
50
  --color-info: #1d4ed8;
51
+ --color-info-strong: #2563eb;
52
+ --color-info-surface: #eff6ff;
50
53
  --font-display: 'Rethink Sans', system-ui, -apple-system, sans-serif;
51
54
  --font-body: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
52
55
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
package/dist/webapp.css CHANGED
@@ -7,6 +7,7 @@
7
7
  --color-text: #171717;
8
8
  --color-text-secondary: #525252;
9
9
  --color-text-muted: #a3a3a3;
10
+ --color-text-tertiary: #737373;
10
11
  --color-border: #e5e5e5;
11
12
  --color-border-light: #f5f5f5;
12
13
  --color-border-strong: #d4d4d4;
@@ -45,6 +46,8 @@
45
46
  --color-actual-text: #dc2626;
46
47
  --color-focus: #ea580c;
47
48
  --color-info: #1d4ed8;
49
+ --color-info-strong: #2563eb;
50
+ --color-info-surface: #eff6ff;
48
51
  --font-display: 'Rethink Sans', system-ui, -apple-system, sans-serif;
49
52
  --font-body: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
50
53
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usefidel/design-system",
3
- "version": "0.10.0",
3
+ "version": "0.11.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",
@@ -60,6 +60,10 @@
60
60
  "$value": "#a3a3a3",
61
61
  "$type": "color"
62
62
  },
63
+ "text-tertiary": {
64
+ "$value": "#737373",
65
+ "$type": "color"
66
+ },
63
67
  "border": {
64
68
  "$value": "#e5e5e5",
65
69
  "$type": "color",
@@ -251,6 +255,14 @@
251
255
  "info": {
252
256
  "$value": "#1d4ed8",
253
257
  "$type": "color"
258
+ },
259
+ "info-strong": {
260
+ "$value": "#2563eb",
261
+ "$type": "color"
262
+ },
263
+ "info-surface": {
264
+ "$value": "#eff6ff",
265
+ "$type": "color"
254
266
  }
255
267
  },
256
268
  "font": {