@hirobius/design-system 0.20.0 → 0.22.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.
Files changed (130) hide show
  1. package/AGENTS.md +125 -0
  2. package/CHANGELOG.md +969 -0
  3. package/CONSUMING.md +27 -11
  4. package/DESIGN.md +28 -17
  5. package/MIGRATIONS.md +603 -0
  6. package/NOTICE.md +1 -1
  7. package/README.md +39 -5
  8. package/UPGRADING.md +222 -0
  9. package/codemods/hds-prefix.mjs +28 -13
  10. package/codemods/jsx-fold.mjs +28 -13
  11. package/codemods/lib/atomic-write.mjs +28 -0
  12. package/codemods/lib/installed-version.mjs +354 -0
  13. package/codemods/lib/project.mjs +395 -0
  14. package/codemods/lib/record.mjs +110 -0
  15. package/codemods/lib/scan.mjs +323 -0
  16. package/codemods/lib/semver.mjs +57 -0
  17. package/codemods/not-found-pattern.mjs +3 -3
  18. package/codemods/patterns-subpath.mjs +28 -12
  19. package/codemods/registry.mjs +67 -0
  20. package/codemods/tile-grid.mjs +3 -3
  21. package/codemods/upgrade.mjs +909 -0
  22. package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
  23. package/dist/chunks/form-By82qZcC.js +66 -0
  24. package/dist/fonts/geist-mono-400.woff2 +0 -0
  25. package/dist/fonts/satoshi-400.woff2 +0 -0
  26. package/dist/fonts/satoshi-500.woff2 +0 -0
  27. package/dist/fonts/satoshi-700.woff2 +0 -0
  28. package/dist/fonts.css +53 -0
  29. package/dist/form.js +1 -1
  30. package/dist/hirobius-ui.js +876 -877
  31. package/dist/manifest.js +3 -3
  32. package/dist/patterns.js +189 -170
  33. package/dist/styles.css +2 -2
  34. package/dist/tokens.css +1 -1
  35. package/dist/tokens.js +136 -57
  36. package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
  37. package/dist/types/src/app/components/alert.d.ts +1 -1
  38. package/dist/types/src/app/components/asset-img.d.ts +1 -0
  39. package/dist/types/src/app/components/avatar-group.d.ts +1 -0
  40. package/dist/types/src/app/components/avatar.d.ts +1 -1
  41. package/dist/types/src/app/components/badge.d.ts +2 -2
  42. package/dist/types/src/app/components/blockquote.d.ts +1 -0
  43. package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
  44. package/dist/types/src/app/components/button.d.ts +3 -1
  45. package/dist/types/src/app/components/callout.d.ts +1 -1
  46. package/dist/types/src/app/components/card.d.ts +4 -3
  47. package/dist/types/src/app/components/checkbox.d.ts +1 -1
  48. package/dist/types/src/app/components/code-block.d.ts +1 -1
  49. package/dist/types/src/app/components/combobox.d.ts +1 -1
  50. package/dist/types/src/app/components/data-table-section.d.ts +1 -0
  51. package/dist/types/src/app/components/destructive-section.d.ts +1 -0
  52. package/dist/types/src/app/components/dialog.d.ts +2 -1
  53. package/dist/types/src/app/components/disclosure.d.ts +1 -1
  54. package/dist/types/src/app/components/divider.d.ts +1 -1
  55. package/dist/types/src/app/components/empty-state.d.ts +1 -1
  56. package/dist/types/src/app/components/error-pattern.d.ts +6 -1
  57. package/dist/types/src/app/components/field.d.ts +1 -1
  58. package/dist/types/src/app/components/form-actions.d.ts +1 -0
  59. package/dist/types/src/app/components/form-control.d.ts +10 -0
  60. package/dist/types/src/app/components/form.d.ts +1 -1
  61. package/dist/types/src/app/components/grid.d.ts +5 -0
  62. package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
  63. package/dist/types/src/app/components/icon.d.ts +1 -0
  64. package/dist/types/src/app/components/inline-link.d.ts +1 -1
  65. package/dist/types/src/app/components/input.d.ts +1 -1
  66. package/dist/types/src/app/components/kbd.d.ts +1 -0
  67. package/dist/types/src/app/components/menu.d.ts +1 -1
  68. package/dist/types/src/app/components/metadata-list.d.ts +1 -0
  69. package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
  70. package/dist/types/src/app/components/pagination.d.ts +1 -1
  71. package/dist/types/src/app/components/popover.d.ts +1 -1
  72. package/dist/types/src/app/components/progress.d.ts +2 -2
  73. package/dist/types/src/app/components/radio.d.ts +1 -1
  74. package/dist/types/src/app/components/select.d.ts +1 -1
  75. package/dist/types/src/app/components/skeleton.d.ts +2 -2
  76. package/dist/types/src/app/components/slider.d.ts +1 -1
  77. package/dist/types/src/app/components/spinner.d.ts +1 -1
  78. package/dist/types/src/app/components/stat.d.ts +5 -4
  79. package/dist/types/src/app/components/status-list-item.d.ts +1 -1
  80. package/dist/types/src/app/components/status-tile.d.ts +4 -3
  81. package/dist/types/src/app/components/table.d.ts +6 -1
  82. package/dist/types/src/app/components/tabs.d.ts +1 -1
  83. package/dist/types/src/app/components/tag.d.ts +1 -1
  84. package/dist/types/src/app/components/text.d.ts +53 -6
  85. package/dist/types/src/app/components/textarea.d.ts +1 -1
  86. package/dist/types/src/app/components/timestamp.d.ts +1 -0
  87. package/dist/types/src/app/components/toast.d.ts +1 -1
  88. package/dist/types/src/app/components/toggle.d.ts +1 -1
  89. package/dist/types/src/app/data/manifest-types.d.ts +4 -0
  90. package/dist/types/src/app/design-system/generated-token-refs.d.ts +37 -28
  91. package/dist/types/src/app/design-system/generated-token-values.d.ts +3 -0
  92. package/dist/types/src/app/design-system/tokens.d.ts +117 -15
  93. package/dist/types/src/index.d.ts +122 -72
  94. package/dist/variables.css +41 -33
  95. package/docs/CONSUMING.md +63 -39
  96. package/hirobius.tokens.json +163 -112
  97. package/llms.txt +158 -50
  98. package/mcp/catalog.mjs +369 -0
  99. package/mcp/core-set.mjs +66 -0
  100. package/mcp/guide.mjs +272 -0
  101. package/mcp/hds-mcp.mjs +49 -0
  102. package/mcp/server.mjs +94 -0
  103. package/package.json +53 -11
  104. package/public/hds-manifest.json +430 -336
  105. package/public/llms/components.txt +4 -3
  106. package/public/llms/layout.txt +1 -1
  107. package/public/llms-full.txt +190 -70
  108. package/public/llms.txt +158 -50
  109. package/scripts/eslint-plugin-hds/index.d.mts +29 -0
  110. package/scripts/eslint-plugin-hds/index.mjs +55 -0
  111. package/scripts/eslint-plugin-hds/package.json +30 -0
  112. package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
  113. package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
  114. package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
  115. package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
  116. package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
  117. package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
  118. package/src/app/data/component-api.json +154 -93
  119. package/upgrade/index.json +208 -0
  120. package/upgrade/releases/0.17.0.json +962 -0
  121. package/upgrade/releases/0.18.0.json +8 -0
  122. package/upgrade/releases/0.19.0.json +233 -0
  123. package/upgrade/releases/0.19.1.json +8 -0
  124. package/upgrade/releases/0.20.0.json +5108 -0
  125. package/upgrade/releases/0.21.0.json +538 -0
  126. package/upgrade/releases/0.22.0.json +94 -0
  127. package/upgrade/schema.json +989 -0
  128. package/dist/chunks/empty-state-BBqhCx0S.js +0 -1217
  129. package/dist/chunks/form-COP3vK9_.js +0 -66
  130. package/dist/types/src/app/components/status-dot.d.ts +0 -39
