@hirobius/design-system 0.20.0 → 0.21.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 +123 -0
- package/CONSUMING.md +4 -2
- package/DESIGN.md +28 -17
- package/NOTICE.md +1 -1
- package/README.md +37 -5
- 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 +1 -1
- 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/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +1 -0
- package/dist/types/src/app/components/badge.d.ts +1 -1
- package/dist/types/src/app/components/blockquote.d.ts +1 -0
- package/dist/types/src/app/components/button.d.ts +2 -0
- package/dist/types/src/app/components/card.d.ts +3 -2
- 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 +1 -0
- package/dist/types/src/app/components/error-pattern.d.ts +6 -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/grid.d.ts +5 -0
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/kbd.d.ts +1 -0
- 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/progress.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +1 -1
- package/dist/types/src/app/components/stat.d.ts +4 -3
- package/dist/types/src/app/components/status-tile.d.ts +3 -2
- package/dist/types/src/app/components/table.d.ts +5 -0
- package/dist/types/src/app/components/text.d.ts +53 -6
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- 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 +43 -40
- package/dist/variables.css +41 -33
- package/docs/CONSUMING.md +63 -39
- package/hirobius.tokens.json +77 -73
- package/llms.txt +158 -50
- package/mcp/catalog.mjs +366 -0
- package/mcp/guide.mjs +315 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +35 -9
- package/public/hds-manifest.json +348 -254
- 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 +114 -53
- 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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { cn as m } from "../cn.js";
|
|
5
|
+
const I = /* @__PURE__ */ s.forwardRef(function({ className: e, ...n }, o) {
|
|
6
|
+
return /* @__PURE__ */ f("form", { ref: o, className: m("flex flex-col gap-4", e), ...n });
|
|
7
|
+
});
|
|
8
|
+
function x({
|
|
9
|
+
htmlFor: c,
|
|
10
|
+
childId: e,
|
|
11
|
+
description: n,
|
|
12
|
+
error: o
|
|
13
|
+
}) {
|
|
14
|
+
const i = s.useId(), r = c ?? e ?? i, d = `${r}-description`, t = `${r}-error`, a = [n ? d : null, o ? t : null].filter(Boolean).join(" ") || void 0;
|
|
15
|
+
return { controlId: r, descriptionId: d, errorId: t, describedBy: a };
|
|
16
|
+
}
|
|
17
|
+
const b = /* @__PURE__ */ s.forwardRef(
|
|
18
|
+
function({ controlId: e, label: n, description: o, error: i, required: r = !1, className: d, children: t }, a) {
|
|
19
|
+
const l = `${e}-description`, u = `${e}-error`;
|
|
20
|
+
return /* @__PURE__ */ p("div", { ref: a, className: m("flex flex-col gap-2", d), children: [
|
|
21
|
+
/* @__PURE__ */ p("label", { htmlFor: e, className: "hds-type-ui text-foreground", children: [
|
|
22
|
+
n,
|
|
23
|
+
r ? /* @__PURE__ */ p("span", { "aria-hidden": "true", className: "text-destructive", children: [
|
|
24
|
+
" ",
|
|
25
|
+
"*"
|
|
26
|
+
] }) : null
|
|
27
|
+
] }),
|
|
28
|
+
t,
|
|
29
|
+
o && !i ? /* @__PURE__ */ f("p", { id: l, className: "hds-type-caption text-muted-foreground", children: o }) : null,
|
|
30
|
+
i ? /* @__PURE__ */ f("p", { id: u, role: "alert", className: "hds-type-caption text-destructive", children: i }) : null
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
33
|
+
), g = /* @__PURE__ */ s.forwardRef(
|
|
34
|
+
function({ label: e, children: n, htmlFor: o, description: i, error: r, required: d = !1, className: t }, a) {
|
|
35
|
+
const l = s.Children.only(n), { controlId: u, describedBy: h } = x({
|
|
36
|
+
htmlFor: o,
|
|
37
|
+
childId: l.props.id,
|
|
38
|
+
description: i,
|
|
39
|
+
error: r
|
|
40
|
+
}), F = s.cloneElement(l, {
|
|
41
|
+
id: u,
|
|
42
|
+
required: l.props.required ?? d,
|
|
43
|
+
"aria-invalid": r ? !0 : l.props["aria-invalid"],
|
|
44
|
+
"aria-describedby": [l.props["aria-describedby"], h].filter(Boolean).join(" ") || void 0
|
|
45
|
+
});
|
|
46
|
+
return /* @__PURE__ */ f(
|
|
47
|
+
b,
|
|
48
|
+
{
|
|
49
|
+
ref: a,
|
|
50
|
+
controlId: u,
|
|
51
|
+
label: e,
|
|
52
|
+
description: i,
|
|
53
|
+
error: r,
|
|
54
|
+
required: d,
|
|
55
|
+
className: t,
|
|
56
|
+
children: F
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
export {
|
|
62
|
+
I as F,
|
|
63
|
+
b as a,
|
|
64
|
+
g as b,
|
|
65
|
+
x as u
|
|
66
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/fonts.css
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* @hirobius/design-system/fonts.css — OPTIONAL brand fonts: Satoshi 400/500/700
|
|
2
|
+
* and Geist Mono 400. tokens.css and styles.css do not include them. Import this
|
|
3
|
+
* once at the app root for the HDS faces, or skip it and load your own; the
|
|
4
|
+
* font-family variables in tokens.css fall back to the family stack either way.
|
|
5
|
+
* The woff2 URLs are relative to this file so your bundler resolves and hashes them. */
|
|
6
|
+
/* Hirobius Design System — font-face declarations.
|
|
7
|
+
*
|
|
8
|
+
* Faces (type ramp, Adrian 2026-10-07, hds#483):
|
|
9
|
+
* - Satoshi 400 — body
|
|
10
|
+
* - Satoshi 500 — ui, caption
|
|
11
|
+
* - Satoshi 700 — display, title
|
|
12
|
+
* - Geist Mono 400 — mono
|
|
13
|
+
*
|
|
14
|
+
* Audit gate: scripts/audit-typography-overrides.mjs fails on inline
|
|
15
|
+
* fontWeight / textTransform outside the sketches lab and a small allowlist.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/* Satoshi — Indian Type Foundry, ITF Free Font License via Fontshare. */
|
|
19
|
+
/* Satoshi Regular — body (400), hds#483 type ramp. */
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: 'Satoshi';
|
|
22
|
+
src: url('./fonts/satoshi-400.woff2') format('woff2');
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-display: swap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Satoshi Medium — ui and caption (500). */
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'Satoshi';
|
|
31
|
+
src: url('./fonts/satoshi-500.woff2') format('woff2');
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
font-style: normal;
|
|
34
|
+
font-display: swap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Satoshi Bold — display/heading weight (700), replaces Clash Display (#48). */
|
|
38
|
+
@font-face {
|
|
39
|
+
font-family: 'Satoshi';
|
|
40
|
+
src: url('./fonts/satoshi-700.woff2') format('woff2');
|
|
41
|
+
font-weight: 700;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-display: swap;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Geist Mono — Vercel, OFL-1.1. */
|
|
47
|
+
@font-face {
|
|
48
|
+
font-family: 'Geist Mono'; /* impeccable-disable-line overused-font -- deliberate brand choice (Adrian directive 2026-05-04, see file header) */
|
|
49
|
+
src: url('./fonts/geist-mono-400.woff2') format('woff2');
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-display: swap;
|
|
53
|
+
}
|
package/dist/form.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useForm as f, FormProvider as h, useController as v } from "react-hook-form";
|
|
3
3
|
import { zodResolver as b } from "@hookform/resolvers/zod";
|
|
4
4
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
import { F as p, u as g, a as S } from "./chunks/form-
|
|
5
|
+
import { F as p, u as g, a as S } from "./chunks/form-By82qZcC.js";
|
|
6
6
|
function y(r, e) {
|
|
7
7
|
return f({
|
|
8
8
|
mode: "onTouched",
|