@hirobius/design-system 0.18.0 → 0.19.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/CONSUMING.md +150 -0
- package/DESIGN.md +220 -0
- package/README.md +14 -2
- package/dist/chunks/{LanguageContext-CH_bwzCq.js → LanguageContext-BxdCwiFg.js} +20 -8
- package/dist/chunks/{TokenDisplayContext-evZi_214.js → TokenDisplayContext-DKYJMVWk.js} +10 -2
- package/dist/chunks/{activity-feed-C8_e-Btq.js → activity-feed-BGQ6v3wc.js} +5248 -3163
- package/dist/chunks/{form-DnGRy27o.js → form-COP3vK9_.js} +31 -29
- package/dist/contexts.js +4 -4
- package/dist/form.js +5 -5
- package/dist/hirobius-ui.js +2790 -3257
- package/dist/icons.js +53 -0
- package/dist/manifest.js +15 -14
- package/dist/patterns.js +284 -101
- package/dist/static.css +3 -3
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/types/src/app/components/alert-dialog.d.ts +9 -1
- package/dist/types/src/app/components/alert.d.ts +4 -0
- package/dist/types/src/app/components/avatar.d.ts +4 -0
- package/dist/types/src/app/components/badge.d.ts +4 -0
- package/dist/types/src/app/components/box.d.ts +5 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +4 -0
- package/dist/types/src/app/components/button-group.d.ts +4 -0
- package/dist/types/src/app/components/button.d.ts +3 -0
- package/dist/types/src/app/components/card.d.ts +9 -0
- package/dist/types/src/app/components/checkbox.d.ts +4 -0
- package/dist/types/src/app/components/combobox.d.ts +10 -0
- package/dist/types/src/app/components/command-palette.d.ts +3 -1
- package/dist/types/src/app/components/container.d.ts +5 -0
- package/dist/types/src/app/components/context-menu.d.ts +25 -2
- package/dist/types/src/app/components/data-table-section.d.ts +45 -0
- package/dist/types/src/app/components/destructive-section.d.ts +32 -0
- package/dist/types/src/app/components/dialog.d.ts +20 -2
- package/dist/types/src/app/components/disclosure.d.ts +3 -0
- package/dist/types/src/app/components/divider.d.ts +4 -0
- package/dist/types/src/app/components/empty-state.d.ts +4 -0
- package/dist/types/src/app/components/field.d.ts +4 -0
- package/dist/types/src/app/components/form-actions.d.ts +26 -0
- package/dist/types/src/app/components/grid.d.ts +4 -0
- package/dist/types/src/app/components/hds-tooltip.d.ts +14 -2
- package/dist/types/src/app/components/hover-card.d.ts +16 -1
- package/dist/types/src/app/components/icon.d.ts +4 -0
- package/dist/types/src/app/components/inline-link.d.ts +4 -0
- package/dist/types/src/app/components/input.d.ts +5 -0
- package/dist/types/src/app/components/kbd.d.ts +3 -0
- package/dist/types/src/app/components/menu.d.ts +26 -2
- package/dist/types/src/app/components/metric-tiles.d.ts +40 -0
- package/dist/types/src/app/components/page-header.d.ts +34 -0
- package/dist/types/src/app/components/pagination.d.ts +3 -0
- package/dist/types/src/app/components/popover.d.ts +14 -2
- package/dist/types/src/app/components/progress.d.ts +4 -0
- package/dist/types/src/app/components/radio.d.ts +5 -0
- package/dist/types/src/app/components/select.d.ts +16 -0
- package/dist/types/src/app/components/skeleton.d.ts +4 -0
- package/dist/types/src/app/components/slider.d.ts +3 -0
- package/dist/types/src/app/components/spinner.d.ts +4 -0
- package/dist/types/src/app/components/stack.d.ts +4 -0
- package/dist/types/src/app/components/stat.d.ts +4 -0
- package/dist/types/src/app/components/status-tile.d.ts +4 -0
- package/dist/types/src/app/components/table.d.ts +36 -4
- package/dist/types/src/app/components/tabs.d.ts +4 -0
- package/dist/types/src/app/components/tag.d.ts +3 -0
- package/dist/types/src/app/components/text.d.ts +4 -0
- package/dist/types/src/app/components/textarea.d.ts +3 -0
- package/dist/types/src/app/components/toast.d.ts +4 -0
- package/dist/types/src/app/components/toggle.d.ts +4 -0
- package/dist/types/src/app/components/tooltip.d.ts +1 -1
- package/dist/types/src/app/components/visually-hidden.d.ts +3 -0
- package/dist/types/src/app/context/hds-portal.d.ts +52 -0
- package/dist/types/src/app/context/hds-theme.d.ts +10 -0
- package/dist/types/src/app/data/manifest-types.d.ts +27 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +2 -0
- package/dist/types/src/icons.d.ts +13 -0
- package/dist/types/src/index.d.ts +20 -1
- package/dist/types/src/patterns.d.ts +5 -0
- package/dist/variables.css +4 -0
- package/docs/CONSUMING.md +758 -0
- package/hirobius.tokens.json +17 -0
- package/llms.txt +261 -0
- package/package.json +22 -4
- package/public/hds-manifest.json +1605 -105
- package/public/llms/components.txt +1090 -0
- package/public/llms/layout.txt +54 -0
- package/public/llms/scroll.txt +22 -0
- package/public/llms/tokens.txt +32 -0
- package/public/llms-full.txt +1561 -0
- package/public/llms.txt +261 -0
- package/src/app/data/component-api.json +6156 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as m, jsxs as u } from "react/jsx-runtime";
|
|
3
3
|
import * as s from "react";
|
|
4
4
|
import { cn as p } from "../cn.js";
|
|
5
|
-
const g = s.forwardRef(function({ className: e, ...l }, o) {
|
|
5
|
+
const g = /* @__PURE__ */ s.forwardRef(function({ className: e, ...l }, o) {
|
|
6
6
|
return /* @__PURE__ */ m("form", { ref: o, className: p("flex flex-col gap-4", e), ...l });
|
|
7
7
|
});
|
|
8
8
|
function F({
|
|
@@ -14,7 +14,7 @@ function F({
|
|
|
14
14
|
const i = s.useId(), r = c ?? e ?? i, n = `${r}-description`, d = `${r}-error`, a = [l ? n : null, o ? d : null].filter(Boolean).join(" ") || void 0;
|
|
15
15
|
return { controlId: r, descriptionId: n, errorId: d, describedBy: a };
|
|
16
16
|
}
|
|
17
|
-
const b = s.forwardRef(
|
|
17
|
+
const b = /* @__PURE__ */ s.forwardRef(
|
|
18
18
|
function({ controlId: e, label: l, description: o, error: i, required: r = !1, className: n, children: d }, a) {
|
|
19
19
|
const t = `${e}-description`, f = `${e}-error`;
|
|
20
20
|
return /* @__PURE__ */ u("div", { ref: a, className: p("flex flex-col gap-2", n), children: [
|
|
@@ -30,35 +30,37 @@ const b = s.forwardRef(
|
|
|
30
30
|
i ? /* @__PURE__ */ m("p", { id: f, role: "alert", className: "text-xs text-destructive", children: i }) : null
|
|
31
31
|
] });
|
|
32
32
|
}
|
|
33
|
-
), N = s.forwardRef(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
error: r
|
|
39
|
-
}), h = s.cloneElement(t, {
|
|
40
|
-
id: f,
|
|
41
|
-
required: t.props.required ?? n,
|
|
42
|
-
"aria-invalid": r ? !0 : t.props["aria-invalid"],
|
|
43
|
-
"aria-describedby": [t.props["aria-describedby"], x].filter(Boolean).join(" ") || void 0
|
|
44
|
-
});
|
|
45
|
-
return /* @__PURE__ */ m(
|
|
46
|
-
b,
|
|
47
|
-
{
|
|
48
|
-
ref: a,
|
|
49
|
-
controlId: f,
|
|
50
|
-
label: e,
|
|
33
|
+
), N = /* @__PURE__ */ s.forwardRef(
|
|
34
|
+
function({ label: e, children: l, htmlFor: o, description: i, error: r, required: n = !1, className: d }, a) {
|
|
35
|
+
const t = s.Children.only(l), { controlId: f, describedBy: x } = F({
|
|
36
|
+
htmlFor: o,
|
|
37
|
+
childId: t.props.id,
|
|
51
38
|
description: i,
|
|
52
|
-
error: r
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
});
|
|
39
|
+
error: r
|
|
40
|
+
}), h = s.cloneElement(t, {
|
|
41
|
+
id: f,
|
|
42
|
+
required: t.props.required ?? n,
|
|
43
|
+
"aria-invalid": r ? !0 : t.props["aria-invalid"],
|
|
44
|
+
"aria-describedby": [t.props["aria-describedby"], x].filter(Boolean).join(" ") || void 0
|
|
45
|
+
});
|
|
46
|
+
return /* @__PURE__ */ m(
|
|
47
|
+
b,
|
|
48
|
+
{
|
|
49
|
+
ref: a,
|
|
50
|
+
controlId: f,
|
|
51
|
+
label: e,
|
|
52
|
+
description: i,
|
|
53
|
+
error: r,
|
|
54
|
+
required: n,
|
|
55
|
+
className: d,
|
|
56
|
+
children: h
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
59
61
|
export {
|
|
60
62
|
g as F,
|
|
61
|
-
|
|
62
|
-
b,
|
|
63
|
+
b as a,
|
|
64
|
+
N as b,
|
|
63
65
|
F as u
|
|
64
66
|
};
|
package/dist/contexts.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as l, Fragment as x } from "react/jsx-runtime";
|
|
3
3
|
import { useState as i, useCallback as a, useEffect as s, useContext as E, createContext as S } from "react";
|
|
4
|
-
import { F as j, H as q, L as N, u as V, a as J, b as Q } from "./chunks/LanguageContext-
|
|
5
|
-
import { T as W, u as X } from "./chunks/TokenDisplayContext-
|
|
6
|
-
const I = ["system", "light", "dark"], d = "hds-theme-mode", P = "hds-theme", T = S({
|
|
4
|
+
import { F as j, H as q, L as N, u as V, a as J, b as Q } from "./chunks/LanguageContext-BxdCwiFg.js";
|
|
5
|
+
import { T as W, u as X } from "./chunks/TokenDisplayContext-DKYJMVWk.js";
|
|
6
|
+
const I = ["system", "light", "dark"], d = "hds-theme-mode", P = "hds-theme", T = /* @__PURE__ */ S({
|
|
7
7
|
isDark: !0,
|
|
8
8
|
toggleDark: () => {
|
|
9
9
|
},
|
|
@@ -93,7 +93,7 @@ function F({ children: t }) {
|
|
|
93
93
|
function O() {
|
|
94
94
|
return E(T);
|
|
95
95
|
}
|
|
96
|
-
const k = S({ tenantSlug: null }), p = ["data-brand", "data-tenant"];
|
|
96
|
+
const k = /* @__PURE__ */ S({ tenantSlug: null }), p = ["data-brand", "data-tenant"];
|
|
97
97
|
function m(t) {
|
|
98
98
|
for (const n of p) document.documentElement.setAttribute(n, t);
|
|
99
99
|
}
|
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,
|
|
5
|
+
import { F as p, u as g, a as S } from "./chunks/form-COP3vK9_.js";
|
|
6
6
|
function y(r, e) {
|
|
7
7
|
return f({
|
|
8
8
|
mode: "onTouched",
|
|
@@ -28,10 +28,10 @@ function j({
|
|
|
28
28
|
children: i,
|
|
29
29
|
description: n,
|
|
30
30
|
required: l,
|
|
31
|
-
className:
|
|
31
|
+
className: m
|
|
32
32
|
}) {
|
|
33
|
-
var
|
|
34
|
-
const { field: o, fieldState: u } = v({ name: r }), d = (
|
|
33
|
+
var a;
|
|
34
|
+
const { field: o, fieldState: u } = v({ name: r }), d = (a = u.error) == null ? void 0 : a.message, { controlId: s, describedBy: c } = g({ description: n, error: d }), F = {
|
|
35
35
|
name: o.name,
|
|
36
36
|
// Coalesce nullish to '' so a controlled input never flips to uncontrolled.
|
|
37
37
|
value: o.value ?? "",
|
|
@@ -51,7 +51,7 @@ function j({
|
|
|
51
51
|
description: n,
|
|
52
52
|
error: d,
|
|
53
53
|
required: l,
|
|
54
|
-
className:
|
|
54
|
+
className: m,
|
|
55
55
|
children: i(F)
|
|
56
56
|
}
|
|
57
57
|
);
|