@hirobius/design-system 0.16.0 → 0.18.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 (91) hide show
  1. package/README.md +41 -69
  2. package/codemods/patterns-subpath.mjs +254 -0
  3. package/codemods/patterns-subpath.names.json +26 -0
  4. package/dist/chunks/LanguageContext-CH_bwzCq.js +83 -0
  5. package/dist/chunks/TokenDisplayContext-evZi_214.js +18 -0
  6. package/dist/chunks/activity-feed-C8_e-Btq.js +19955 -0
  7. package/dist/contexts.js +17 -16
  8. package/dist/hirobius-ui.js +3652 -23311
  9. package/dist/manifest.js +5 -5
  10. package/dist/patterns.js +423 -0
  11. package/dist/static.css +4 -4
  12. package/dist/styles.css +1 -1
  13. package/dist/tokens.css +1 -1
  14. package/dist/tokens.js +34 -13
  15. package/dist/types/src/app/components/activity-feed.d.ts +6 -4
  16. package/dist/types/src/app/components/app-shell.d.ts +6 -4
  17. package/dist/types/src/app/components/asset-img.d.ts +3 -1
  18. package/dist/types/src/app/components/avatar-group.d.ts +3 -3
  19. package/dist/types/src/app/components/avatar.d.ts +3 -3
  20. package/dist/types/src/app/components/badge.d.ts +3 -3
  21. package/dist/types/src/app/components/blockquote.d.ts +3 -3
  22. package/dist/types/src/app/components/breadcrumb.d.ts +3 -3
  23. package/dist/types/src/app/components/button-group.d.ts +3 -3
  24. package/dist/types/src/app/components/button.d.ts +6 -6
  25. package/dist/types/src/app/components/calendar.d.ts +3 -1
  26. package/dist/types/src/app/components/callout.d.ts +4 -4
  27. package/dist/types/src/app/components/card.d.ts +5 -5
  28. package/dist/types/src/app/components/carousel.d.ts +6 -4
  29. package/dist/types/src/app/components/checkbox.d.ts +3 -3
  30. package/dist/types/src/app/components/circular-progress.d.ts +3 -3
  31. package/dist/types/src/app/components/code-block.d.ts +20 -18
  32. package/dist/types/src/app/components/command-palette.d.ts +9 -9
  33. package/dist/types/src/app/components/component-instance-matrix.d.ts +1 -1
  34. package/dist/types/src/app/components/disclosure.d.ts +3 -3
  35. package/dist/types/src/app/components/divider.d.ts +4 -4
  36. package/dist/types/src/app/components/doc-link-card.d.ts +6 -4
  37. package/dist/types/src/app/components/error-pattern.d.ts +3 -1
  38. package/dist/types/src/app/components/field.d.ts +4 -4
  39. package/dist/types/src/app/components/file-input.d.ts +7 -5
  40. package/dist/types/src/app/components/hds-tooltip.d.ts +11 -11
  41. package/dist/types/src/app/components/heading-stack.d.ts +6 -6
  42. package/dist/types/src/app/components/hover-card.d.ts +1 -1
  43. package/dist/types/src/app/components/image-lightbox.d.ts +2 -0
  44. package/dist/types/src/app/components/inline-code.d.ts +3 -3
  45. package/dist/types/src/app/components/input-group.d.ts +3 -3
  46. package/dist/types/src/app/components/input.d.ts +5 -5
  47. package/dist/types/src/app/components/kbd.d.ts +3 -3
  48. package/dist/types/src/app/components/metadata-list.d.ts +3 -3
  49. package/dist/types/src/app/components/nav-group.d.ts +3 -3
  50. package/dist/types/src/app/components/nav-item.d.ts +10 -8
  51. package/dist/types/src/app/components/overflow-list.d.ts +3 -1
  52. package/dist/types/src/app/components/page.d.ts +3 -1
  53. package/dist/types/src/app/components/progress.d.ts +3 -3
  54. package/dist/types/src/app/components/radio.d.ts +3 -3
  55. package/dist/types/src/app/components/reveal.d.ts +3 -1
  56. package/dist/types/src/app/components/segmented-control.d.ts +31 -31
  57. package/dist/types/src/app/components/select.d.ts +3 -3
  58. package/dist/types/src/app/components/selectable-card.d.ts +3 -3
  59. package/dist/types/src/app/components/side-nav.d.ts +6 -4
  60. package/dist/types/src/app/components/skeleton.d.ts +3 -3
  61. package/dist/types/src/app/components/slider.d.ts +3 -3
  62. package/dist/types/src/app/components/spinner.d.ts +3 -3
  63. package/dist/types/src/app/components/stacked-card-rail.d.ts +32 -0
  64. package/dist/types/src/app/components/stat.d.ts +3 -3
  65. package/dist/types/src/app/components/status-dot.d.ts +4 -4
  66. package/dist/types/src/app/components/status-list-item.d.ts +3 -3
  67. package/dist/types/src/app/components/stepper.d.ts +6 -4
  68. package/dist/types/src/app/components/surface.d.ts +4 -4
  69. package/dist/types/src/app/components/table.d.ts +22 -11
  70. package/dist/types/src/app/components/tag.d.ts +4 -4
  71. package/dist/types/src/app/components/text.d.ts +3 -3
  72. package/dist/types/src/app/components/textarea.d.ts +4 -4
  73. package/dist/types/src/app/components/time-input.d.ts +3 -3
  74. package/dist/types/src/app/components/toast.d.ts +3 -3
  75. package/dist/types/src/app/components/toggle-button.d.ts +4 -4
  76. package/dist/types/src/app/components/toggle.d.ts +3 -3
  77. package/dist/types/src/app/components/token.d.ts +16 -16
  78. package/dist/types/src/app/components/toolbar.d.ts +1 -1
  79. package/dist/types/src/app/components/tooltip.d.ts +2 -2
  80. package/dist/types/src/app/components/top-nav.d.ts +3 -1
  81. package/dist/types/src/app/components/tree-list.d.ts +3 -1
  82. package/dist/types/src/app/design-system/generated-token-refs.d.ts +36 -0
  83. package/dist/types/src/app/design-system/generated-token-values.d.ts +10 -10
  84. package/dist/types/src/app/design-system/tokens.d.ts +16 -0
  85. package/dist/types/src/index.d.ts +193 -8
  86. package/dist/types/src/patterns.d.ts +37 -0
  87. package/dist/variables.css +42 -22
  88. package/hirobius.tokens.json +178 -57
  89. package/package.json +21 -11
  90. package/public/hds-manifest.json +473 -445
  91. package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +0 -96
