@hirobius/design-system 0.19.1 → 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 +11 -6
- package/DESIGN.md +34 -21
- package/NOTICE.md +1 -1
- package/README.md +48 -13
- package/codemods/hds-prefix.mjs +231 -0
- package/codemods/jsx-fold.mjs +515 -0
- package/codemods/not-found-pattern.mjs +71 -0
- package/codemods/patterns-subpath.mjs +242 -81
- package/codemods/patterns-subpath.names.json +41 -15
- package/codemods/removed-0.20.json +194 -0
- package/codemods/tile-grid.mjs +283 -0
- package/codemods/unrewritable.mjs +291 -0
- package/dist/chunks/DemoStateContext-Cz5TmrYu.js +32 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- package/dist/contexts.js +157 -78
- 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 +1600 -5354
- package/dist/manifest.js +12 -13
- package/dist/patterns.js +796 -510
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +165 -65
- 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 +2 -2
- package/dist/types/src/app/components/badge.d.ts +8 -3
- package/dist/types/src/app/components/blockquote.d.ts +2 -2
- package/dist/types/src/app/components/box-sx.d.ts +110 -13
- package/dist/types/src/app/components/box.d.ts +6 -3
- package/dist/types/src/app/components/breadcrumb.d.ts +0 -5
- package/dist/types/src/app/components/button.d.ts +35 -4
- package/dist/types/src/app/components/card.d.ts +10 -10
- package/dist/types/src/app/components/combobox.d.ts +47 -11
- package/dist/types/src/app/components/container.d.ts +2 -2
- package/dist/types/src/app/components/data-table-section.d.ts +2 -1
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +8 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -5
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -2
- 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 +15 -6
- package/dist/types/src/app/components/hds-tooltip.d.ts +12 -2
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-code.d.ts +1 -2
- package/dist/types/src/app/components/input.d.ts +8 -5
- package/dist/types/src/app/components/kbd.d.ts +2 -2
- package/dist/types/src/app/components/metadata-list.d.ts +2 -2
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/page-header.d.ts +0 -2
- package/dist/types/src/app/components/popover.d.ts +8 -0
- package/dist/types/src/app/components/progress.d.ts +33 -6
- package/dist/types/src/app/components/segmented-control.d.ts +2 -26
- package/dist/types/src/app/components/select.d.ts +10 -1
- package/dist/types/src/app/components/skeleton.d.ts +3 -4
- package/dist/types/src/app/components/spinner.d.ts +1 -2
- package/dist/types/src/app/components/stack.d.ts +4 -1
- package/dist/types/src/app/components/stat.d.ts +5 -5
- package/dist/types/src/app/components/status-list-item.d.ts +1 -2
- package/dist/types/src/app/components/status-tile.d.ts +3 -2
- package/dist/types/src/app/components/surface.d.ts +2 -3
- package/dist/types/src/app/components/switcher.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +6 -15
- package/dist/types/src/app/components/tag.d.ts +0 -6
- package/dist/types/src/app/components/text.d.ts +54 -8
- package/dist/types/src/app/components/textarea.d.ts +1 -2
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -2
- package/dist/types/src/app/components/tooltip.d.ts +1 -1
- package/dist/types/src/app/context/DemoStateContext.d.ts +1 -1
- package/dist/types/src/app/context/RouterContext.d.ts +5 -5
- package/dist/types/src/app/data/manifest-types.d.ts +10 -5
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +45 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +4 -0
- package/dist/types/src/app/design-system/tokens.d.ts +139 -18
- package/dist/types/src/icons.d.ts +1 -1
- package/dist/types/src/index.d.ts +76 -164
- package/dist/types/src/patterns.d.ts +20 -25
- package/dist/variables.css +47 -33
- package/docs/CONSUMING.md +80 -48
- package/hirobius.tokens.json +125 -88
- package/llms.txt +166 -59
- 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 +48 -27
- package/public/hds-manifest.json +2667 -6705
- package/public/llms/components.txt +45 -426
- package/public/llms/layout.txt +5 -5
- package/public/llms-full.txt +245 -506
- package/public/llms.txt +166 -59
- 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 +1082 -2913
- package/dist/chunks/LanguageContext-BxdCwiFg.js +0 -95
- package/dist/chunks/TokenDisplayContext-DKYJMVWk.js +0 -26
- package/dist/chunks/activity-feed-BGQ6v3wc.js +0 -22040
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/activity-feed.d.ts +0 -73
- package/dist/types/src/app/components/app-shell.d.ts +0 -40
- package/dist/types/src/app/components/aspect-ratio.d.ts +0 -25
- package/dist/types/src/app/components/bleed.d.ts +0 -39
- package/dist/types/src/app/components/button-group.d.ts +0 -22
- package/dist/types/src/app/components/calendar.d.ts +0 -22
- package/dist/types/src/app/components/carousel.d.ts +0 -26
- package/dist/types/src/app/components/center.d.ts +0 -36
- package/dist/types/src/app/components/cinematic-link.d.ts +0 -18
- package/dist/types/src/app/components/circular-progress.d.ts +0 -28
- package/dist/types/src/app/components/cluster.d.ts +0 -39
- package/dist/types/src/app/components/command-palette.d.ts +0 -46
- package/dist/types/src/app/components/component-instance-matrix.d.ts +0 -27
- package/dist/types/src/app/components/context-menu.d.ts +0 -78
- package/dist/types/src/app/components/cover.d.ts +0 -43
- package/dist/types/src/app/components/date-input.d.ts +0 -31
- package/dist/types/src/app/components/date-range-input.d.ts +0 -34
- package/dist/types/src/app/components/date-time-input.d.ts +0 -30
- package/dist/types/src/app/components/doc-link-card.d.ts +0 -32
- package/dist/types/src/app/components/error-boundary.d.ts +0 -25
- package/dist/types/src/app/components/file-input.d.ts +0 -30
- package/dist/types/src/app/components/foundation-swatch.d.ts +0 -45
- package/dist/types/src/app/components/frame.d.ts +0 -38
- package/dist/types/src/app/components/heading-stack.d.ts +0 -52
- package/dist/types/src/app/components/history-card.d.ts +0 -12
- package/dist/types/src/app/components/hover-card.d.ts +0 -46
- package/dist/types/src/app/components/icon-button.d.ts +0 -22
- package/dist/types/src/app/components/image-lightbox.d.ts +0 -14
- package/dist/types/src/app/components/input-group.d.ts +0 -23
- package/dist/types/src/app/components/multi-selector.d.ts +0 -40
- package/dist/types/src/app/components/nav-group.d.ts +0 -29
- package/dist/types/src/app/components/nav-item.d.ts +0 -33
- package/dist/types/src/app/components/not-found-pattern.d.ts +0 -1
- package/dist/types/src/app/components/overflow-list.d.ts +0 -21
- package/dist/types/src/app/components/selectable-card.d.ts +0 -29
- package/dist/types/src/app/components/side-nav.d.ts +0 -23
- package/dist/types/src/app/components/sketch.d.ts +0 -19
- package/dist/types/src/app/components/stacked-card-rail.d.ts +0 -32
- package/dist/types/src/app/components/status-dot.d.ts +0 -25
- package/dist/types/src/app/components/stepper-field.d.ts +0 -12
- package/dist/types/src/app/components/stepper.d.ts +0 -33
- package/dist/types/src/app/components/text-lockup.d.ts +0 -38
- package/dist/types/src/app/components/tile-grid.d.ts +0 -17
- package/dist/types/src/app/components/time-input.d.ts +0 -24
- package/dist/types/src/app/components/toggle-button.d.ts +0 -32
- package/dist/types/src/app/components/token.d.ts +0 -90
- package/dist/types/src/app/components/tokenUtils.d.ts +0 -38
- package/dist/types/src/app/components/tokenizer.d.ts +0 -24
- package/dist/types/src/app/components/toolbar.d.ts +0 -36
- package/dist/types/src/app/components/top-nav.d.ts +0 -23
- package/dist/types/src/app/components/tree-list.d.ts +0 -30
- package/dist/types/src/app/data/nav-model.d.ts +0 -39
- package/dist/types/src/app/hooks/useFocusVisible.d.ts +0 -9
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +0 -20
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -14
- package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +0 -6
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +0 -72
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +0 -14
- package/dist/types/src/app/lib/hds-search.d.ts +0 -45
- package/dist/types/src/app/lib/nav-active.d.ts +0 -16
- package/dist/types/src/app/lib/navLevels.d.ts +0 -4
|
@@ -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
|
+
};
|
package/dist/contexts.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { F as
|
|
5
|
-
|
|
6
|
-
const I = ["system", "light", "dark"], d = "hds-theme-mode", P = "hds-theme", T = /* @__PURE__ */ S({
|
|
2
|
+
import { jsx as m, Fragment as P } from "react/jsx-runtime";
|
|
3
|
+
import { useState as l, useCallback as a, useEffect as u, useContext as h, createContext as y } from "react";
|
|
4
|
+
import { F as X, H as Z, u as $, a as tt } from "./chunks/DemoStateContext-Cz5TmrYu.js";
|
|
5
|
+
const M = ["system", "light", "dark"], D = "hds-theme-mode", R = "hds-theme", b = /* @__PURE__ */ y({
|
|
7
6
|
isDark: !0,
|
|
8
7
|
toggleDark: () => {
|
|
9
8
|
},
|
|
@@ -16,22 +15,22 @@ const I = ["system", "light", "dark"], d = "hds-theme-mode", P = "hds-theme", T
|
|
|
16
15
|
setDensity: () => {
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
|
-
function
|
|
18
|
+
function S() {
|
|
20
19
|
try {
|
|
21
|
-
const t = localStorage.getItem(
|
|
22
|
-
if (t &&
|
|
20
|
+
const t = localStorage.getItem(D);
|
|
21
|
+
if (t && M.includes(t)) return t;
|
|
23
22
|
} catch {
|
|
24
23
|
}
|
|
25
24
|
return "system";
|
|
26
25
|
}
|
|
27
|
-
function
|
|
26
|
+
function _() {
|
|
28
27
|
var t;
|
|
29
28
|
return typeof window > "u" ? !1 : !!((t = window.matchMedia) != null && t.call(window, "(prefers-color-scheme: dark)").matches);
|
|
30
29
|
}
|
|
31
|
-
function
|
|
32
|
-
return t === "dark" ? !0 : t === "light" ? !1 :
|
|
30
|
+
function v(t) {
|
|
31
|
+
return t === "dark" ? !0 : t === "light" ? !1 : _();
|
|
33
32
|
}
|
|
34
|
-
function
|
|
33
|
+
function O() {
|
|
35
34
|
try {
|
|
36
35
|
const t = localStorage.getItem("hds-density");
|
|
37
36
|
if (t === "compact" || t === "comfortable") return t;
|
|
@@ -39,103 +38,183 @@ function C() {
|
|
|
39
38
|
}
|
|
40
39
|
return "comfortable";
|
|
41
40
|
}
|
|
42
|
-
function
|
|
43
|
-
const [
|
|
44
|
-
const
|
|
41
|
+
function H({ children: t }) {
|
|
42
|
+
const [e, r] = l(S), [o, d] = l(() => v(S())), [c, g] = l(O), f = a((n) => {
|
|
43
|
+
const s = n ? "dark" : "light";
|
|
45
44
|
try {
|
|
46
|
-
localStorage.setItem(
|
|
45
|
+
localStorage.setItem(R, s);
|
|
47
46
|
} catch {
|
|
48
47
|
}
|
|
49
|
-
document.documentElement.setAttribute("data-theme",
|
|
48
|
+
document.documentElement.setAttribute("data-theme", s), document.documentElement.classList.toggle("dark", n);
|
|
50
49
|
}, []);
|
|
51
|
-
|
|
50
|
+
u(() => {
|
|
52
51
|
try {
|
|
53
52
|
localStorage.setItem("hds-density", c);
|
|
54
53
|
} catch {
|
|
55
54
|
}
|
|
56
55
|
document.documentElement.setAttribute("data-density", c);
|
|
57
|
-
}, [c]),
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
62
|
-
|
|
56
|
+
}, [c]), u(() => {
|
|
57
|
+
f(o);
|
|
58
|
+
}, [o, f]), u(() => {
|
|
59
|
+
if (e !== "system" || typeof window > "u" || !window.matchMedia) return;
|
|
60
|
+
const n = window.matchMedia("(prefers-color-scheme: dark)"), s = () => {
|
|
61
|
+
d(n.matches);
|
|
63
62
|
};
|
|
64
|
-
return
|
|
65
|
-
|
|
63
|
+
return n.addEventListener("change", s), () => {
|
|
64
|
+
n.removeEventListener("change", s);
|
|
66
65
|
};
|
|
67
|
-
}, [
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
|
|
66
|
+
}, [e]);
|
|
67
|
+
const i = a(() => {
|
|
68
|
+
const n = !o, s = n ? "dark" : "light";
|
|
69
|
+
r(s), d(n);
|
|
71
70
|
try {
|
|
72
|
-
localStorage.setItem(
|
|
71
|
+
localStorage.setItem(D, s);
|
|
73
72
|
} catch {
|
|
74
73
|
}
|
|
75
|
-
}, [
|
|
76
|
-
|
|
74
|
+
}, [o]), I = a((n) => {
|
|
75
|
+
r(n), d(v(n));
|
|
77
76
|
try {
|
|
78
|
-
localStorage.setItem(
|
|
77
|
+
localStorage.setItem(D, n);
|
|
79
78
|
} catch {
|
|
80
79
|
}
|
|
81
|
-
}, []),
|
|
82
|
-
() =>
|
|
80
|
+
}, []), x = a(
|
|
81
|
+
() => g((n) => n === "comfortable" ? "compact" : "comfortable"),
|
|
83
82
|
[]
|
|
84
|
-
),
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
|
|
83
|
+
), L = a((n) => g(n), []);
|
|
84
|
+
return /* @__PURE__ */ m(
|
|
85
|
+
b.Provider,
|
|
87
86
|
{
|
|
88
|
-
value: { isDark:
|
|
87
|
+
value: { isDark: o, toggleDark: i, mode: e, setMode: I, density: c, toggleDensity: x, setDensity: L },
|
|
89
88
|
children: t
|
|
90
89
|
}
|
|
91
90
|
);
|
|
92
91
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
92
|
+
function N() {
|
|
93
|
+
return h(b);
|
|
95
94
|
}
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
const p = {
|
|
96
|
+
en: {
|
|
97
|
+
language: "en",
|
|
98
|
+
dir: "ltr",
|
|
99
|
+
label: "English",
|
|
100
|
+
nativeLabel: "English"
|
|
101
|
+
}
|
|
102
|
+
}, A = /* @__PURE__ */ y({
|
|
103
|
+
language: "en",
|
|
104
|
+
direction: "ltr",
|
|
105
|
+
isRtl: !1,
|
|
106
|
+
setLanguage: () => {
|
|
107
|
+
},
|
|
108
|
+
setDirection: () => {
|
|
109
|
+
},
|
|
110
|
+
toggleDirection: () => {
|
|
111
|
+
},
|
|
112
|
+
options: p
|
|
113
|
+
});
|
|
114
|
+
function F() {
|
|
115
|
+
try {
|
|
116
|
+
const t = localStorage.getItem("hds-direction");
|
|
117
|
+
if (t === "ltr" || t === "rtl") return t;
|
|
118
|
+
} catch {
|
|
119
|
+
}
|
|
120
|
+
return "ltr";
|
|
99
121
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
122
|
+
function z({ children: t }) {
|
|
123
|
+
const [e, r] = l(F), o = "en", d = e === "rtl";
|
|
124
|
+
u(() => {
|
|
125
|
+
try {
|
|
126
|
+
localStorage.setItem("hds-direction", e);
|
|
127
|
+
} catch {
|
|
128
|
+
}
|
|
129
|
+
document.documentElement.setAttribute("lang", "en"), document.documentElement.setAttribute("data-language", "en"), document.documentElement.setAttribute("dir", e), document.documentElement.setAttribute("data-reading-direction", e);
|
|
130
|
+
}, [e]);
|
|
131
|
+
const c = a((i) => {
|
|
132
|
+
}, []), g = a((i) => {
|
|
133
|
+
r(i);
|
|
134
|
+
}, []), f = a(() => {
|
|
135
|
+
r((i) => i === "ltr" ? "rtl" : "ltr");
|
|
136
|
+
}, []);
|
|
137
|
+
return /* @__PURE__ */ m(
|
|
138
|
+
A.Provider,
|
|
139
|
+
{
|
|
140
|
+
value: {
|
|
141
|
+
language: o,
|
|
142
|
+
direction: e,
|
|
143
|
+
isRtl: d,
|
|
144
|
+
setLanguage: c,
|
|
145
|
+
setDirection: g,
|
|
146
|
+
toggleDirection: f,
|
|
147
|
+
options: p
|
|
148
|
+
},
|
|
149
|
+
children: t
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
function K() {
|
|
154
|
+
return h(A);
|
|
102
155
|
}
|
|
103
|
-
|
|
156
|
+
const T = /* @__PURE__ */ y({ tenantSlug: null }), k = ["data-brand", "data-tenant"];
|
|
157
|
+
function E(t) {
|
|
158
|
+
for (const e of k) document.documentElement.setAttribute(e, t);
|
|
159
|
+
}
|
|
160
|
+
function w() {
|
|
161
|
+
for (const t of k) document.documentElement.removeAttribute(t);
|
|
162
|
+
}
|
|
163
|
+
function Y({
|
|
104
164
|
children: t,
|
|
105
|
-
slug:
|
|
165
|
+
slug: e = null
|
|
106
166
|
}) {
|
|
107
|
-
return
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
110
|
-
}, [
|
|
111
|
-
}
|
|
112
|
-
function
|
|
113
|
-
return
|
|
114
|
-
}
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
|
|
167
|
+
return u(() => {
|
|
168
|
+
if (e)
|
|
169
|
+
return E(e), () => w();
|
|
170
|
+
}, [e]), /* @__PURE__ */ m(T.Provider, { value: { tenantSlug: e }, children: t });
|
|
171
|
+
}
|
|
172
|
+
function j() {
|
|
173
|
+
return h(T);
|
|
174
|
+
}
|
|
175
|
+
function q(t) {
|
|
176
|
+
u(() => {
|
|
177
|
+
const e = document.documentElement.getAttribute("data-brand");
|
|
178
|
+
return E(t), () => {
|
|
179
|
+
e !== null ? E(e) : w();
|
|
120
180
|
};
|
|
121
181
|
}, [t]);
|
|
122
182
|
}
|
|
123
|
-
function
|
|
124
|
-
return /* @__PURE__ */
|
|
183
|
+
function U({ children: t }) {
|
|
184
|
+
return /* @__PURE__ */ m(P, { children: t });
|
|
185
|
+
}
|
|
186
|
+
const C = /* @__PURE__ */ y(
|
|
187
|
+
void 0
|
|
188
|
+
);
|
|
189
|
+
function V({ children: t }) {
|
|
190
|
+
const [e, r] = l(!1);
|
|
191
|
+
return /* @__PURE__ */ m(
|
|
192
|
+
C.Provider,
|
|
193
|
+
{
|
|
194
|
+
value: { showCss: e, setShowCss: r, toggleCss: () => r((o) => !o) },
|
|
195
|
+
children: t
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
function J() {
|
|
200
|
+
const t = h(C);
|
|
201
|
+
return t || { showCss: !1, setShowCss: () => {
|
|
202
|
+
}, toggleCss: () => {
|
|
203
|
+
} };
|
|
125
204
|
}
|
|
126
205
|
export {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
206
|
+
U as FontProvider,
|
|
207
|
+
X as FreezeState,
|
|
208
|
+
Z as HdsRouterProvider,
|
|
209
|
+
z as LanguageProvider,
|
|
210
|
+
Y as TenantProvider,
|
|
211
|
+
H as ThemeProvider,
|
|
212
|
+
V as TokenDisplayProvider,
|
|
213
|
+
$ as useFrozenState,
|
|
214
|
+
tt as useHdsRouter,
|
|
215
|
+
K as useLanguage,
|
|
216
|
+
j as useTenant,
|
|
217
|
+
q as useTenantOnDocument,
|
|
218
|
+
N as useTheme,
|
|
219
|
+
J as useTokenDisplay
|
|
141
220
|
};
|
|
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",
|