@@ -1,66 +0,0 @@
1
- 'use client';
2
- import { jsx as m, jsxs as u } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { cn as p } from "../cn.js";
5
- const g = /* @__PURE__ */ s.forwardRef(function({ className: e, ...l }, o) {
6
- return /* @__PURE__ */ m("form", { ref: o, className: p("flex flex-col gap-4", e), ...l });
7
- });
8
- function F({
9
- htmlFor: c,
10
- childId: e,
11
- description: l,
12
- error: o
13
- }) {
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
- return { controlId: r, descriptionId: n, errorId: d, describedBy: a };
16
- }
17
- const b = /* @__PURE__ */ s.forwardRef(
18
- function({ controlId: e, label: l, description: o, error: i, required: r = !1, className: n, children: d }, a) {
19
- const t = `${e}-description`, f = `${e}-error`;
20
- return /* @__PURE__ */ u("div", { ref: a, className: p("flex flex-col gap-2", n), children: [
21
- /* @__PURE__ */ u("label", { htmlFor: e, className: "text-sm font-medium text-foreground", children: [
22
- l,
23
- r ? /* @__PURE__ */ u("span", { "aria-hidden": "true", className: "text-destructive", children: [
24
- " ",
25
- "*"
26
- ] }) : null
27
- ] }),
28
- d,
29
- o && !i ? /* @__PURE__ */ m("p", { id: t, className: "text-xs text-muted-foreground", children: o }) : null,
30
- i ? /* @__PURE__ */ m("p", { id: f, role: "alert", className: "text-xs text-destructive", children: i }) : null
31
- ] });
32
- }
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,
38
- description: i,
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
- );
61
- export {
62
- g as F,
63
- b as a,
64
- N as b,
65
- F as u
66
- };
@@ -1,39 +0,0 @@
1
- /**
2
- * StatusDot — compact solid status indicator dot.
3
- * @category Feedback
4
- * @tier primitive
5
- */
6
- import * as React from 'react';
7
- import { type VariantProps } from 'class-variance-authority';
8
- declare const statusDotVariants: (props?: ({
9
- tone?: "success" | "danger" | "warning" | "info" | "neutral" | "inProgress" | null | undefined;
10
- size?: "sm" | "md" | "lg" | null | undefined;
11
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
- type StatusDotVariantProps = VariantProps<typeof statusDotVariants>;
13
- /**
14
- * @public
15
- * @deprecated Use `BadgeProps` with `dot`: `tone`, `size` and `label` are the
16
- * same. Badge takes no `style`, so move a `style` to a wrapper or a
17
- * `className` first (MIGRATIONS.md, hds#395).
18
- * @removeIn 0.21.0
19
- */
20
- export interface StatusDotProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'>, StatusDotVariantProps {
21
- /**
22
- * Accessible name for the status. When provided the dot is exposed as a
23
- * `role="status"` with this label; when omitted the dot is decorative
24
- * (`aria-hidden`) and a sibling should carry the meaning.
25
- */
26
- label?: string;
27
- }
28
- /**
29
- * A small solid dot conveying a semantic status via `tone`.
30
- *
31
- * @deprecated Use `<Badge dot>`: `tone`, `size` and `label` are the same, and
32
- * so is the dot. Badge takes no `style`, so move a `style` to a wrapper or a
33
- * `className` first (MIGRATIONS.md, hds#395). Kept in 0.20.0 because ops passes
34
- * StatusDot a `style` no codemod can carry over.
35
- * @removeIn 0.21.0
36
- * @useInstead Badge with `dot`
37
- */
38
- export declare const StatusDot: React.ForwardRefExoticComponent<StatusDotProps & React.RefAttributes<HTMLSpanElement>>;
39
- export {};