@@ -0,0 +1,423 @@
1
+ 'use client';
2
+ import { A as T, D as F, F as L, C as $, G as R, H as A, J as P, K as j, E as D, L as E, M as H, N as W, O as z, P as _, R as B, Q as M, U as O, V as X, W as G, X as q, a8 as K, a9 as U, aa as J, ab as Q, ac as Y, ad as Z, af as ee, ag as ae, ah as re, ai as te, aj as se, ak as ie, al as oe, am as le, an as ce, ao as ne, ap as de, aq as he, ar as pe, as as ue, at as ve, au as me, av as fe } from "./chunks/activity-feed-C8_e-Btq.js";
3
+ import { F as be, a as we, b as ye, u as xe } from "./chunks/form-DnGRy27o.js";
4
+ import { jsxs as o, Fragment as m, jsx as e } from "react/jsx-runtime";
5
+ import { useRef as c, useEffect as v } from "react";
6
+ import d from "./tokens.js";
7
+ const h = 280, b = 380, n = 24, f = 3.5, w = `
8
+ .hds-scr-outer {
9
+ position: relative;
10
+ overflow: hidden;
11
+ width: 100%; /* audit-ok: percentage fill in CSS template */
12
+ --card-width: ${h}px;
13
+ --card-height: ${b}px;
14
+ --card-gap: ${n}px;
15
+ --visible-count: ${f};
16
+ }
17
+
18
+ /* Vertical scroll container — maps vertical scrolling to a horizontal strip */
19
+ .hds-scr-yscroll {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ width: 100%; /* audit-ok: percentage fill in CSS template */
24
+ height: 100%; /* audit-ok: percentage fill in CSS template */
25
+ overflow-y: scroll;
26
+ overflow-x: hidden;
27
+ scrollbar-width: none;
28
+ -ms-overflow-style: none;
29
+ }
30
+ .hds-scr-yscroll::-webkit-scrollbar {
31
+ display: none;
32
+ }
33
+
34
+ /* Tall spacer that gives the vertical scroll room to travel */
35
+ .hds-scr-spacer {
36
+ /* Total scroll travel = card-width × card-count so each card gets a full
37
+ width of scroll travel. The visible window is added back so the last
38
+ card reaches the entry position. */
39
+ height: var(--hds-scr-spacer-height, 4000px);
40
+ width: 100%; /* audit-ok: percentage fill in CSS template */
41
+ }
42
+
43
+ /* Sticky strip — stays pinned in view while the vertical container scrolls */
44
+ .hds-scr-strip {
45
+ position: sticky;
46
+ top: 0;
47
+ overflow-x: scroll;
48
+ overflow-y: hidden;
49
+ scrollbar-width: none;
50
+ -ms-overflow-style: none;
51
+ height: calc(var(--card-height) + 48px);
52
+ display: flex;
53
+ align-items: center;
54
+ }
55
+ .hds-scr-strip::-webkit-scrollbar {
56
+ display: none;
57
+ }
58
+
59
+ /* Horizontal track */
60
+ .hds-scr-track {
61
+ display: flex;
62
+ align-items: center;
63
+ padding: 0 ${n}px;
64
+ gap: var(--card-gap);
65
+ /* Wide enough to hold all cards plus padding */
66
+ min-width: max-content;
67
+ }
68
+
69
+ /* Individual card wrapper — controls position in the flow */
70
+ .hds-scr-card {
71
+ flex: 0 0 var(--card-width);
72
+ height: var(--card-height);
73
+ position: relative;
74
+ cursor: pointer;
75
+ transition:
76
+ transform 0.25s ease,
77
+ width 0.25s ease;
78
+ z-index: 0;
79
+ }
80
+
81
+ /* Card inner surface */
82
+ .hds-scr-card-inner {
83
+ width: 100%; /* audit-ok: percentage fill in CSS template */
84
+ height: 100%; /* audit-ok: percentage fill in CSS template */
85
+ border-radius: ${d.borderRadius[8]};
86
+ background: var(--semantic-color-surface-raised);
87
+ border: 1px solid var(--semantic-color-border-default);
88
+ box-shadow: var(--semantic-shadow-subtle);
89
+ overflow: hidden;
90
+ display: flex;
91
+ flex-direction: column;
92
+ text-decoration: none;
93
+ color: inherit;
94
+ transition:
95
+ transform 0.25s ease,
96
+ box-shadow 0.25s ease;
97
+ }
98
+
99
+ /* Hover: widen card 25% and lift it */
100
+ .hds-scr-card:hover {
101
+ z-index: 10;
102
+ transform: translate(-10%, -4.5%);
103
+ flex-basis: calc(var(--card-width) * 1.25);
104
+ width: calc(var(--card-width) * 1.25);
105
+ }
106
+ .hds-scr-card:hover .hds-scr-card-inner {
107
+ box-shadow: var(--semantic-shadow-floating);
108
+ }
109
+
110
+ /* Neighbour shift — requires :has() support */
111
+ @supports selector(:has(+ *)) {
112
+ .hds-scr-card:hover + .hds-scr-card {
113
+ transform: translateX(8%);
114
+ }
115
+ }
116
+
117
+ /* Cover image */
118
+ .hds-scr-cover {
119
+ flex: 1 1 auto;
120
+ min-height: 0;
121
+ background-color: var(--semantic-color-surface-page);
122
+ overflow: hidden;
123
+ }
124
+ .hds-scr-cover img {
125
+ width: 100%; /* audit-ok: percentage fill in CSS template */
126
+ height: 100%; /* audit-ok: percentage fill in CSS template */
127
+ object-fit: cover;
128
+ display: block;
129
+ }
130
+ .hds-scr-cover-placeholder {
131
+ width: 100%; /* audit-ok: percentage fill in CSS template */
132
+ height: 100%; /* audit-ok: percentage fill in CSS template */
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ background: var(--semantic-color-surface-page);
137
+ }
138
+
139
+ /* Card metadata footer */
140
+ .hds-scr-meta {
141
+ flex: 0 0 auto;
142
+ padding: 14px 16px 16px;
143
+ display: flex;
144
+ flex-direction: column;
145
+ gap: 4px;
146
+ border-top: 1px solid var(--semantic-color-border-subdued);
147
+ }
148
+
149
+ /* Scroll-driven stacking animation — Chrome 115+ / FF 110+ */
150
+ @supports (animation-timeline: scroll()) {
151
+ .hds-scr-card-inner {
152
+ animation: hds-scr-stack linear;
153
+ animation-timeline: view(
154
+ x
155
+ calc(0px - 2 * var(--card-width))
156
+ calc(var(--card-width) * (var(--visible-count) - 0.2))
157
+ );
158
+ animation-duration: 1ms;
159
+ }
160
+
161
+ @keyframes hds-scr-stack {
162
+ from {
163
+ transform: translateX(0%) scale(1);
164
+ opacity: 1;
165
+ }
166
+ to {
167
+ transform: translateX(300%) scale(0.5);
168
+ opacity: 0;
169
+ }
170
+ }
171
+
172
+ /* Cancel the animation on a hovered card so it stays visible */
173
+ .hds-scr-card:hover .hds-scr-card-inner {
174
+ animation: none;
175
+ }
176
+ }
177
+
178
+ /* Fallback outer height when scroll-driven animations are not available:
179
+ a static card-height plus some breathing room */
180
+ .hds-scr-outer[data-fallback="true"] {
181
+ /* Outer div becomes a straight horizontal scroll container */
182
+ overflow-x: auto;
183
+ overflow-y: hidden;
184
+ scrollbar-width: thin;
185
+ }
186
+ .hds-scr-outer[data-fallback="true"] .hds-scr-yscroll {
187
+ position: static;
188
+ overflow: visible;
189
+ height: auto;
190
+ width: auto;
191
+ }
192
+ .hds-scr-outer[data-fallback="true"] .hds-scr-spacer {
193
+ height: auto;
194
+ width: auto;
195
+ }
196
+ .hds-scr-outer[data-fallback="true"] .hds-scr-strip {
197
+ position: static;
198
+ overflow-x: visible;
199
+ overflow-y: visible;
200
+ }
201
+ .hds-scr-outer[data-fallback="true"] .hds-scr-track {
202
+ padding: 12px ${n}px;
203
+ }
204
+ `;
205
+ function y() {
206
+ return /* @__PURE__ */ e("div", { className: "hds-scr-cover-placeholder", "aria-hidden": "true", children: /* @__PURE__ */ o(
207
+ "svg",
208
+ {
209
+ width: "48",
210
+ height: "48",
211
+ viewBox: "0 0 48 48",
212
+ fill: "none",
213
+ xmlns: "http://www.w3.org/2000/svg",
214
+ "aria-hidden": "true",
215
+ children: [
216
+ /* @__PURE__ */ e(
217
+ "rect",
218
+ {
219
+ x: "6",
220
+ y: "10",
221
+ width: "36",
222
+ height: "28",
223
+ rx: "3",
224
+ stroke: "var(--semantic-color-border-default)",
225
+ strokeWidth: "1.5"
226
+ }
227
+ ),
228
+ /* @__PURE__ */ e(
229
+ "circle",
230
+ {
231
+ cx: "16",
232
+ cy: "20",
233
+ r: "4",
234
+ stroke: "var(--semantic-color-border-default)",
235
+ strokeWidth: "1.5"
236
+ }
237
+ ),
238
+ /* @__PURE__ */ e(
239
+ "path",
240
+ {
241
+ d: "M6 30l10-8 8 6 6-5 12 9",
242
+ stroke: "var(--semantic-color-border-default)",
243
+ strokeWidth: "1.5",
244
+ strokeLinejoin: "round"
245
+ }
246
+ )
247
+ ]
248
+ }
249
+ ) });
250
+ }
251
+ function x({ card: a, index: t, total: l }) {
252
+ const i = /* @__PURE__ */ o(m, { children: [
253
+ /* @__PURE__ */ e("div", { className: "hds-scr-cover", children: a.coverImage ? /* @__PURE__ */ e(
254
+ "img",
255
+ {
256
+ src: a.coverImage,
257
+ alt: a.title,
258
+ loading: t < 4 ? "eager" : "lazy",
259
+ decoding: "async"
260
+ }
261
+ ) : /* @__PURE__ */ e(y, {}) }),
262
+ /* @__PURE__ */ o("div", { className: "hds-scr-meta", children: [
263
+ a.category && /* @__PURE__ */ e(
264
+ "span",
265
+ {
266
+ style: {
267
+ ...d.typeStyles.eyebrow,
268
+ color: "var(--semantic-color-content-secondary)"
269
+ },
270
+ children: a.category
271
+ }
272
+ ),
273
+ /* @__PURE__ */ e(
274
+ "span",
275
+ {
276
+ style: {
277
+ ...d.typeStyles.heading3,
278
+ color: "var(--semantic-color-content-primary)"
279
+ },
280
+ children: a.title
281
+ }
282
+ )
283
+ ] })
284
+ ] });
285
+ return /* @__PURE__ */ e(
286
+ "div",
287
+ {
288
+ className: "hds-scr-card",
289
+ style: { "--card-index": t },
290
+ "aria-label": `${a.title}${a.category ? `, ${a.category}` : ""}, card ${t + 1} of ${l}`,
291
+ children: a.href ? /* @__PURE__ */ e(
292
+ "a",
293
+ {
294
+ href: a.href,
295
+ className: "hds-focus hds-scr-card-inner",
296
+ style: {
297
+ display: "flex",
298
+ flexDirection: "column",
299
+ height: "100%",
300
+ textDecoration: "none",
301
+ color: "inherit"
302
+ },
303
+ children: i
304
+ }
305
+ ) : /* @__PURE__ */ e("div", { className: "hds-scr-card-inner", children: i })
306
+ }
307
+ );
308
+ }
309
+ function V({ cards: a }) {
310
+ const t = c(null), l = c(null), i = c(null), p = a.length, g = h * p + /* trailing breathing room */
311
+ h * f;
312
+ return v(() => {
313
+ const r = l.current, s = i.current;
314
+ if (!r || !s) return;
315
+ function u() {
316
+ !r || !s || (s.scrollLeft = r.scrollTop);
317
+ }
318
+ return r.addEventListener("scroll", u, { passive: !0 }), () => {
319
+ r.removeEventListener("scroll", u);
320
+ };
321
+ }, []), v(() => {
322
+ const r = t.current;
323
+ if (!r) return;
324
+ typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("animation-timeline", "scroll()") || r.setAttribute("data-fallback", "true");
325
+ }, []), /* @__PURE__ */ o(m, { children: [
326
+ /* @__PURE__ */ e("style", { dangerouslySetInnerHTML: { __html: w } }),
327
+ /* @__PURE__ */ e(
328
+ "div",
329
+ {
330
+ ref: t,
331
+ className: "hds-scr-outer",
332
+ style: {
333
+ height: "calc(var(--card-height) + 48px)"
334
+ },
335
+ role: "region",
336
+ "aria-label": "Project cards",
337
+ children: /* @__PURE__ */ o(
338
+ "div",
339
+ {
340
+ ref: l,
341
+ className: "hds-scr-yscroll",
342
+ role: "region",
343
+ "aria-label": "Project cards, vertical scroll",
344
+ tabIndex: 0,
345
+ style: { height: "100%" },
346
+ children: [
347
+ /* @__PURE__ */ e(
348
+ "div",
349
+ {
350
+ className: "hds-scr-spacer",
351
+ style: {
352
+ "--hds-scr-spacer-height": `${g}px`
353
+ }
354
+ }
355
+ ),
356
+ /* @__PURE__ */ e(
357
+ "div",
358
+ {
359
+ ref: i,
360
+ className: "hds-scr-strip",
361
+ role: "region",
362
+ "aria-label": "Project cards, horizontal scroll",
363
+ tabIndex: 0,
364
+ children: /* @__PURE__ */ e("div", { className: "hds-scr-track", role: "list", children: a.map((r, s) => /* @__PURE__ */ e("div", { role: "listitem", children: /* @__PURE__ */ e(x, { card: r, index: s, total: p }) }, r.id)) })
365
+ }
366
+ )
367
+ ]
368
+ }
369
+ )
370
+ }
371
+ )
372
+ ] });
373
+ }
374
+ export {
375
+ T as ActivityFeed,
376
+ F as AppShell,
377
+ L as AssetImg,
378
+ $ as Calendar,
379
+ R as Carousel,
380
+ A as CodeBlock,
381
+ P as CommandPalette,
382
+ j as DocLinkCard,
383
+ D as ErrorPattern,
384
+ E as FileInput,
385
+ be as Form,
386
+ we as FormField,
387
+ ye as FormFieldShell,
388
+ H as Lightbox,
389
+ W as NavItem,
390
+ z as OverflowList,
391
+ _ as Page,
392
+ B as Reveal,
393
+ M as SideNav,
394
+ V as StackedCardRail,
395
+ O as Stepper,
396
+ X as Toolbar,
397
+ G as TopNav,
398
+ q as TreeList,
399
+ K as activityAvatarVariants,
400
+ U as activityToneVariants,
401
+ J as appShellVariants,
402
+ Q as blockCodeTextVariants,
403
+ Y as blockContainerVariants,
404
+ Z as blockHeaderVariants,
405
+ ee as carouselControlVariants,
406
+ ae as chevronVariants,
407
+ re as cmdkDescriptionVariants,
408
+ te as cmdkKindBadgeVariants,
409
+ se as cmdkRowVariants,
410
+ ie as collapsibleToggleVariants,
411
+ oe as copyButtonVariants,
412
+ le as defaultActivityEvents,
413
+ ce as docLinkCardVariants,
414
+ ne as fileInputVariants,
415
+ de as inlineCodeTextVariants,
416
+ he as inlineWrapperVariants,
417
+ pe as navIndicatorVariants,
418
+ ue as navItemVariants,
419
+ ve as prePanelVariants,
420
+ me as sideNavVariants,
421
+ fe as stepMarkerVariants,
422
+ xe as useFieldWiring
423
+ };
package/dist/static.css CHANGED
@@ -145,8 +145,8 @@
145
145
  border-style: solid;
146
146
  border-width: 1px;
147
147
  border-color: transparent;
148
- padding: var(--semantic-space-component-padding);
149
- gap: var(--semantic-space-layout-tight);
148
+ padding: var(--semantic-space-surface-padding);
149
+ gap: var(--semantic-space-scale-sm);
150
150
  }
151
151
 
152
152
  .hds-card--no-padding {
@@ -194,8 +194,8 @@
194
194
  display: flex;
195
195
  align-items: center;
196
196
  box-sizing: border-box;
197
- gap: var(--semantic-space-component-gap);
198
- padding: var(--semantic-space-component-gap);
197
+ gap: var(--semantic-space-scale-xs);
198
+ padding: var(--semantic-space-scale-xs);
199
199
  border-radius: var(
200
200
  --primitive-radius-4
201
201
  ); /* tier-ok: alert.tsx itself carries the identical exemption ("tier-ok: 4px primitive radius, no semantic 4px token", alert.tsx:24) */