@hirobius/design-system 0.15.0 → 0.16.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/README.md +4 -4
- package/dist/hirobius-ui.js +5834 -4385
- package/dist/manifest.js +8 -8
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +40 -22
- package/dist/types/src/app/components/cinematic-link.d.ts +7 -1
- package/dist/types/src/app/components/component-instance-matrix.d.ts +7 -1
- package/dist/types/src/app/components/foundation-swatch.d.ts +6 -0
- package/dist/types/src/app/components/select.d.ts +29 -0
- package/dist/types/src/app/components/sketch.d.ts +6 -0
- package/dist/types/src/app/components/token.d.ts +7 -1
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +3 -6
- package/dist/types/src/app/design-system/generated-token-values.d.ts +2 -6
- package/dist/types/src/app/design-system/tokens.d.ts +0 -5
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -2
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +72 -0
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +8 -1
- package/dist/types/src/index.d.ts +23 -31
- package/dist/variables.css +58 -6
- package/hirobius.tokens.json +21 -31
- package/package.json +33 -21
- package/public/hds-manifest.json +1464 -177
- /package/dist/types/src/app/components/{lab/tokenUtils.d.ts → tokenUtils.d.ts} +0 -0
package/dist/tokens.js
CHANGED
|
@@ -125,7 +125,6 @@ const a = {
|
|
|
125
125
|
mono: ["Geist Mono", "Courier New", "monospace"]
|
|
126
126
|
},
|
|
127
127
|
size: {
|
|
128
|
-
"2xs": "10px",
|
|
129
128
|
xs: "13px",
|
|
130
129
|
sm: "15px",
|
|
131
130
|
base: "17px",
|
|
@@ -138,10 +137,8 @@ const a = {
|
|
|
138
137
|
"6xl": "80px"
|
|
139
138
|
},
|
|
140
139
|
weight: {
|
|
141
|
-
light: "300",
|
|
142
140
|
regular: "400",
|
|
143
141
|
medium: "500",
|
|
144
|
-
semibold: "600",
|
|
145
142
|
bold: "700"
|
|
146
143
|
},
|
|
147
144
|
lineHeight: {
|
|
@@ -153,11 +150,8 @@ const a = {
|
|
|
153
150
|
relaxed: "1.625"
|
|
154
151
|
},
|
|
155
152
|
letterSpacing: {
|
|
156
|
-
tighter: "-0.02em",
|
|
157
153
|
tight: "-0.01em",
|
|
158
154
|
normal: "0em",
|
|
159
|
-
wide: "0.01em",
|
|
160
|
-
wider: "0.02em",
|
|
161
155
|
caps: "0.06em"
|
|
162
156
|
}
|
|
163
157
|
},
|
|
@@ -197,10 +191,12 @@ const a = {
|
|
|
197
191
|
80: "80px",
|
|
198
192
|
96: "96px",
|
|
199
193
|
interactive: {
|
|
200
|
-
min: "44px"
|
|
194
|
+
min: "44px",
|
|
195
|
+
minCompact: "24px"
|
|
201
196
|
},
|
|
202
197
|
width: {
|
|
203
198
|
96: "96px",
|
|
199
|
+
280: "280px",
|
|
204
200
|
760: "760px",
|
|
205
201
|
1200: "1200px",
|
|
206
202
|
"50ch": "50ch"
|
|
@@ -399,8 +395,14 @@ const o = "var(--primitive-typography-family-primary)", n = "var(--primitive-typ
|
|
|
399
395
|
brandRGB: "30,46,253",
|
|
400
396
|
white: "var(--primitive-color-neutral-white)",
|
|
401
397
|
surface: {
|
|
402
|
-
page: {
|
|
403
|
-
|
|
398
|
+
page: {
|
|
399
|
+
dark: "var(--semantic-color-surface-page)",
|
|
400
|
+
light: "var(--semantic-color-surface-page)"
|
|
401
|
+
},
|
|
402
|
+
raised: {
|
|
403
|
+
dark: "var(--semantic-color-surface-raised)",
|
|
404
|
+
light: "var(--semantic-color-surface-raised)"
|
|
405
|
+
}
|
|
404
406
|
},
|
|
405
407
|
blue: {
|
|
406
408
|
50: "var(--primitive-color-blue-50)",
|
|
@@ -416,17 +418,28 @@ const o = "var(--primitive-typography-family-primary)", n = "var(--primitive-typ
|
|
|
416
418
|
900: "var(--primitive-color-blue-900)"
|
|
417
419
|
},
|
|
418
420
|
feedback: {
|
|
419
|
-
success: {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
success: {
|
|
422
|
+
dark: a.primitive.color.green[400],
|
|
423
|
+
light: a.primitive.color.green[700]
|
|
424
|
+
},
|
|
425
|
+
warning: {
|
|
426
|
+
dark: a.primitive.color.amber[400],
|
|
427
|
+
light: a.primitive.color.amber[800]
|
|
428
|
+
},
|
|
429
|
+
error: {
|
|
430
|
+
dark: a.primitive.color.red[400],
|
|
431
|
+
light: a.primitive.color.red[700]
|
|
432
|
+
},
|
|
433
|
+
info: {
|
|
434
|
+
dark: a.primitive.color.blue[300],
|
|
435
|
+
light: a.primitive.color.blue[500]
|
|
436
|
+
}
|
|
423
437
|
}
|
|
424
438
|
},
|
|
425
439
|
// ── Typography ───────────────────────────────────────────────────────────────
|
|
426
440
|
fontFamily: o,
|
|
427
441
|
monoFamily: n,
|
|
428
442
|
fontSize: {
|
|
429
|
-
"2xs": "var(--primitive-typography-size-2xs)",
|
|
430
443
|
xs: "var(--primitive-typography-size-xs)",
|
|
431
444
|
sm: "var(--primitive-typography-size-sm)",
|
|
432
445
|
base: "var(--primitive-typography-size-base)",
|
|
@@ -440,7 +453,6 @@ const o = "var(--primitive-typography-family-primary)", n = "var(--primitive-typ
|
|
|
440
453
|
fontWeight: {
|
|
441
454
|
regular: "var(--primitive-typography-weight-regular)",
|
|
442
455
|
medium: "var(--primitive-typography-weight-medium)",
|
|
443
|
-
semibold: "var(--primitive-typography-weight-semibold)",
|
|
444
456
|
bold: "var(--primitive-typography-weight-bold)"
|
|
445
457
|
},
|
|
446
458
|
lineHeight: {
|
|
@@ -452,11 +464,8 @@ const o = "var(--primitive-typography-family-primary)", n = "var(--primitive-typ
|
|
|
452
464
|
relaxed: "var(--primitive-typography-lineHeight-relaxed)"
|
|
453
465
|
},
|
|
454
466
|
letterSpacing: {
|
|
455
|
-
tighter: "var(--primitive-typography-letterSpacing-tighter)",
|
|
456
467
|
tight: "var(--primitive-typography-letterSpacing-tight)",
|
|
457
|
-
normal: "var(--primitive-typography-letterSpacing-normal)"
|
|
458
|
-
wide: "var(--primitive-typography-letterSpacing-wide)",
|
|
459
|
-
wider: "var(--primitive-typography-letterSpacing-wider)"
|
|
468
|
+
normal: "var(--primitive-typography-letterSpacing-normal)"
|
|
460
469
|
},
|
|
461
470
|
semantic: {
|
|
462
471
|
color: {
|
|
@@ -547,12 +556,21 @@ const o = "var(--primitive-typography-family-primary)", n = "var(--primitive-typ
|
|
|
547
556
|
labelTechnical: i.semantic.typography.mono
|
|
548
557
|
},
|
|
549
558
|
// ── Icons ────────────────────────────────────────────────────────────────────
|
|
559
|
+
// Sized off primitive.size, NOT the type ramp. An icon is geometry: it sits
|
|
560
|
+
// beside text, it does not scale with it. These were pointed at
|
|
561
|
+
// typography.size.base/lg/xl, which happened to read 16/20/24 — so the
|
|
562
|
+
// coupling was invisible until the ramp moved. Rescaling the ramp (hds#283)
|
|
563
|
+
// would have silently shrunk every medium icon 20→18 and every large 24→20,
|
|
564
|
+
// for no typographic reason, and no gate would have said a word.
|
|
565
|
+
//
|
|
566
|
+
// component.button.size.*.iconSize already referenced primitive.size; this
|
|
567
|
+
// brings the global bridge in line with what the component tokens do.
|
|
550
568
|
iconSize: {
|
|
551
|
-
small: "var(--primitive-
|
|
569
|
+
small: "var(--primitive-size-16)",
|
|
552
570
|
// 16px — default icon size
|
|
553
|
-
medium: "var(--primitive-
|
|
571
|
+
medium: "var(--primitive-size-20)",
|
|
554
572
|
// 20px — prominent icons
|
|
555
|
-
large: "var(--primitive-
|
|
573
|
+
large: "var(--primitive-size-24)"
|
|
556
574
|
// 24px — hero / large empty states
|
|
557
575
|
},
|
|
558
576
|
// ── Density-aware spacing ────────────────────────────────────────────────────
|
|
@@ -8,5 +8,11 @@ export interface CinematicLinkProps extends Omit<React.AnchorHTMLAttributes<HTML
|
|
|
8
8
|
href: string;
|
|
9
9
|
children: string;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* CinematicLink - cinematic editorial link treatment for portfolio surfaces.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
* @deprecated CinematicLink is an HDS docs/lab internal (editorial link treatment for portfolio/case-study specimen surfaces), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
16
|
+
* @removeIn 1.0.0
|
|
17
|
+
*/
|
|
12
18
|
export declare function CinematicLink({ href, children, style, className, ...rest }: CinematicLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
* @doc-exempt: specimen matrix helper used by docs pages, not a consumer-facing HDS surface.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* ComponentInstanceMatrix — responsive specimen matrix for variant and state parity.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
* @deprecated ComponentInstanceMatrix is an HDS docs/lab internal (specimen matrix helper for the component doc pages), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
14
|
+
* @removeIn 1.0.0
|
|
15
|
+
*/
|
|
10
16
|
export declare function ComponentInstanceMatrix({ componentName, dimensionX, dimensionY, title, isMobile: _isMobile, rowLabelWidth: _rowLabelWidth, rowLabelTone, freezeRowState, renderInstance, }: {
|
|
11
17
|
componentName: string;
|
|
12
18
|
dimensionX: string;
|
|
@@ -35,5 +35,11 @@ export type FoundationSwatchProps = {
|
|
|
35
35
|
/** Explicit color value (hex or CSS var name) to pin the token chip's swatch square, overriding auto-resolution from tokenPath. */
|
|
36
36
|
swatchVar?: string;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* FoundationSwatch - governed foundation specimen for color and semantic role previews.
|
|
40
|
+
*
|
|
41
|
+
* @deprecated FoundationSwatch is an HDS docs/lab internal (foundation specimen preview for the token/foundation doc pages), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
42
|
+
* @removeIn 1.0.0
|
|
43
|
+
*/
|
|
38
44
|
export declare function FoundationSwatch({ label, hidePreviewLabel, tokenPath, tokenDisplayPreset, previewPosition, background, value, details, foreground, specimen, note, bordered, swatchVar, }: FoundationSwatchProps): import("react/jsx-runtime").JSX.Element;
|
|
39
45
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HdsSelect — dropdown selector built on Radix Select.
|
|
3
|
+
* @category Inputs
|
|
4
|
+
* @tier primitive
|
|
5
|
+
* @figma https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=82-49
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* HdsSelect — dropdown selector built on Radix Select (ADR-001 Radix convention).
|
|
9
|
+
* Radix owns the listbox a11y contract: managed focus + active-descendant, typeahead,
|
|
10
|
+
* full keyboard (Home/End/PageUp-Down/wrap), Popper collision/flip positioning, and
|
|
11
|
+
* dismissal. The HDS surface is styled with the token-backed Tailwind idiom used by
|
|
12
|
+
* tabs.tsx / command-palette.tsx; `ref` targets the trigger button.
|
|
13
|
+
*/
|
|
14
|
+
export interface SelectProps {
|
|
15
|
+
/** Select label rendered above the control. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Controls whether the label is rendered. */
|
|
18
|
+
showLabel?: boolean;
|
|
19
|
+
/** Select options displayed in the dropdown. */
|
|
20
|
+
options: {
|
|
21
|
+
value: string;
|
|
22
|
+
label: string;
|
|
23
|
+
}[];
|
|
24
|
+
/** Currently selected value. */
|
|
25
|
+
value: string;
|
|
26
|
+
/** Called when the user picks a different option. */
|
|
27
|
+
onChange: (v: string) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const HdsSelect: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -10,4 +10,10 @@ export interface SketchProps {
|
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
controls?: ReactNode;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Sketch — shared shell for generative canvases and WebGL sketches.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Sketch is an HDS docs/lab internal (shell for generative canvas/WebGL specimen pages), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
17
|
+
* @removeIn 1.0.0
|
|
18
|
+
*/
|
|
13
19
|
export declare function Sketch({ title, children, controls }: SketchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -78,7 +78,13 @@ export type TokenProps = TokenNodeSurfaceProps | TokenDiagramProps;
|
|
|
78
78
|
* @removeIn 1.0.0) that now resolves to the same node treatment.
|
|
79
79
|
* Node content can use a left-side slot for swatches or other compact previews.
|
|
80
80
|
*/
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Token - reflective token specimen for unified node-based token views. The `variant` axis (node | diagram — diagram is a deprecated alias that resolves to the same node treatment) plus the `selected` / `fullWidth` / `asButton` / `nowrap` / `sourceNode` states used to be a Token.module.css `[data-*]` attribute stylesheet, with a duplicate `isSelected` branch re-painted inline on top of it. Both now live as one `cva` variant set — same `--semantic-*`/`--component-*`/`--primitive-*` custom properties, same pixels, no CSS module.
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
* @deprecated Token is an HDS docs/lab internal (reflective token specimen for the token/foundation doc pages), not a consumer-facing HDS surface. It will be retiered to `utility` (dropped from the published barrel) at the named major.
|
|
86
|
+
* @removeIn 1.0.0
|
|
87
|
+
*/
|
|
82
88
|
export declare function Token(props: TokenProps): import("react/jsx-runtime").JSX.Element;
|
|
83
89
|
/** @internal — CVA variant helpers; compose via Token props instead. */
|
|
84
90
|
export { tokenShellVariants, tokenNodeInlineVariants, tokenLabelVariants };
|
|
@@ -138,7 +138,6 @@ export declare const tokenRefs: {
|
|
|
138
138
|
readonly mono: "var(--primitive-typography-family-mono)";
|
|
139
139
|
};
|
|
140
140
|
readonly size: {
|
|
141
|
-
readonly "2xs": "var(--primitive-typography-size-2xs)";
|
|
142
141
|
readonly xs: "var(--primitive-typography-size-xs)";
|
|
143
142
|
readonly sm: "var(--primitive-typography-size-sm)";
|
|
144
143
|
readonly base: "var(--primitive-typography-size-base)";
|
|
@@ -151,10 +150,8 @@ export declare const tokenRefs: {
|
|
|
151
150
|
readonly "6xl": "var(--primitive-typography-size-6xl)";
|
|
152
151
|
};
|
|
153
152
|
readonly weight: {
|
|
154
|
-
readonly light: "var(--primitive-typography-weight-light)";
|
|
155
153
|
readonly regular: "var(--primitive-typography-weight-regular)";
|
|
156
154
|
readonly medium: "var(--primitive-typography-weight-medium)";
|
|
157
|
-
readonly semibold: "var(--primitive-typography-weight-semibold)";
|
|
158
155
|
readonly bold: "var(--primitive-typography-weight-bold)";
|
|
159
156
|
};
|
|
160
157
|
readonly lineHeight: {
|
|
@@ -166,11 +163,8 @@ export declare const tokenRefs: {
|
|
|
166
163
|
readonly relaxed: "var(--primitive-typography-lineHeight-relaxed)";
|
|
167
164
|
};
|
|
168
165
|
readonly letterSpacing: {
|
|
169
|
-
readonly tighter: "var(--primitive-typography-letterSpacing-tighter)";
|
|
170
166
|
readonly tight: "var(--primitive-typography-letterSpacing-tight)";
|
|
171
167
|
readonly normal: "var(--primitive-typography-letterSpacing-normal)";
|
|
172
|
-
readonly wide: "var(--primitive-typography-letterSpacing-wide)";
|
|
173
|
-
readonly wider: "var(--primitive-typography-letterSpacing-wider)";
|
|
174
168
|
readonly caps: "var(--primitive-typography-letterSpacing-caps)";
|
|
175
169
|
};
|
|
176
170
|
};
|
|
@@ -211,9 +205,11 @@ export declare const tokenRefs: {
|
|
|
211
205
|
readonly "96": "var(--primitive-size-96)";
|
|
212
206
|
readonly interactive: {
|
|
213
207
|
readonly min: "var(--primitive-size-interactive-min)";
|
|
208
|
+
readonly minCompact: "var(--primitive-size-interactive-minCompact)";
|
|
214
209
|
};
|
|
215
210
|
readonly width: {
|
|
216
211
|
readonly "96": "var(--primitive-size-width-96)";
|
|
212
|
+
readonly "280": "var(--primitive-size-width-280)";
|
|
217
213
|
readonly "760": "var(--primitive-size-width-760)";
|
|
218
214
|
readonly "1200": "var(--primitive-size-width-1200)";
|
|
219
215
|
readonly "50ch": "var(--primitive-size-width-50ch)";
|
|
@@ -335,6 +331,7 @@ export declare const tokenRefs: {
|
|
|
335
331
|
readonly gap: "var(--semantic-space-sidebar-gap)";
|
|
336
332
|
readonly sectionGap: "var(--semantic-space-sidebar-sectionGap)";
|
|
337
333
|
readonly railPadding: "var(--semantic-space-sidebar-railPadding)";
|
|
334
|
+
readonly railWidth: "var(--semantic-space-sidebar-railWidth)";
|
|
338
335
|
};
|
|
339
336
|
};
|
|
340
337
|
readonly layout: {
|
|
@@ -139,7 +139,6 @@ export declare const tokenValues: {
|
|
|
139
139
|
readonly mono: readonly ["Geist Mono", "Courier New", "monospace"];
|
|
140
140
|
};
|
|
141
141
|
readonly size: {
|
|
142
|
-
readonly "2xs": "10px";
|
|
143
142
|
readonly xs: "13px";
|
|
144
143
|
readonly sm: "15px";
|
|
145
144
|
readonly base: "17px";
|
|
@@ -152,10 +151,8 @@ export declare const tokenValues: {
|
|
|
152
151
|
readonly "6xl": "80px";
|
|
153
152
|
};
|
|
154
153
|
readonly weight: {
|
|
155
|
-
readonly light: "300";
|
|
156
154
|
readonly regular: "400";
|
|
157
155
|
readonly medium: "500";
|
|
158
|
-
readonly semibold: "600";
|
|
159
156
|
readonly bold: "700";
|
|
160
157
|
};
|
|
161
158
|
readonly lineHeight: {
|
|
@@ -167,11 +164,8 @@ export declare const tokenValues: {
|
|
|
167
164
|
readonly relaxed: "1.625";
|
|
168
165
|
};
|
|
169
166
|
readonly letterSpacing: {
|
|
170
|
-
readonly tighter: "-0.02em";
|
|
171
167
|
readonly tight: "-0.01em";
|
|
172
168
|
readonly normal: "0em";
|
|
173
|
-
readonly wide: "0.01em";
|
|
174
|
-
readonly wider: "0.02em";
|
|
175
169
|
readonly caps: "0.06em";
|
|
176
170
|
};
|
|
177
171
|
};
|
|
@@ -212,9 +206,11 @@ export declare const tokenValues: {
|
|
|
212
206
|
readonly "96": "96px";
|
|
213
207
|
readonly interactive: {
|
|
214
208
|
readonly min: "44px";
|
|
209
|
+
readonly minCompact: "24px";
|
|
215
210
|
};
|
|
216
211
|
readonly width: {
|
|
217
212
|
readonly "96": "96px";
|
|
213
|
+
readonly "280": "280px";
|
|
218
214
|
readonly "760": "760px";
|
|
219
215
|
readonly "1200": "1200px";
|
|
220
216
|
readonly "50ch": "50ch";
|
|
@@ -67,7 +67,6 @@ declare const hds: {
|
|
|
67
67
|
fontFamily: string;
|
|
68
68
|
monoFamily: string;
|
|
69
69
|
fontSize: {
|
|
70
|
-
'2xs': string;
|
|
71
70
|
xs: string;
|
|
72
71
|
sm: string;
|
|
73
72
|
base: string;
|
|
@@ -81,7 +80,6 @@ declare const hds: {
|
|
|
81
80
|
fontWeight: {
|
|
82
81
|
regular: string;
|
|
83
82
|
medium: string;
|
|
84
|
-
semibold: string;
|
|
85
83
|
bold: string;
|
|
86
84
|
};
|
|
87
85
|
lineHeight: {
|
|
@@ -93,11 +91,8 @@ declare const hds: {
|
|
|
93
91
|
relaxed: string;
|
|
94
92
|
};
|
|
95
93
|
letterSpacing: {
|
|
96
|
-
tighter: string;
|
|
97
94
|
tight: string;
|
|
98
95
|
normal: string;
|
|
99
|
-
wide: string;
|
|
100
|
-
wider: string;
|
|
101
96
|
};
|
|
102
97
|
semantic: {
|
|
103
98
|
color: {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
export declare const DOC_LAYOUT_STICKY_OFFSET: string;
|
|
3
|
-
export declare const DOC_LAYOUT_STICKY_VIEWPORT_HEIGHT: string;
|
|
4
2
|
declare const DOC_LAYOUT_CONTENT_WIDTHS: {
|
|
5
3
|
readonly content: "var(--semantic-layout-width-content)";
|
|
6
4
|
readonly max: "var(--semantic-layout-width-max)";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HdsDocsShell — three-region docs shell (left nav rail, content, right TOC
|
|
3
|
+
* rail), driven by grid columns that default to 0 and are set per breakpoint.
|
|
4
|
+
* @category Layout
|
|
5
|
+
* @tier pattern
|
|
6
|
+
* @public
|
|
7
|
+
*
|
|
8
|
+
* hds#280 slice: this is the SHELL MECHANICS ONLY — the smallest shippable
|
|
9
|
+
* piece of the docs-shell epic. It ships:
|
|
10
|
+
*
|
|
11
|
+
* - A 3-column grid (`leftRail | content | rightRail`), both rail columns
|
|
12
|
+
* defaulting to `0px` and set to `semantic.space.sidebar.railWidth`
|
|
13
|
+
* (hds#280 token, our own 280px — not HeroUI's 268px) per breakpoint via
|
|
14
|
+
* Tailwind's arbitrary-property + responsive-variant syntax, the same
|
|
15
|
+
* technique Fumadocs/HeroUI uses. `md768:` brings in the left rail,
|
|
16
|
+
* `xl1280:` brings in the right rail — matching the three-stage table in
|
|
17
|
+
* hds#280.
|
|
18
|
+
* - Each rail is `position: sticky` and scrolls independently of content
|
|
19
|
+
* and of the other rail, clipped to the viewport minus `topOffset`.
|
|
20
|
+
* - `topOffset` composes (it is one CSS length a caller supplies, e.g. its
|
|
21
|
+
* own sticky header's height token) rather than a hardcoded pixel value —
|
|
22
|
+
* the first stage of the row-cascade pattern hds#280 asks for. A second
|
|
23
|
+
* region (a tabs row, hds#280's PR-comment addendum) would extend this by
|
|
24
|
+
* adding its own height into the same `calc()` chain, not by hardcoding a
|
|
25
|
+
* second offset.
|
|
26
|
+
*
|
|
27
|
+
* Deliberately NOT in this slice (tracked as proposed follow-up issues, not
|
|
28
|
+
* filed — see the PR/commit this ships in):
|
|
29
|
+
* - Below the TOC breakpoint, `rightRail` is omitted from the grid rather
|
|
30
|
+
* than becoming a reachable popover. The DoD explicitly wants a popover,
|
|
31
|
+
* not "merely hidden" — that is real, separate UI work (a sticky
|
|
32
|
+
* current-section breadcrumb bar), not shell mechanics.
|
|
33
|
+
* - Left-rail collapsible groups (chevron, active-section pill) and
|
|
34
|
+
* right-rail active-anchor styling (vertical rule, filled pill) are
|
|
35
|
+
* content the caller supplies via `leftRail`/`rightRail` — this shell
|
|
36
|
+
* does not build SideNav/Disclosure/NavItem composition for the caller.
|
|
37
|
+
* - `check-rendered-geometry` verification at every breakpoint in the DoD's
|
|
38
|
+
* table (needs a built Storybook + a live run, not exercised here).
|
|
39
|
+
* - Named CSS `grid-template-areas` (the DoD's literal ask) — this ships a
|
|
40
|
+
* 3-column grid with DOM order instead, which is behaviorally identical
|
|
41
|
+
* for a single linear row of regions and needs no separate stylesheet.
|
|
42
|
+
* Areas earn their keep once a 4th region (a tabs row spanning full
|
|
43
|
+
* width) is added — call out then, not before.
|
|
44
|
+
*/
|
|
45
|
+
import * as React from 'react';
|
|
46
|
+
/** @public */
|
|
47
|
+
export interface HdsDocsShellProps {
|
|
48
|
+
/** Left nav rail. Hidden below the `md768` breakpoint (grid column width 0). */
|
|
49
|
+
leftRail?: React.ReactNode;
|
|
50
|
+
/** Main content column. Always rendered, always fluid. */
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Right "on this page" rail. Hidden below the `xl1280` breakpoint (grid
|
|
54
|
+
* column width 0) — see the deferred-popover note above; it is REMOVED
|
|
55
|
+
* from the grid at that breakpoint, not merely visually hidden, so no
|
|
56
|
+
* hidden interactive content sits in the DOM unreachable.
|
|
57
|
+
*/
|
|
58
|
+
rightRail?: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* CSS length a caller supplies for a sticky header ABOVE this shell (e.g.
|
|
61
|
+
* TopNav's height token), so each rail's sticky offset and scrollable
|
|
62
|
+
* height compose against it instead of assuming the shell owns the whole
|
|
63
|
+
* viewport. Defaults to `'0px'`.
|
|
64
|
+
*/
|
|
65
|
+
topOffset?: string;
|
|
66
|
+
/** Escape hatch: only for narrow layout adjustments that don't belong in the primitive API. */
|
|
67
|
+
className?: string;
|
|
68
|
+
/** Escape hatch: only for narrow layout adjustments that don't belong in the primitive API. */
|
|
69
|
+
style?: React.CSSProperties;
|
|
70
|
+
}
|
|
71
|
+
/** @public */
|
|
72
|
+
export declare const HdsDocsShell: React.ForwardRefExoticComponent<HdsDocsShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type DocLayoutContentMaxWidth } from './DocLayout.js';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* HdsSystemDocLayout — single centered content column for documentation pages.
|
|
5
|
+
* Thin wrapper around DocLayout: takes only `contentSlot` and `contentMaxWidth`,
|
|
6
|
+
* with no sidebar or nav region to pass one into. Not the three-column docs
|
|
7
|
+
* shell (left rail + content + right rail) — that is tracked as its own shell
|
|
8
|
+
* component (hds#280).
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
4
11
|
export declare function HdsSystemDocLayout({ contentSlot, contentMaxWidth, }: {
|
|
5
12
|
contentSlot: ReactNode;
|
|
6
13
|
contentMaxWidth?: DocLayoutContentMaxWidth;
|
|
@@ -36,6 +36,7 @@ export * from './app/components/progress.js';
|
|
|
36
36
|
export * from './app/components/skeleton.js';
|
|
37
37
|
export * from './app/components/spinner.js';
|
|
38
38
|
export * from './app/components/segmented-control.js';
|
|
39
|
+
export * from './app/components/select.js';
|
|
39
40
|
export * from './app/components/stack.js';
|
|
40
41
|
export * from './app/components/surface.js';
|
|
41
42
|
export * from './app/components/table.js';
|
|
@@ -108,6 +109,7 @@ export * from './app/components/toast.js';
|
|
|
108
109
|
export * from './app/layouts/CaseStudyLayout.js';
|
|
109
110
|
export * from './app/components/error-pattern.js';
|
|
110
111
|
export * from './app/layouts/HdsSystemDocLayout.js';
|
|
112
|
+
export * from './app/layouts/HdsDocsShell.js';
|
|
111
113
|
export { default as hds } from './app/design-system/tokens.js';
|
|
112
114
|
/** Raw DTCG design tokens (the contents of `hirobius.tokens.json`). */
|
|
113
115
|
export declare const tokens: {
|
|
@@ -593,12 +595,6 @@ export declare const tokens: {
|
|
|
593
595
|
};
|
|
594
596
|
size: {
|
|
595
597
|
$type: string;
|
|
596
|
-
"2xs": {
|
|
597
|
-
$value: {
|
|
598
|
-
value: number;
|
|
599
|
-
unit: string;
|
|
600
|
-
};
|
|
601
|
-
};
|
|
602
598
|
xs: {
|
|
603
599
|
$value: {
|
|
604
600
|
value: number;
|
|
@@ -663,19 +659,12 @@ export declare const tokens: {
|
|
|
663
659
|
};
|
|
664
660
|
weight: {
|
|
665
661
|
$type: string;
|
|
666
|
-
light: {
|
|
667
|
-
$value: number;
|
|
668
|
-
$description: string;
|
|
669
|
-
};
|
|
670
662
|
regular: {
|
|
671
663
|
$value: number;
|
|
672
664
|
};
|
|
673
665
|
medium: {
|
|
674
666
|
$value: number;
|
|
675
667
|
};
|
|
676
|
-
semibold: {
|
|
677
|
-
$value: number;
|
|
678
|
-
};
|
|
679
668
|
bold: {
|
|
680
669
|
$value: number;
|
|
681
670
|
};
|
|
@@ -705,12 +694,6 @@ export declare const tokens: {
|
|
|
705
694
|
};
|
|
706
695
|
letterSpacing: {
|
|
707
696
|
$type: string;
|
|
708
|
-
tighter: {
|
|
709
|
-
$value: {
|
|
710
|
-
value: number;
|
|
711
|
-
unit: string;
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
697
|
tight: {
|
|
715
698
|
$value: {
|
|
716
699
|
value: number;
|
|
@@ -723,18 +706,6 @@ export declare const tokens: {
|
|
|
723
706
|
unit: string;
|
|
724
707
|
};
|
|
725
708
|
};
|
|
726
|
-
wide: {
|
|
727
|
-
$value: {
|
|
728
|
-
value: number;
|
|
729
|
-
unit: string;
|
|
730
|
-
};
|
|
731
|
-
};
|
|
732
|
-
wider: {
|
|
733
|
-
$value: {
|
|
734
|
-
value: number;
|
|
735
|
-
unit: string;
|
|
736
|
-
};
|
|
737
|
-
};
|
|
738
709
|
caps: {
|
|
739
710
|
$value: {
|
|
740
711
|
value: number;
|
|
@@ -961,6 +932,14 @@ export declare const tokens: {
|
|
|
961
932
|
};
|
|
962
933
|
$description: string;
|
|
963
934
|
};
|
|
935
|
+
minCompact: {
|
|
936
|
+
$type: string;
|
|
937
|
+
$value: {
|
|
938
|
+
value: number;
|
|
939
|
+
unit: string;
|
|
940
|
+
};
|
|
941
|
+
$description: string;
|
|
942
|
+
};
|
|
964
943
|
};
|
|
965
944
|
width: {
|
|
966
945
|
"96": {
|
|
@@ -992,6 +971,14 @@ export declare const tokens: {
|
|
|
992
971
|
unit: string;
|
|
993
972
|
};
|
|
994
973
|
};
|
|
974
|
+
"280": {
|
|
975
|
+
$type: string;
|
|
976
|
+
$value: {
|
|
977
|
+
value: number;
|
|
978
|
+
unit: string;
|
|
979
|
+
};
|
|
980
|
+
$description: string;
|
|
981
|
+
};
|
|
995
982
|
};
|
|
996
983
|
};
|
|
997
984
|
grid: {
|
|
@@ -1629,6 +1616,11 @@ export declare const tokens: {
|
|
|
1629
1616
|
$value: string;
|
|
1630
1617
|
$description: string;
|
|
1631
1618
|
};
|
|
1619
|
+
railWidth: {
|
|
1620
|
+
$type: string;
|
|
1621
|
+
$value: string;
|
|
1622
|
+
$description: string;
|
|
1623
|
+
};
|
|
1632
1624
|
};
|
|
1633
1625
|
};
|
|
1634
1626
|
layout: {
|