@hirobius/design-system 0.20.0 → 0.22.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/AGENTS.md +125 -0
- package/CHANGELOG.md +969 -0
- package/CONSUMING.md +27 -11
- package/DESIGN.md +28 -17
- package/MIGRATIONS.md +603 -0
- package/NOTICE.md +1 -1
- package/README.md +39 -5
- package/UPGRADING.md +222 -0
- package/codemods/hds-prefix.mjs +28 -13
- package/codemods/jsx-fold.mjs +28 -13
- package/codemods/lib/atomic-write.mjs +28 -0
- package/codemods/lib/installed-version.mjs +354 -0
- package/codemods/lib/project.mjs +395 -0
- package/codemods/lib/record.mjs +110 -0
- package/codemods/lib/scan.mjs +323 -0
- package/codemods/lib/semver.mjs +57 -0
- package/codemods/not-found-pattern.mjs +3 -3
- package/codemods/patterns-subpath.mjs +28 -12
- package/codemods/registry.mjs +67 -0
- package/codemods/tile-grid.mjs +3 -3
- package/codemods/upgrade.mjs +909 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- package/dist/fonts/geist-mono-400.woff2 +0 -0
- package/dist/fonts/satoshi-400.woff2 +0 -0
- package/dist/fonts/satoshi-500.woff2 +0 -0
- package/dist/fonts/satoshi-700.woff2 +0 -0
- package/dist/fonts.css +53 -0
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +876 -877
- package/dist/manifest.js +3 -3
- package/dist/patterns.js +189 -170
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +136 -57
- package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
- package/dist/types/src/app/components/alert.d.ts +1 -1
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +1 -0
- package/dist/types/src/app/components/avatar.d.ts +1 -1
- package/dist/types/src/app/components/badge.d.ts +2 -2
- package/dist/types/src/app/components/blockquote.d.ts +1 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
- package/dist/types/src/app/components/button.d.ts +3 -1
- package/dist/types/src/app/components/callout.d.ts +1 -1
- package/dist/types/src/app/components/card.d.ts +4 -3
- package/dist/types/src/app/components/checkbox.d.ts +1 -1
- package/dist/types/src/app/components/code-block.d.ts +1 -1
- package/dist/types/src/app/components/combobox.d.ts +1 -1
- package/dist/types/src/app/components/data-table-section.d.ts +1 -0
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +2 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -1
- package/dist/types/src/app/components/divider.d.ts +1 -1
- package/dist/types/src/app/components/empty-state.d.ts +1 -1
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -1
- package/dist/types/src/app/components/form-actions.d.ts +1 -0
- package/dist/types/src/app/components/form-control.d.ts +10 -0
- package/dist/types/src/app/components/form.d.ts +1 -1
- package/dist/types/src/app/components/grid.d.ts +5 -0
- package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-link.d.ts +1 -1
- package/dist/types/src/app/components/input.d.ts +1 -1
- package/dist/types/src/app/components/kbd.d.ts +1 -0
- package/dist/types/src/app/components/menu.d.ts +1 -1
- package/dist/types/src/app/components/metadata-list.d.ts +1 -0
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/pagination.d.ts +1 -1
- package/dist/types/src/app/components/popover.d.ts +1 -1
- package/dist/types/src/app/components/progress.d.ts +2 -2
- package/dist/types/src/app/components/radio.d.ts +1 -1
- package/dist/types/src/app/components/select.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +2 -2
- package/dist/types/src/app/components/slider.d.ts +1 -1
- package/dist/types/src/app/components/spinner.d.ts +1 -1
- package/dist/types/src/app/components/stat.d.ts +5 -4
- package/dist/types/src/app/components/status-list-item.d.ts +1 -1
- package/dist/types/src/app/components/status-tile.d.ts +4 -3
- package/dist/types/src/app/components/table.d.ts +6 -1
- package/dist/types/src/app/components/tabs.d.ts +1 -1
- package/dist/types/src/app/components/tag.d.ts +1 -1
- package/dist/types/src/app/components/text.d.ts +53 -6
- package/dist/types/src/app/components/textarea.d.ts +1 -1
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -1
- package/dist/types/src/app/components/toggle.d.ts +1 -1
- package/dist/types/src/app/data/manifest-types.d.ts +4 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +37 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +3 -0
- package/dist/types/src/app/design-system/tokens.d.ts +117 -15
- package/dist/types/src/index.d.ts +122 -72
- package/dist/variables.css +41 -33
- package/docs/CONSUMING.md +63 -39
- package/hirobius.tokens.json +163 -112
- package/llms.txt +158 -50
- package/mcp/catalog.mjs +369 -0
- package/mcp/core-set.mjs +66 -0
- package/mcp/guide.mjs +272 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +53 -11
- package/public/hds-manifest.json +430 -336
- package/public/llms/components.txt +4 -3
- package/public/llms/layout.txt +1 -1
- package/public/llms-full.txt +190 -70
- package/public/llms.txt +158 -50
- package/scripts/eslint-plugin-hds/index.d.mts +29 -0
- package/scripts/eslint-plugin-hds/index.mjs +55 -0
- package/scripts/eslint-plugin-hds/package.json +30 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
- package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
- package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
- package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
- package/src/app/data/component-api.json +154 -93
- package/upgrade/index.json +208 -0
- package/upgrade/releases/0.17.0.json +962 -0
- package/upgrade/releases/0.18.0.json +8 -0
- package/upgrade/releases/0.19.0.json +233 -0
- package/upgrade/releases/0.19.1.json +8 -0
- package/upgrade/releases/0.20.0.json +5108 -0
- package/upgrade/releases/0.21.0.json +538 -0
- package/upgrade/releases/0.22.0.json +94 -0
- package/upgrade/schema.json +989 -0
- package/dist/chunks/empty-state-BBqhCx0S.js +0 -1217
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/status-dot.d.ts +0 -39
package/dist/tokens.js
CHANGED
|
@@ -134,7 +134,8 @@ const a = {
|
|
|
134
134
|
"3xl": "30px",
|
|
135
135
|
"4xl": "36px",
|
|
136
136
|
"5xl": "48px",
|
|
137
|
-
"6xl": "60px"
|
|
137
|
+
"6xl": "60px",
|
|
138
|
+
code: "13px"
|
|
138
139
|
},
|
|
139
140
|
weight: {
|
|
140
141
|
regular: "400",
|
|
@@ -147,7 +148,9 @@ const a = {
|
|
|
147
148
|
tight: "1.25",
|
|
148
149
|
snug: "1.375",
|
|
149
150
|
normal: "1.5",
|
|
150
|
-
relaxed: "1.625"
|
|
151
|
+
relaxed: "1.625",
|
|
152
|
+
display: "1.05",
|
|
153
|
+
body: "1.6"
|
|
151
154
|
},
|
|
152
155
|
letterSpacing: {
|
|
153
156
|
tight: "-0.01em",
|
|
@@ -258,26 +261,12 @@ const a = {
|
|
|
258
261
|
letterSpacing: "var(--semantic-typography-display-letter-spacing)",
|
|
259
262
|
lineHeight: "var(--semantic-typography-display-line-height)"
|
|
260
263
|
},
|
|
261
|
-
|
|
262
|
-
fontFamily: "var(--semantic-typography-
|
|
263
|
-
fontSize: "var(--semantic-typography-
|
|
264
|
-
fontWeight: "var(--semantic-typography-
|
|
265
|
-
letterSpacing: "var(--semantic-typography-
|
|
266
|
-
lineHeight: "var(--semantic-typography-
|
|
267
|
-
},
|
|
268
|
-
h2: {
|
|
269
|
-
fontFamily: "var(--semantic-typography-h2-font-family)",
|
|
270
|
-
fontSize: "var(--semantic-typography-h2-font-size)",
|
|
271
|
-
fontWeight: "var(--semantic-typography-h2-font-weight)",
|
|
272
|
-
letterSpacing: "var(--semantic-typography-h2-letter-spacing)",
|
|
273
|
-
lineHeight: "var(--semantic-typography-h2-line-height)"
|
|
274
|
-
},
|
|
275
|
-
h3: {
|
|
276
|
-
fontFamily: "var(--semantic-typography-h3-font-family)",
|
|
277
|
-
fontSize: "var(--semantic-typography-h3-font-size)",
|
|
278
|
-
fontWeight: "var(--semantic-typography-h3-font-weight)",
|
|
279
|
-
letterSpacing: "var(--semantic-typography-h3-letter-spacing)",
|
|
280
|
-
lineHeight: "var(--semantic-typography-h3-line-height)"
|
|
264
|
+
title: {
|
|
265
|
+
fontFamily: "var(--semantic-typography-title-font-family)",
|
|
266
|
+
fontSize: "var(--semantic-typography-title-font-size)",
|
|
267
|
+
fontWeight: "var(--semantic-typography-title-font-weight)",
|
|
268
|
+
letterSpacing: "var(--semantic-typography-title-letter-spacing)",
|
|
269
|
+
lineHeight: "var(--semantic-typography-title-line-height)"
|
|
281
270
|
},
|
|
282
271
|
body: {
|
|
283
272
|
fontFamily: "var(--semantic-typography-body-font-family)",
|
|
@@ -302,14 +291,6 @@ const a = {
|
|
|
302
291
|
letterSpacing: "var(--semantic-typography-caption-letter-spacing)",
|
|
303
292
|
lineHeight: "var(--semantic-typography-caption-line-height)"
|
|
304
293
|
},
|
|
305
|
-
eyebrow: {
|
|
306
|
-
fontFamily: "var(--semantic-typography-eyebrow-font-family)",
|
|
307
|
-
fontSize: "var(--semantic-typography-eyebrow-font-size)",
|
|
308
|
-
fontWeight: "var(--semantic-typography-eyebrow-font-weight)",
|
|
309
|
-
letterSpacing: "var(--semantic-typography-eyebrow-letter-spacing)",
|
|
310
|
-
lineHeight: "var(--semantic-typography-eyebrow-line-height)",
|
|
311
|
-
textTransform: "var(--semantic-typography-eyebrow-text-transform)"
|
|
312
|
-
},
|
|
313
294
|
mono: {
|
|
314
295
|
fontFamily: "var(--semantic-typography-mono-font-family)",
|
|
315
296
|
fontSize: "var(--semantic-typography-mono-font-size)",
|
|
@@ -538,52 +519,150 @@ const o = "var(--primitive-typography-family-primary)", n = "var(--primitive-typ
|
|
|
538
519
|
}
|
|
539
520
|
},
|
|
540
521
|
typography: {
|
|
522
|
+
/** @deprecated hds#483 — use `typeStyles.ui`.
|
|
523
|
+
* @removeIn 1.0.0 */
|
|
541
524
|
label: i.semantic.typography.ui,
|
|
525
|
+
/** @deprecated hds#483 — use `typeStyles.ui`.
|
|
526
|
+
* @removeIn 1.0.0 */
|
|
542
527
|
labelDescriptive: i.semantic.typography.ui,
|
|
528
|
+
/** @deprecated hds#483 — use `typeStyles.mono`.
|
|
529
|
+
* @removeIn 1.0.0 */
|
|
543
530
|
labelTechnical: i.semantic.typography.mono
|
|
544
531
|
}
|
|
545
532
|
},
|
|
546
533
|
// Each style object spreads directly into a React inline style prop.
|
|
547
534
|
// CSS vars resolve at paint time — no hardcoded pixel values.
|
|
548
535
|
typeStyles: {
|
|
549
|
-
// ──
|
|
550
|
-
//
|
|
551
|
-
//
|
|
552
|
-
// never re-apply textTransform inline. Casing changes are eyebrow-only.
|
|
536
|
+
// ── The 5-role ramp plus mono (hds#483) ───────────────────────────────────
|
|
537
|
+
// display 48 / title 24 / body 16 / ui 14 / caption 12 / mono 13. body, ui
|
|
538
|
+
// and mono carry maxWidth: 60ch. Casing is never changed inline.
|
|
553
539
|
display: i.semantic.typography.display,
|
|
554
|
-
|
|
555
|
-
h2: i.semantic.typography.h2,
|
|
556
|
-
h3: i.semantic.typography.h3,
|
|
540
|
+
title: i.semantic.typography.title,
|
|
557
541
|
body: i.semantic.typography.body,
|
|
558
542
|
ui: i.semantic.typography.ui,
|
|
559
|
-
eyebrow: i.semantic.typography.eyebrow,
|
|
560
|
-
mono: i.semantic.typography.mono,
|
|
561
|
-
// ── Migration aliases → canonical composites ──────────────────────────────
|
|
562
|
-
// Pre-2026-05-04 names map to the new roles. small → ui; the eyebrow-pattern
|
|
563
|
-
// callsites migrate explicitly to typeStyles.eyebrow as part of the
|
|
564
|
-
// ops-dashboard sweep. caption now resolves to its own 12/16 composite
|
|
565
|
-
// (semantic.typography.caption, matching Figma) rather than aliasing ui.
|
|
566
|
-
small: i.semantic.typography.ui,
|
|
567
543
|
caption: i.semantic.typography.caption,
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
544
|
+
mono: i.semantic.typography.mono,
|
|
545
|
+
// ── Deprecated aliases → the six roles ────────────────────────────────────
|
|
546
|
+
// Every pre-cut name still resolves, to the role it now points at.
|
|
547
|
+
/**
|
|
548
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
549
|
+
* @removeIn 1.0.0
|
|
550
|
+
*/
|
|
551
|
+
h1: i.semantic.typography.title,
|
|
552
|
+
/**
|
|
553
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
554
|
+
* @removeIn 1.0.0
|
|
555
|
+
*/
|
|
556
|
+
h2: i.semantic.typography.title,
|
|
557
|
+
/**
|
|
558
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
559
|
+
* @removeIn 1.0.0
|
|
560
|
+
*/
|
|
561
|
+
h3: i.semantic.typography.title,
|
|
562
|
+
/**
|
|
563
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
564
|
+
* @removeIn 1.0.0
|
|
565
|
+
*/
|
|
566
|
+
heading1: i.semantic.typography.title,
|
|
567
|
+
/**
|
|
568
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
569
|
+
* @removeIn 1.0.0
|
|
570
|
+
*/
|
|
571
|
+
heading2: i.semantic.typography.title,
|
|
572
|
+
/**
|
|
573
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
574
|
+
* @removeIn 1.0.0
|
|
575
|
+
*/
|
|
576
|
+
heading3: i.semantic.typography.title,
|
|
577
|
+
/**
|
|
578
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
579
|
+
* @removeIn 1.0.0
|
|
580
|
+
*/
|
|
581
|
+
headingHero: i.semantic.typography.title,
|
|
582
|
+
/**
|
|
583
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
584
|
+
* @removeIn 1.0.0
|
|
585
|
+
*/
|
|
586
|
+
headingSection: i.semantic.typography.title,
|
|
587
|
+
/**
|
|
588
|
+
* @deprecated hds#483 — use `typeStyles.title`.
|
|
589
|
+
* @removeIn 1.0.0
|
|
590
|
+
*/
|
|
591
|
+
display2: i.semantic.typography.title,
|
|
592
|
+
/**
|
|
593
|
+
* @deprecated hds#483 — use `typeStyles.display`.
|
|
594
|
+
* @removeIn 1.0.0
|
|
595
|
+
*/
|
|
574
596
|
displayXl: i.semantic.typography.display,
|
|
597
|
+
/**
|
|
598
|
+
* @deprecated hds#483 — use `typeStyles.display`.
|
|
599
|
+
* @removeIn 1.0.0
|
|
600
|
+
*/
|
|
575
601
|
display1: i.semantic.typography.display,
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
602
|
+
/**
|
|
603
|
+
* @deprecated hds#483 — use `typeStyles.body`.
|
|
604
|
+
* @removeIn 1.0.0
|
|
605
|
+
*/
|
|
580
606
|
body2: i.semantic.typography.body,
|
|
607
|
+
/**
|
|
608
|
+
* @deprecated hds#483 — use `typeStyles.body`.
|
|
609
|
+
* @removeIn 1.0.0
|
|
610
|
+
*/
|
|
581
611
|
bodyLarge: i.semantic.typography.body,
|
|
612
|
+
/**
|
|
613
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
614
|
+
* @removeIn 1.0.0
|
|
615
|
+
*/
|
|
616
|
+
small: i.semantic.typography.ui,
|
|
617
|
+
/**
|
|
618
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
619
|
+
* @removeIn 1.0.0
|
|
620
|
+
*/
|
|
582
621
|
bodySmall: i.semantic.typography.ui,
|
|
583
|
-
|
|
584
|
-
|
|
622
|
+
/**
|
|
623
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
624
|
+
* @removeIn 1.0.0
|
|
625
|
+
*/
|
|
585
626
|
label: i.semantic.typography.ui,
|
|
627
|
+
/**
|
|
628
|
+
* @deprecated hds#483 — use `typeStyles.ui`.
|
|
629
|
+
* @removeIn 1.0.0
|
|
630
|
+
*/
|
|
586
631
|
labelDescriptive: i.semantic.typography.ui,
|
|
632
|
+
/**
|
|
633
|
+
* @deprecated hds#483 — use `typeStyles.caption`.
|
|
634
|
+
* @removeIn 1.0.0
|
|
635
|
+
*/
|
|
636
|
+
eyebrow: i.semantic.typography.caption,
|
|
637
|
+
/**
|
|
638
|
+
* @deprecated hds#483 — use `typeStyles.caption`.
|
|
639
|
+
* @removeIn 1.0.0
|
|
640
|
+
*/
|
|
641
|
+
badge: i.semantic.typography.caption,
|
|
642
|
+
/**
|
|
643
|
+
* @deprecated hds#483 — use `typeStyles.caption`.
|
|
644
|
+
* @removeIn 1.0.0
|
|
645
|
+
*/
|
|
646
|
+
micro: i.semantic.typography.caption,
|
|
647
|
+
/**
|
|
648
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
649
|
+
* @removeIn 1.0.0
|
|
650
|
+
*/
|
|
651
|
+
technical: i.semantic.typography.mono,
|
|
652
|
+
/**
|
|
653
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
654
|
+
* @removeIn 1.0.0
|
|
655
|
+
*/
|
|
656
|
+
monoXs: i.semantic.typography.mono,
|
|
657
|
+
/**
|
|
658
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
659
|
+
* @removeIn 1.0.0
|
|
660
|
+
*/
|
|
661
|
+
monoSm: i.semantic.typography.mono,
|
|
662
|
+
/**
|
|
663
|
+
* @deprecated hds#483 — use `typeStyles.mono`.
|
|
664
|
+
* @removeIn 1.0.0
|
|
665
|
+
*/
|
|
587
666
|
labelTechnical: i.semantic.typography.mono
|
|
588
667
|
},
|
|
589
668
|
// ── Icons ────────────────────────────────────────────────────────────────────
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* AlertDialog — modal confirmation dialog on Radix AlertDialog.
|
|
3
3
|
* @category Overlays
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2035-24
|
|
5
6
|
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
6
7
|
*
|
|
7
8
|
* Radix AlertDialog (@radix-ui/react-alert-dialog) themed with the overlay role
|
|
@@ -58,6 +59,10 @@ interface AlertDialogComponent extends React.FC<React.ComponentProps<typeof Aler
|
|
|
58
59
|
/**
|
|
59
60
|
* AlertDialog root + parts. Controlled via `open`/`onOpenChange`, or
|
|
60
61
|
* uncontrolled with `defaultOpen`.
|
|
62
|
+
* @usage Confirm a destructive or irreversible action (delete, archive, remove) before it runs, with Cancel and Action buttons.
|
|
63
|
+
* @whenNot A modal that collects input or shows content, or a confirmation after the action is done.
|
|
64
|
+
* @useInstead Dialog a modal with a form or other content
|
|
65
|
+
* @useInstead ToastProvider a brief confirmation after the action
|
|
61
66
|
* @public
|
|
62
67
|
*/
|
|
63
68
|
export declare const AlertDialog: AlertDialogComponent;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A brief confirmation that should disappear on its own, or a status label.
|
|
7
7
|
* @useInstead ToastProvider a brief confirmation that fades away
|
|
8
8
|
* @useInstead Badge a short status label
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=33-34
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
12
|
type AlertTone = 'success' | 'danger' | 'warning' | 'info';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* AvatarGroup — an overlapping cluster of Avatars with an overflow count.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2030-63
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A generic pictogram, or a status marker.
|
|
7
7
|
* @useInstead Icon a generic pictogram
|
|
8
8
|
* @useInstead Badge a status marker
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=34-18
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot A chip people can toggle, or a message that needs a sentence.
|
|
7
7
|
* @useInstead Tag an interactive filter or category chip
|
|
8
8
|
* @useInstead Alert a message that needs a sentence
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=31-15
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -22,7 +22,7 @@ export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>,
|
|
|
22
22
|
dot?: boolean;
|
|
23
23
|
/** Dot diameter; used only with `dot`. */
|
|
24
24
|
size?: 'sm' | 'md' | 'lg';
|
|
25
|
-
/** Names
|
|
25
|
+
/** Names a `dot` badge: role="img" with this aria-label. Without it the dot is aria-hidden. A text badge ignores it: put the text in `children`. */
|
|
26
26
|
label?: string;
|
|
27
27
|
}
|
|
28
28
|
/** Compact metadata/status chip. Tone is the only styling input. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Blockquote — quoted passage with an optional attribution.
|
|
3
3
|
* @category Typography
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2024-18
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot Switching between sibling views, or stepping through pages of results.
|
|
7
7
|
* @useInstead Tabs switching between sibling views
|
|
8
8
|
* @useInstead Pagination stepping through pages of results
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=86-159
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
/** @public */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category Actions
|
|
3
3
|
* @tier primitive
|
|
4
|
-
* @figma https://www.figma.com/design/
|
|
4
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=28-138
|
|
5
5
|
* @figma Variant=Button/Variant
|
|
6
6
|
* @figma Size=Button/Size
|
|
7
7
|
*/
|
|
@@ -40,6 +40,8 @@ declare const buttonVariants: (props?: ({
|
|
|
40
40
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
41
41
|
/** @public */
|
|
42
42
|
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled'>, Omit<ButtonVariantProps, 'iconOnly'> {
|
|
43
|
+
/** Visual treatment: `primary`, `secondary` or `tertiary`. Defaults to `secondary` (an outline), so pass `primary` for the main action. */
|
|
44
|
+
variant?: ButtonVariantProps['variant'];
|
|
43
45
|
/** Render the button chrome onto a single child element for link semantics. */
|
|
44
46
|
asChild?: boolean;
|
|
45
47
|
/** Optional accessible label used when children are not suitable as the name. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category Feedback
|
|
3
3
|
* @tier primitive
|
|
4
|
-
* @figma https://www.figma.com/design/
|
|
4
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-85
|
|
5
5
|
*/
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* zone (right-aligned, holds <Badge> / <Tag> for status, never raw spans).
|
|
23
23
|
* - Progress: full-width 4px bar in a reserved 16px vertical rail. Owns its
|
|
24
24
|
* spacing — never crowds adjacent prose.
|
|
25
|
-
* - Metric: single label
|
|
25
|
+
* - Metric: single label + big value (title) + optional sub-line.
|
|
26
26
|
* Reserved vertical block. Use multiple side-by-side via flex/grid container.
|
|
27
27
|
* - Body: prose, lists, structured content. NO inline status, progress, or
|
|
28
28
|
* thin colored bars. Group sections via separate <Card.Body> blocks.
|
|
@@ -130,15 +130,16 @@ export interface CardMetricProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
130
130
|
tone?: CardTone;
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
|
-
* Card.Metric — one
|
|
133
|
+
* Card.Metric — one label, a large value and an optional sub-line inside a Card.
|
|
134
134
|
* @usage Show one headline figure (a KPI, a count, a total) with its label inside a Card.
|
|
135
135
|
* @whenNot A metric outside a Card, or several figures that share one label.
|
|
136
|
+
* @useInstead MetricTiles a row of headline numbers with no enclosing Card
|
|
136
137
|
*/
|
|
137
138
|
declare const CardMetric: React.ForwardRefExoticComponent<CardMetricProps & React.RefAttributes<HTMLDivElement>>;
|
|
138
139
|
/**
|
|
139
140
|
* Tagged per-export, not on the file block: this module exports eight
|
|
140
141
|
* components and a file-level @figma would hand all eight this one node.
|
|
141
|
-
* @figma https://www.figma.com/design/
|
|
142
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=39-11
|
|
142
143
|
* @usage Group related content on a raised surface with header, body, footer and metric slots, or as one selectable option.
|
|
143
144
|
* @whenNot A bare padded background with no slot anatomy, or a single headline figure.
|
|
144
145
|
* @useInstead Surface a padded background without slot anatomy
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot An immediate on/off setting, or a choice of exactly one option from a set.
|
|
7
7
|
* @useInstead Toggle a setting that applies as soon as it flips
|
|
8
8
|
* @useInstead Radio exactly one choice from a set
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=35-29
|
|
10
10
|
*/
|
|
11
11
|
import type { InputHTMLAttributes } from 'react';
|
|
12
12
|
/** Checkbox — custom-drawn checkbox with check / indeterminate glyph. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* CodeBlock - code display with copy button and optional collapsible toggle.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @figma https://www.figma.com/design/
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=89-154
|
|
6
6
|
*/
|
|
7
7
|
declare const blockContainerVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
8
8
|
declare const inlineWrapperVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @keyboard Enter Commits the active option and closes the list; with `multiple`, toggles it and keeps the list open.
|
|
13
13
|
* @keyboard Escape Closes the list.
|
|
14
14
|
* @keyboard Tab Stays inside the open list.
|
|
15
|
-
* @figma https://www.figma.com/design/
|
|
15
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=82-237
|
|
16
16
|
* @doc-exempt: no Inputs-overlay doc page yet — add demo when created
|
|
17
17
|
*
|
|
18
18
|
* A select-with-search built on the HDS Popover. The trigger shows the current
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* DataTableSection - a titled table with a toolbar, row actions and an empty state.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2075-268
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { type TableColumn } from './table.js';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* DestructiveSection - the one place a screen puts an irreversible action.
|
|
3
3
|
* @category Actions
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2076-3
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
/** @public */
|
|
@@ -84,6 +84,7 @@ interface DialogComponent extends React.FC<DialogProps> {
|
|
|
84
84
|
* @useInstead Tooltip a short hint on hover or focus
|
|
85
85
|
* @useInstead Alert a message that needs no reply
|
|
86
86
|
* @useInstead ToastProvider a brief confirmation
|
|
87
|
+
* @useInstead AlertDialog confirming a destructive or irreversible action
|
|
87
88
|
* @slot trigger The element that opens the dialog (Dialog.Trigger).
|
|
88
89
|
* @slot overlay The scrim that dims the page behind the dialog (Dialog.Overlay).
|
|
89
90
|
* @slot surface The modal surface (Dialog.Content).
|
|
@@ -96,7 +97,7 @@ interface DialogComponent extends React.FC<DialogProps> {
|
|
|
96
97
|
* @keyboard Escape Closes the dialog and returns focus to the trigger.
|
|
97
98
|
* @keyboard Tab Cycles focus inside the open dialog.
|
|
98
99
|
* @keyboard Shift+Tab Cycles focus backwards inside the open dialog.
|
|
99
|
-
* @figma https://www.figma.com/design/
|
|
100
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=93-27
|
|
100
101
|
*/
|
|
101
102
|
export declare const Dialog: DialogComponent;
|
|
102
103
|
export { DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogClose, };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @usage Hide optional explanatory content behind a heading that people can expand.
|
|
6
6
|
* @whenNot Content people must see, or switching between panels.
|
|
7
7
|
* @useInstead Tabs switching between panels of content
|
|
8
|
-
* @figma https://www.figma.com/design/
|
|
8
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-453
|
|
9
9
|
*/
|
|
10
10
|
import React, { type CSSProperties, type ReactNode } from 'react';
|
|
11
11
|
type DisclosureVariant = 'panel' | 'nav' | 'card';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot Spacing alone would do, or the separation needs a container.
|
|
7
7
|
* @useInstead Stack gap-based spacing between siblings
|
|
8
8
|
* @useInstead Surface a bounded region with its own background
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=89-26
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot Content that is still loading, or a full-page error.
|
|
7
7
|
* @useInstead Skeleton content that is still loading
|
|
8
8
|
* @useInstead Alert a message about something that went wrong
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=88-352
|
|
10
10
|
* @ai-intent Inline empty-state placeholder so any list, grid, or section can
|
|
11
11
|
* communicate "no data yet" with consistent muted typography instead of agents
|
|
12
12
|
* inventing one-off `<p>No items.</p>` lines.
|
|
@@ -3,8 +3,13 @@ export type ErrorPatternProps = {
|
|
|
3
3
|
displayText?: string;
|
|
4
4
|
/** Supporting message explaining the recovery state to the user. */
|
|
5
5
|
message?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Fill the viewport height and centre the surface in it, for a routed error page.
|
|
8
|
+
* Off by default: the pattern then fits its container and never exceeds it.
|
|
9
|
+
*/
|
|
10
|
+
fullPage?: boolean;
|
|
6
11
|
};
|
|
7
12
|
/**
|
|
8
13
|
* @public
|
|
9
14
|
*/
|
|
10
|
-
export declare function ErrorPattern({ displayText, message, }: ErrorPatternProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ErrorPattern({ displayText, message, fullPage, }: ErrorPatternProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @whenNot Editable input, or a single headline figure.
|
|
6
6
|
* @useInstead Input an editable single-line value
|
|
7
7
|
* @useInstead Card.Metric a headline figure inside a Card
|
|
8
|
-
* @figma https://www.figma.com/design/
|
|
8
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=85-81
|
|
9
9
|
*/
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* FormActions - the footer row of a form: primary right-most, secondary to its left.
|
|
3
3
|
* @category Actions
|
|
4
4
|
* @tier pattern
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2075-87
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
/** @public */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared width contract for text-entry form controls (Input, Textarea, Select,
|
|
3
|
+
* Combobox, Slider): they fill their container up to a maximum, so a field in
|
|
4
|
+
* a wide Surface does not stretch to 1152px (hds#522).
|
|
5
|
+
*
|
|
6
|
+
* The cap is 40rem by default. Override it per tree or per control by setting
|
|
7
|
+
* the `--hds-form-control-max-width` custom property (any CSS length, or
|
|
8
|
+
* `none`), or pass `className="max-w-none"` where the control takes one.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FORM_CONTROL_WIDTH = "w-full max-w-[var(--hds-form-control-max-width,40rem)]";
|
|
@@ -37,7 +37,7 @@ export type FormProps = React.FormHTMLAttributes<HTMLFormElement>;
|
|
|
37
37
|
*
|
|
38
38
|
* Tagged per-export: FormField and FormFieldShell share this module and have no
|
|
39
39
|
* Figma node, so a file-level @figma would claim this one for all three.
|
|
40
|
-
* @figma https://www.figma.com/design/
|
|
40
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=85-94
|
|
41
41
|
*/
|
|
42
42
|
export declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
|
|
43
43
|
/** @public */
|
|
@@ -50,6 +50,11 @@ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
50
50
|
style?: CSSProperties;
|
|
51
51
|
/** Escape hatch: only use when tokenized props cannot express the required wrapper class. */
|
|
52
52
|
className?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Cross-axis alignment of items in a row. Defaults to 'start': items hug their
|
|
55
|
+
* own height. Pass 'stretch' where a row of tiles must share one height.
|
|
56
|
+
*/
|
|
57
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
53
58
|
/** Element rendered as the outer wrapper. Defaults to 'div'. */
|
|
54
59
|
as?: React.ElementType;
|
|
55
60
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Tooltip — accessible hover/focus tooltip on Radix (Overlays).
|
|
3
3
|
* @category Overlays
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @figma https://www.figma.com/design/
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=93-15
|
|
6
6
|
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
7
7
|
*
|
|
8
8
|
* Radix Tooltip (@radix-ui/react-tooltip) themed with role tokens. Provides
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Icon — semantic icon wrapper for Lucide icons.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=27-2
|
|
5
6
|
* @usage Draw a Lucide glyph at a size and colour from the design tokens.
|
|
6
7
|
* @whenNot A control someone can activate, or a picture that carries content.
|
|
7
8
|
* @useInstead Button a clickable control, with iconOnly for an icon-only one
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @whenNot An action that changes something, or a control that needs button styling.
|
|
7
7
|
* @useInstead Button an action or a link that needs button styling
|
|
8
8
|
* @useInstead Text unlinked body copy
|
|
9
|
-
* @figma https://www.figma.com/design/
|
|
9
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=89-161
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
12
|
export interface InlineLinkProps {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @useInstead Textarea multi-line text
|
|
8
8
|
* @useInstead Select a short fixed list
|
|
9
9
|
* @useInstead Combobox a long fixed list that needs search
|
|
10
|
-
* @figma https://www.figma.com/design/
|
|
10
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=38-20
|
|
11
11
|
*/
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import { type VariantProps } from 'class-variance-authority';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Kbd — inline keyboard key / shortcut hint rendered as a native <kbd>.
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2026-9
|
|
5
6
|
* @usage Show a keyboard key or shortcut hint inline, as a native kbd element.
|
|
6
7
|
* @whenNot Code samples, or a control that runs the shortcut.
|
|
7
8
|
* @useInstead Text inline code and other typography
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Menu — dropdown menu (shadcn baseline, compound parts).
|
|
3
3
|
* @category Overlays
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @figma https://www.figma.com/design/
|
|
5
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=93-59
|
|
6
6
|
* @doc-exempt: no Overlays doc page yet — add demo when the overlays page is created
|
|
7
7
|
*
|
|
8
8
|
* Radix DropdownMenu (@radix-ui/react-dropdown-menu) themed with the overlay
|