@hirobius/design-system 0.22.0 → 0.23.1
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 +11 -1
- package/CHANGELOG.md +101 -0
- package/CONSUMING.md +3 -3
- package/DESIGN.md +26 -26
- package/NOTICE.md +4 -4
- package/README.md +23 -14
- package/UPGRADING.md +35 -1
- package/dist/chunks/{empty-state-DNoThgfV.js → empty-state-ChC_xZfg.js} +109 -92
- package/dist/chunks/{form-By82qZcC.js → form-zCZ_B83I.js} +16 -16
- package/dist/css-contract.json +1 -0
- package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-LICENSE.txt +93 -0
- package/dist/fonts/plus-jakarta-sans-400.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-500.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-700.woff2 +0 -0
- package/dist/fonts/plus-jakarta-sans-LICENSE.txt +22 -0
- package/dist/fonts.css +19 -19
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +1263 -1190
- package/dist/manifest.js +5 -4
- package/dist/patterns.js +164 -162
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +16 -3
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/button.d.ts +1 -1
- package/dist/types/src/app/components/callout.d.ts +2 -1
- package/dist/types/src/app/components/card.d.ts +5 -3
- package/dist/types/src/app/components/code-block.d.ts +1 -0
- 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/divider.d.ts +1 -1
- package/dist/types/src/app/components/error-pattern.d.ts +1 -0
- package/dist/types/src/app/components/form-actions.d.ts +1 -0
- package/dist/types/src/app/components/form.d.ts +1 -0
- package/dist/types/src/app/components/grid.d.ts +1 -1
- package/dist/types/src/app/components/icon.d.ts +1 -1
- package/dist/types/src/app/components/metric-tiles.d.ts +3 -0
- package/dist/types/src/app/components/page-header.d.ts +2 -0
- package/dist/types/src/app/components/page.d.ts +1 -0
- package/dist/types/src/app/components/reveal.d.ts +1 -0
- package/dist/types/src/app/components/stack.d.ts +1 -1
- package/dist/types/src/app/components/tabs.d.ts +3 -1
- package/dist/types/src/app/context/hds-theme.d.ts +1 -1
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +13 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +16 -3
- package/dist/types/src/app/hooks/useInteractionState.d.ts +7 -1
- package/dist/types/src/index.d.ts +47 -0
- package/dist/variables.css +35 -24
- package/docs/CONSUMING.md +5 -5
- package/hirobius.tokens.json +91 -44
- package/llms.txt +29 -7
- package/package.json +12 -7
- package/public/hds-manifest.json +277 -119
- package/public/llms/components.txt +1 -1
- package/public/llms-full.txt +56 -34
- package/public/llms.txt +29 -7
- package/src/app/data/component-api.json +53 -18
- package/upgrade/index.json +15 -1
- package/upgrade/releases/0.23.0.json +259 -0
- package/upgrade/releases/0.23.1.json +108 -0
- package/upgrade/schema.json +114 -1
- 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/tokens.js
CHANGED
|
@@ -42,6 +42,19 @@ const a = {
|
|
|
42
42
|
700: "#047857",
|
|
43
43
|
950: "#022c22"
|
|
44
44
|
},
|
|
45
|
+
apple: {
|
|
46
|
+
50: "#f2faeb",
|
|
47
|
+
100: "#e2f3cf",
|
|
48
|
+
200: "#c7e7a4",
|
|
49
|
+
300: "#a6d873",
|
|
50
|
+
400: "#85c84c",
|
|
51
|
+
500: "#66b239",
|
|
52
|
+
600: "#54922d",
|
|
53
|
+
700: "#416f20",
|
|
54
|
+
800: "#34571b",
|
|
55
|
+
900: "#2b4518",
|
|
56
|
+
950: "#16250c"
|
|
57
|
+
},
|
|
45
58
|
violet: {
|
|
46
59
|
50: "#f5f3ff",
|
|
47
60
|
400: "#a78bfa",
|
|
@@ -120,9 +133,9 @@ const a = {
|
|
|
120
133
|
},
|
|
121
134
|
typography: {
|
|
122
135
|
family: {
|
|
123
|
-
primary: ["
|
|
124
|
-
display: ["
|
|
125
|
-
mono: ["
|
|
136
|
+
primary: ["Plus Jakarta Sans", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"],
|
|
137
|
+
display: ["Plus Jakarta Sans", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"],
|
|
138
|
+
mono: ["IBM Plex Mono", "Courier New", "monospace"]
|
|
126
139
|
},
|
|
127
140
|
size: {
|
|
128
141
|
xs: "12px",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* AssetImg - responsive asset frame with fallback placeholder handling.
|
|
3
3
|
* Contexts: default, lightbox, and detail.
|
|
4
4
|
* @category Display
|
|
5
|
+
* @usage Show an image that scales to its frame, with a placeholder if it fails to load.
|
|
5
6
|
* @tier primitive
|
|
6
7
|
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2041-67
|
|
7
8
|
*/
|
|
@@ -65,7 +65,7 @@ export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonE
|
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Triggers an action when activated.
|
|
68
|
-
* @usage
|
|
68
|
+
* @usage Run an action, such as submit, save or open a dialog. For an icon-only control pass iconOnly, iconLeft and label; for an on/off toggle pass pressed.
|
|
69
69
|
* @whenNot Navigating to another page, where a link is the correct element.
|
|
70
70
|
* @useInstead InlineLink navigation to another page
|
|
71
71
|
*/
|
|
@@ -18,7 +18,8 @@ export interface CalloutProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
18
18
|
italic?: boolean;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Tone-driven
|
|
21
|
+
* Tone-driven tinted callout for notes, quotes, hypotheses — the same feedback
|
|
22
|
+
* fill language as Alert, without Alert's icon or status role.
|
|
22
23
|
*/
|
|
23
24
|
export declare const Callout: React.ForwardRefExoticComponent<CalloutProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
25
|
export default Callout;
|
|
@@ -39,9 +39,11 @@
|
|
|
39
39
|
* Existing callers that pass raw children continue to work; new callers
|
|
40
40
|
* should prefer compound parts + `padding="none"`.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* The default variant is BORDERLESS at rest (12d-3 outline rule) — depth comes
|
|
43
|
+
* from whitespace/dividers, not an edge. A resting 1px border is opt-in via
|
|
44
|
+
* `bordered` (border.default), a feedback `tone`, or `accent` (border.accent).
|
|
45
|
+
* Elevation tokens are not bound by default — pass `className="shadow-..."` for
|
|
46
|
+
* a hover/floating treatment on interactive cards.
|
|
45
47
|
*/
|
|
46
48
|
import * as React from 'react';
|
|
47
49
|
import hds from '../design-system/tokens.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CodeBlock - code display with copy button and optional collapsible toggle.
|
|
3
3
|
* @category Display
|
|
4
|
+
* @usage Show a code sample with a copy button, optionally collapsed.
|
|
4
5
|
* @tier primitive
|
|
5
6
|
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=89-154
|
|
6
7
|
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @useInstead Select a short list without search
|
|
8
8
|
* @useInstead Menu firing actions from a trigger
|
|
9
9
|
* @keyboard Enter/Space Opens the list from the trigger and moves focus to the search field.
|
|
10
|
-
* @keyboard ArrowDown/ArrowUp Moves the active option and wraps at the ends.
|
|
10
|
+
* @keyboard ArrowDown/ArrowUp Moves the active option, skipping disabled ones, and wraps at the ends.
|
|
11
11
|
* @keyboard Character Filters the options to those matching the typed text.
|
|
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.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DataTableSection - a titled table with a toolbar, row actions and an empty state.
|
|
3
3
|
* @category Display
|
|
4
|
+
* @usage Put a heading and toolbar above a Table.
|
|
4
5
|
* @tier pattern
|
|
5
6
|
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2075-268
|
|
6
7
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DestructiveSection - the one place a screen puts an irreversible action.
|
|
3
3
|
* @category Actions
|
|
4
|
+
* @usage Put a dangerous action, such as delete, in its own section with a warning and a confirm step.
|
|
4
5
|
* @tier pattern
|
|
5
6
|
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2076-3
|
|
6
7
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Divider — semantic separator between content regions.
|
|
3
3
|
* @category Layout
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @usage Separate two
|
|
5
|
+
* @usage Separate two blocks of content with a thin line.
|
|
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
|
|
@@ -10,6 +10,7 @@ export type ErrorPatternProps = {
|
|
|
10
10
|
fullPage?: boolean;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2121-839
|
|
13
14
|
* @public
|
|
14
15
|
*/
|
|
15
16
|
export declare function ErrorPattern({ displayText, message, fullPage, }: ErrorPatternProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FormActions - the footer row of a form: primary right-most, secondary to its left.
|
|
3
3
|
* @category Actions
|
|
4
|
+
* @usage Lay out a form's buttons in a fixed order: danger on the left, then secondary, then primary on the right.
|
|
4
5
|
* @tier pattern
|
|
5
6
|
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2075-87
|
|
6
7
|
*/
|
|
@@ -34,6 +34,7 @@ import * as React from 'react';
|
|
|
34
34
|
export type FormProps = React.FormHTMLAttributes<HTMLFormElement>;
|
|
35
35
|
/**
|
|
36
36
|
* Styled `<form>` with consistent vertical field rhythm.
|
|
37
|
+
* @usage Wrap form fields so they stack with even spacing.
|
|
37
38
|
*
|
|
38
39
|
* Tagged per-export: FormField and FormFieldShell share this module and have no
|
|
39
40
|
* Figma node, so a file-level @figma would claim this one for all three.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Grid — responsive grid composition primitive.
|
|
3
3
|
* @category Layout
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @usage Lay out content in
|
|
5
|
+
* @usage Lay out content in columns that adapt to the screen width, or line up nested content with subgrid.
|
|
6
6
|
* @whenNot A single row or column, or styling a surface.
|
|
7
7
|
* @useInstead Stack a single row or column
|
|
8
8
|
* @useInstead Box one-off layout that no named primitive covers
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @category Display
|
|
4
4
|
* @tier primitive
|
|
5
5
|
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=27-2
|
|
6
|
-
* @usage
|
|
6
|
+
* @usage Show a Lucide icon at a set size and color.
|
|
7
7
|
* @whenNot A control someone can activate, or a picture that carries content.
|
|
8
8
|
* @useInstead Button a clickable control, with iconOnly for an icon-only one
|
|
9
9
|
* @useInstead Avatar a picture of a person or entity
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MetricTiles - the default row of headline numbers on a screen.
|
|
3
3
|
* @category Display
|
|
4
|
+
* @usage Show a row of key numbers, one tile each.
|
|
4
5
|
* @tier pattern
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
@@ -22,6 +23,7 @@ export interface MetricTileProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
22
23
|
* surface at one fixed min-height. Wraps `Card.Metric` (the sibling with the
|
|
23
24
|
* eyebrow / h2 / caption scale) and adds the surface and the fixed height, so a
|
|
24
25
|
* tile needs no enclosing `Card`.
|
|
26
|
+
* @usage Show one key number with its label, inside a MetricTiles row.
|
|
25
27
|
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2075-114
|
|
26
28
|
*/
|
|
27
29
|
export declare const MetricTile: React.ForwardRefExoticComponent<MetricTileProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -36,6 +38,7 @@ export interface MetricTilesProps extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
36
38
|
* headline numbers on a screen; use `Stat` only for an inline number inside prose
|
|
37
39
|
* or a dense list, `Card.Metric` only inside an existing `Card`, and `StatusTile`
|
|
38
40
|
* for state with notes (never a number).
|
|
41
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2121-89
|
|
39
42
|
* @screenPattern
|
|
40
43
|
*/
|
|
41
44
|
export declare const MetricTiles: React.ForwardRefExoticComponent<MetricTilesProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PageHeader - the one header every screen opens with.
|
|
3
3
|
* @category Layout
|
|
4
|
+
* @usage Open a screen with its title, plus optional breadcrumb, status and actions.
|
|
4
5
|
* @tier pattern
|
|
5
6
|
*/
|
|
6
7
|
import * as React from 'react';
|
|
@@ -27,6 +28,7 @@ export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
27
28
|
* Screen header: breadcrumb slot, the title at the one canonical page-title size
|
|
28
29
|
* (`heading2`), a status slot and an actions slot. Every screen has exactly one.
|
|
29
30
|
* `display` and `h1` type are reserved for marketing and landing surfaces.
|
|
31
|
+
* @figma https://www.figma.com/design/2VgBbVpKiDnu0aftJEVyBQ/HDS-Tokens-Components?node-id=2121-3
|
|
30
32
|
* @screenPattern
|
|
31
33
|
*/
|
|
32
34
|
export declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reveal — reveal-on-scroll primitive via CSS scroll-driven animation.
|
|
3
3
|
* @category Motion
|
|
4
|
+
* @usage Fade content in as it scrolls into view.
|
|
4
5
|
* @tier primitive
|
|
5
6
|
* @ai-intent Fades/slides/scales content in as it enters the viewport, driven
|
|
6
7
|
* purely by scroll position (`animation-timeline: view()`) — no JS, no deps, no
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Stack — one-dimensional layout primitive.
|
|
3
3
|
* @category Layout
|
|
4
4
|
* @tier primitive
|
|
5
|
-
* @usage Space a row or column
|
|
5
|
+
* @usage Space items in a row or column with even gaps.
|
|
6
6
|
* @whenNot Multi-column layout, or giving content a background or padding.
|
|
7
7
|
* @useInstead Grid multi-column layout
|
|
8
8
|
* @useInstead Surface content that needs a background or padding
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
* Overflow:
|
|
16
16
|
* TabsList is horizontally scrollable (`overflow-x-auto whitespace-nowrap`)
|
|
17
17
|
* for cases like /ops/atlas with 8 tabs at narrow viewports. Scrollbar
|
|
18
|
-
* chrome is hidden cross-browser (-webkit / firefox / IE).
|
|
18
|
+
* chrome is hidden cross-browser (-webkit / firefox / IE). The trigger's
|
|
19
|
+
* focus ring is `ring-inset` because `overflow-x-auto` clips anything drawn
|
|
20
|
+
* outside the list box (an outer ring was cut on the first/last tab).
|
|
19
21
|
*
|
|
20
22
|
* @category Navigation
|
|
21
23
|
* @tier primitive
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* theme data-theme "dark" (light = unset) light
|
|
17
17
|
* density data-density "compact" (comfortable = unset) comfortable
|
|
18
18
|
* brand data-brand + data-tenant overlay slug (e.g. "acme") base
|
|
19
|
-
* font --hds-font-family(-mono) any CSS font-family value
|
|
19
|
+
* font --hds-font-family(-mono) any CSS font-family value Plus Jakarta Sans / IBM Plex Mono
|
|
20
20
|
*
|
|
21
21
|
* This provider is a thin, typed convenience that renders a `data-hds` scope
|
|
22
22
|
* wrapper carrying those attributes — it does NOT own state, storage, or a
|
|
@@ -55,6 +55,19 @@ export declare const tokenRefs: {
|
|
|
55
55
|
readonly "700": "var(--primitive-color-green-700)";
|
|
56
56
|
readonly "950": "var(--primitive-color-green-950)";
|
|
57
57
|
};
|
|
58
|
+
readonly apple: {
|
|
59
|
+
readonly "50": "var(--primitive-color-apple-50)";
|
|
60
|
+
readonly "100": "var(--primitive-color-apple-100)";
|
|
61
|
+
readonly "200": "var(--primitive-color-apple-200)";
|
|
62
|
+
readonly "300": "var(--primitive-color-apple-300)";
|
|
63
|
+
readonly "400": "var(--primitive-color-apple-400)";
|
|
64
|
+
readonly "500": "var(--primitive-color-apple-500)";
|
|
65
|
+
readonly "600": "var(--primitive-color-apple-600)";
|
|
66
|
+
readonly "700": "var(--primitive-color-apple-700)";
|
|
67
|
+
readonly "800": "var(--primitive-color-apple-800)";
|
|
68
|
+
readonly "900": "var(--primitive-color-apple-900)";
|
|
69
|
+
readonly "950": "var(--primitive-color-apple-950)";
|
|
70
|
+
};
|
|
58
71
|
readonly violet: {
|
|
59
72
|
readonly "50": "var(--primitive-color-violet-50)";
|
|
60
73
|
readonly "400": "var(--primitive-color-violet-400)";
|
|
@@ -56,6 +56,19 @@ export declare const tokenValues: {
|
|
|
56
56
|
readonly "700": "#047857";
|
|
57
57
|
readonly "950": "#022c22";
|
|
58
58
|
};
|
|
59
|
+
readonly apple: {
|
|
60
|
+
readonly "50": "#f2faeb";
|
|
61
|
+
readonly "100": "#e2f3cf";
|
|
62
|
+
readonly "200": "#c7e7a4";
|
|
63
|
+
readonly "300": "#a6d873";
|
|
64
|
+
readonly "400": "#85c84c";
|
|
65
|
+
readonly "500": "#66b239";
|
|
66
|
+
readonly "600": "#54922d";
|
|
67
|
+
readonly "700": "#416f20";
|
|
68
|
+
readonly "800": "#34571b";
|
|
69
|
+
readonly "900": "#2b4518";
|
|
70
|
+
readonly "950": "#16250c";
|
|
71
|
+
};
|
|
59
72
|
readonly violet: {
|
|
60
73
|
readonly "50": "#f5f3ff";
|
|
61
74
|
readonly "400": "#a78bfa";
|
|
@@ -134,9 +147,9 @@ export declare const tokenValues: {
|
|
|
134
147
|
};
|
|
135
148
|
readonly typography: {
|
|
136
149
|
readonly family: {
|
|
137
|
-
readonly primary: readonly ["
|
|
138
|
-
readonly display: readonly ["
|
|
139
|
-
readonly mono: readonly ["
|
|
150
|
+
readonly primary: readonly ["Plus Jakarta Sans", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"];
|
|
151
|
+
readonly display: readonly ["Plus Jakarta Sans", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "sans-serif"];
|
|
152
|
+
readonly mono: readonly ["IBM Plex Mono", "Courier New", "monospace"];
|
|
140
153
|
};
|
|
141
154
|
readonly size: {
|
|
142
155
|
readonly xs: "12px";
|
|
@@ -6,7 +6,13 @@ export interface InteractionHandlers {
|
|
|
6
6
|
onPointerDown: () => void;
|
|
7
7
|
onPointerUp: () => void;
|
|
8
8
|
onPointerCancel: () => void;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Pass the focused element (`e.currentTarget`) so only keyboard-modality focus
|
|
11
|
+
* (`:focus-visible`) counts. Called with no argument it counts unconditionally.
|
|
12
|
+
*/
|
|
13
|
+
onFocus: (target?: Element | null) => void;
|
|
14
|
+
/** Re-checks `:focus-visible` once a key is pressed on an already-focused element. */
|
|
15
|
+
onKeyDown: (target?: Element | null) => void;
|
|
10
16
|
onBlur: () => void;
|
|
11
17
|
}
|
|
12
18
|
export interface InteractionState {
|
|
@@ -204,6 +204,53 @@ export declare const tokens: {
|
|
|
204
204
|
};
|
|
205
205
|
$description: string;
|
|
206
206
|
};
|
|
207
|
+
apple: {
|
|
208
|
+
"50": {
|
|
209
|
+
$value: string;
|
|
210
|
+
$description: string;
|
|
211
|
+
};
|
|
212
|
+
"100": {
|
|
213
|
+
$value: string;
|
|
214
|
+
$description: string;
|
|
215
|
+
};
|
|
216
|
+
"200": {
|
|
217
|
+
$value: string;
|
|
218
|
+
$description: string;
|
|
219
|
+
};
|
|
220
|
+
"300": {
|
|
221
|
+
$value: string;
|
|
222
|
+
$description: string;
|
|
223
|
+
};
|
|
224
|
+
"400": {
|
|
225
|
+
$value: string;
|
|
226
|
+
$description: string;
|
|
227
|
+
};
|
|
228
|
+
"500": {
|
|
229
|
+
$value: string;
|
|
230
|
+
$description: string;
|
|
231
|
+
};
|
|
232
|
+
"600": {
|
|
233
|
+
$value: string;
|
|
234
|
+
$description: string;
|
|
235
|
+
};
|
|
236
|
+
"700": {
|
|
237
|
+
$value: string;
|
|
238
|
+
$description: string;
|
|
239
|
+
};
|
|
240
|
+
"800": {
|
|
241
|
+
$value: string;
|
|
242
|
+
$description: string;
|
|
243
|
+
};
|
|
244
|
+
"900": {
|
|
245
|
+
$value: string;
|
|
246
|
+
$description: string;
|
|
247
|
+
};
|
|
248
|
+
"950": {
|
|
249
|
+
$value: string;
|
|
250
|
+
$description: string;
|
|
251
|
+
};
|
|
252
|
+
$description: string;
|
|
253
|
+
};
|
|
207
254
|
violet: {
|
|
208
255
|
"50": {
|
|
209
256
|
$value: string;
|
package/dist/variables.css
CHANGED
|
@@ -48,6 +48,17 @@
|
|
|
48
48
|
--primitive-color-green-400: #34d399;
|
|
49
49
|
--primitive-color-green-700: #047857;
|
|
50
50
|
--primitive-color-green-950: #022c22;
|
|
51
|
+
--primitive-color-apple-50: #f2faeb;
|
|
52
|
+
--primitive-color-apple-100: #e2f3cf;
|
|
53
|
+
--primitive-color-apple-200: #c7e7a4;
|
|
54
|
+
--primitive-color-apple-300: #a6d873;
|
|
55
|
+
--primitive-color-apple-400: #85c84c;
|
|
56
|
+
--primitive-color-apple-500: #66b239;
|
|
57
|
+
--primitive-color-apple-600: #54922d;
|
|
58
|
+
--primitive-color-apple-700: #416f20;
|
|
59
|
+
--primitive-color-apple-800: #34571b;
|
|
60
|
+
--primitive-color-apple-900: #2b4518;
|
|
61
|
+
--primitive-color-apple-950: #16250c;
|
|
51
62
|
--primitive-color-violet-50: #f5f3ff;
|
|
52
63
|
--primitive-color-violet-400: #a78bfa;
|
|
53
64
|
--primitive-color-violet-700: #6d28d9;
|
|
@@ -105,9 +116,9 @@
|
|
|
105
116
|
--primitive-radius-8: 8px;
|
|
106
117
|
--primitive-radius-12: 12px;
|
|
107
118
|
--primitive-radius-full: 9999px;
|
|
108
|
-
--primitive-typography-family-primary:
|
|
109
|
-
--primitive-typography-family-display:
|
|
110
|
-
--primitive-typography-family-mono: "
|
|
119
|
+
--primitive-typography-family-primary: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
120
|
+
--primitive-typography-family-display: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
121
|
+
--primitive-typography-family-mono: "IBM Plex Mono", "Courier New", monospace;
|
|
111
122
|
--primitive-typography-size-xs: 12px;
|
|
112
123
|
--primitive-typography-size-sm: 14px;
|
|
113
124
|
--primitive-typography-size-base: 16px;
|
|
@@ -197,8 +208,8 @@
|
|
|
197
208
|
--semantic-color-surface-overlay: var(--primitive-color-neutral-100);
|
|
198
209
|
--semantic-color-surface-scrim: var(--primitive-color-neutral-900);
|
|
199
210
|
--semantic-color-surface-inverse: var(--primitive-color-neutral-black);
|
|
200
|
-
--semantic-color-surface-accent: var(--primitive-color-
|
|
201
|
-
--semantic-color-surface-accentSubtle: var(--primitive-color-
|
|
211
|
+
--semantic-color-surface-accent: var(--primitive-color-apple-500);
|
|
212
|
+
--semantic-color-surface-accentSubtle: var(--primitive-color-apple-50);
|
|
202
213
|
--semantic-color-surface-hover: var(--primitive-color-neutral-100);
|
|
203
214
|
--semantic-color-surface-pressed: var(--primitive-color-neutral-50);
|
|
204
215
|
--semantic-color-surface-selected: var(--primitive-color-neutral-200);
|
|
@@ -208,8 +219,8 @@
|
|
|
208
219
|
--semantic-color-content-secondary: var(--primitive-color-neutral-600);
|
|
209
220
|
--semantic-color-content-disabled: var(--primitive-color-neutral-300);
|
|
210
221
|
--semantic-color-content-inverse: var(--primitive-color-neutral-100);
|
|
211
|
-
--semantic-color-content-accent: var(--primitive-color-
|
|
212
|
-
--semantic-color-content-onAccent: var(--primitive-color-neutral-
|
|
222
|
+
--semantic-color-content-accent: var(--primitive-color-apple-700);
|
|
223
|
+
--semantic-color-content-onAccent: var(--primitive-color-neutral-900);
|
|
213
224
|
--semantic-color-content-success: var(--primitive-color-green-700);
|
|
214
225
|
--semantic-color-content-warning: var(--primitive-color-amber-800);
|
|
215
226
|
--semantic-color-content-danger: var(--primitive-color-red-700);
|
|
@@ -218,7 +229,7 @@
|
|
|
218
229
|
--semantic-color-border-subdued: var(--primitive-color-neutral-200);
|
|
219
230
|
--semantic-color-border-subtle: var(--primitive-color-neutral-100);
|
|
220
231
|
--semantic-color-border-strong: var(--primitive-color-neutral-300);
|
|
221
|
-
--semantic-color-border-accent: var(--primitive-color-
|
|
232
|
+
--semantic-color-border-accent: var(--primitive-color-apple-600);
|
|
222
233
|
--semantic-color-border-success: var(--primitive-color-green-400);
|
|
223
234
|
--semantic-color-border-warning: var(--primitive-color-amber-400);
|
|
224
235
|
--semantic-color-feedback-error: var(--primitive-color-red-700);
|
|
@@ -335,14 +346,14 @@
|
|
|
335
346
|
--semantic-docs-space-section: var(--primitive-space-12);
|
|
336
347
|
--semantic-docs-space-paragraph: var(--primitive-space-6);
|
|
337
348
|
--semantic-docs-space-inline: var(--primitive-space-2);
|
|
338
|
-
--semantic-accent-rest: var(--primitive-color-
|
|
339
|
-
--semantic-accent-hover: var(--primitive-color-
|
|
340
|
-
--semantic-accent-pressed: var(--primitive-color-
|
|
349
|
+
--semantic-accent-rest: var(--primitive-color-apple-500);
|
|
350
|
+
--semantic-accent-hover: var(--primitive-color-apple-600);
|
|
351
|
+
--semantic-accent-pressed: var(--primitive-color-apple-700);
|
|
341
352
|
--semantic-accent-inactive: var(--primitive-color-neutral-400);
|
|
342
353
|
--semantic-accent-disabled: var(--primitive-color-neutral-300);
|
|
343
|
-
--semantic-accent-content: var(--primitive-color-
|
|
344
|
-
--semantic-accent-contentHover: var(--primitive-color-
|
|
345
|
-
--semantic-accent-subtle: var(--primitive-color-
|
|
354
|
+
--semantic-accent-content: var(--primitive-color-apple-700);
|
|
355
|
+
--semantic-accent-contentHover: var(--primitive-color-apple-800);
|
|
356
|
+
--semantic-accent-subtle: var(--primitive-color-apple-50);
|
|
346
357
|
--semantic-radius-action: var(--primitive-radius-8);
|
|
347
358
|
--semantic-radius-control: var(--primitive-radius-4);
|
|
348
359
|
--semantic-borderWidth-default: var(--primitive-borderWidth-xs);
|
|
@@ -493,8 +504,8 @@
|
|
|
493
504
|
--semantic-color-surface-overlay: var(--primitive-color-neutral-850);
|
|
494
505
|
--semantic-color-surface-scrim: var(--primitive-color-neutral-black);
|
|
495
506
|
--semantic-color-surface-inverse: var(--primitive-color-neutral-white);
|
|
496
|
-
--semantic-color-surface-accent: var(--primitive-color-
|
|
497
|
-
--semantic-color-surface-accentSubtle: var(--primitive-color-
|
|
507
|
+
--semantic-color-surface-accent: var(--primitive-color-apple-400);
|
|
508
|
+
--semantic-color-surface-accentSubtle: var(--primitive-color-apple-900);
|
|
498
509
|
--semantic-color-surface-hover: var(--primitive-color-neutral-900);
|
|
499
510
|
--semantic-color-surface-pressed: var(--primitive-color-neutral-950);
|
|
500
511
|
--semantic-color-surface-selected: var(--primitive-color-neutral-800);
|
|
@@ -504,7 +515,7 @@
|
|
|
504
515
|
--semantic-color-content-secondary: var(--primitive-color-neutral-400);
|
|
505
516
|
--semantic-color-content-disabled: var(--primitive-color-neutral-600);
|
|
506
517
|
--semantic-color-content-inverse: var(--primitive-color-neutral-900);
|
|
507
|
-
--semantic-color-content-accent: var(--primitive-color-
|
|
518
|
+
--semantic-color-content-accent: var(--primitive-color-apple-400);
|
|
508
519
|
--semantic-color-content-onAccent: var(--primitive-color-neutral-900);
|
|
509
520
|
--semantic-color-content-success: var(--primitive-color-green-400);
|
|
510
521
|
--semantic-color-content-warning: var(--primitive-color-amber-400);
|
|
@@ -514,7 +525,7 @@
|
|
|
514
525
|
--semantic-color-border-subdued: var(--primitive-color-neutral-800);
|
|
515
526
|
--semantic-color-border-subtle: var(--primitive-color-neutral-850);
|
|
516
527
|
--semantic-color-border-strong: var(--primitive-color-neutral-600);
|
|
517
|
-
--semantic-color-border-accent: var(--primitive-color-
|
|
528
|
+
--semantic-color-border-accent: var(--primitive-color-apple-400);
|
|
518
529
|
--semantic-color-border-success: var(--primitive-color-green-400);
|
|
519
530
|
--semantic-color-border-warning: var(--primitive-color-amber-400);
|
|
520
531
|
--semantic-color-feedback-error: var(--primitive-color-red-400);
|
|
@@ -528,14 +539,14 @@
|
|
|
528
539
|
--semantic-color-feedback-bg-info: var(--primitive-color-blue-900);
|
|
529
540
|
--semantic-color-feedback-bg-inProgress: var(--primitive-color-violet-950);
|
|
530
541
|
--semantic-color-state-pressed-overlay: var(--primitive-color-neutral-white);
|
|
531
|
-
--semantic-accent-rest: var(--primitive-color-
|
|
532
|
-
--semantic-accent-hover: var(--primitive-color-
|
|
533
|
-
--semantic-accent-pressed: var(--primitive-color-
|
|
542
|
+
--semantic-accent-rest: var(--primitive-color-apple-400);
|
|
543
|
+
--semantic-accent-hover: var(--primitive-color-apple-500);
|
|
544
|
+
--semantic-accent-pressed: var(--primitive-color-apple-600);
|
|
534
545
|
--semantic-accent-inactive: var(--primitive-color-neutral-600);
|
|
535
546
|
--semantic-accent-disabled: var(--primitive-color-neutral-700);
|
|
536
|
-
--semantic-accent-content: var(--primitive-color-
|
|
537
|
-
--semantic-accent-contentHover: var(--primitive-color-
|
|
538
|
-
--semantic-accent-subtle: var(--primitive-color-
|
|
547
|
+
--semantic-accent-content: var(--primitive-color-apple-400);
|
|
548
|
+
--semantic-accent-contentHover: var(--primitive-color-apple-300);
|
|
549
|
+
--semantic-accent-subtle: var(--primitive-color-apple-900);
|
|
539
550
|
--component-badge-bg: var(--semantic-color-feedback-bg-info);
|
|
540
551
|
--component-button-primary-textDisabled: var(--semantic-color-content-disabled);
|
|
541
552
|
--semantic-elevation-flat-surface: var(--semantic-color-surface-page);
|
package/docs/CONSUMING.md
CHANGED
|
@@ -70,16 +70,16 @@ All three:
|
|
|
70
70
|
### Brand fonts (optional)
|
|
71
71
|
|
|
72
72
|
```ts
|
|
73
|
-
import '@hirobius/design-system/fonts.css'; //
|
|
73
|
+
import '@hirobius/design-system/fonts.css'; // Plus Jakarta Sans 400/500/700 + IBM Plex Mono 400
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
`fonts.css` declares the four `@font-face` blocks with `font-display: swap`. Its
|
|
77
|
-
URLs are relative (`./fonts/
|
|
77
|
+
URLs are relative (`./fonts/plus-jakarta-sans-400.woff2`), and the woff2 files ship in the
|
|
78
78
|
package, so Vite, Next and webpack resolve and hash them; there is nothing to
|
|
79
79
|
copy. Import it alongside one of the stylesheets above to keep the HDS fonts.
|
|
80
80
|
Skip it to bring your own: `tokens.css` and `styles.css` keep the
|
|
81
81
|
`--hds-font-family*` variables, so text falls back to the family stack
|
|
82
|
-
(`"
|
|
82
|
+
(`"Plus Jakarta Sans", system-ui, …`) and uses your font if you declare that family
|
|
83
83
|
yourself.
|
|
84
84
|
|
|
85
85
|
HDS's own base styles (type baseline, resets) are scoped to the `[data-hds]`
|
|
@@ -229,7 +229,7 @@ export function Example() {
|
|
|
229
229
|
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
230
230
|
| `@hirobius/design-system` | The 43-component core set ([README → What belongs in the system](../README.md#what-belongs-in-the-system)), the rest of the allow-list, and the router seam (`HdsRouterProvider`, `useHdsRouter`); the `pattern` tier is in `/patterns` |
|
|
231
231
|
| `@hirobius/design-system/styles.css` | Components + utilities + tokens, NO global reset (host-safe; recommended for embedding) |
|
|
232
|
-
| `@hirobius/design-system/fonts.css` | Optional brand fonts:
|
|
232
|
+
| `@hirobius/design-system/fonts.css` | Optional brand fonts: Plus Jakarta Sans 400/500/700 + IBM Plex Mono 400 (`@font-face`, relative woff2 URLs) |
|
|
233
233
|
| `@hirobius/design-system/tokens.css` | The complete stylesheet — styles.css PLUS a global Tailwind-preflight reset |
|
|
234
234
|
| `@hirobius/design-system/variables.css` | Design tokens as CSS custom properties ONLY — no reset/preflight (host-safe) |
|
|
235
235
|
| `@hirobius/design-system/tokens` | Design-token values as typed TS |
|
|
@@ -503,7 +503,7 @@ npx skills add hirobius/hds --skill hds-consumer
|
|
|
503
503
|
| `npm ERR! 404` on install | Check the package name spelling; if pinning a version, confirm it's published on npm (`npm view @hirobius/design-system version`). Public npm needs no auth (see §1–2). |
|
|
504
504
|
| `ERR_REQUIRE_ESM` / `require() of ES Module` | Consumer is CommonJS — switch to an ESM bundler (§9). |
|
|
505
505
|
| Components render unstyled / wrong font | Import `@hirobius/design-system/styles.css` (or `tokens.css`) at the app root (§3) **and** add `data-hds` to your root or section (§4). |
|
|
506
|
-
| Text uses the host font, not
|
|
506
|
+
| Text uses the host font, not Plus Jakarta Sans | Missing `data-hds` on an ancestor (§4). |
|
|
507
507
|
| In-app links do a full page reload | Expected with no router. Inject your router via `<HdsRouterProvider>` for SPA nav (§5). |
|
|
508
508
|
| Host app's spacing/layout shifted after adding HDS | Tailwind preflight ships global this release (§6); scope HDS to a section and isolate where possible. |
|
|
509
509
|
| Brand overlay has no effect on an Astro page | Inject the overlay on an ancestor of the themed markup (usually `<html>`), and ensure `variables.css` is imported once (§12). |
|