@hirobius/design-system 0.19.1 → 0.20.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 (142) hide show
  1. package/CONSUMING.md +9 -6
  2. package/DESIGN.md +7 -5
  3. package/README.md +14 -11
  4. package/codemods/hds-prefix.mjs +231 -0
  5. package/codemods/jsx-fold.mjs +515 -0
  6. package/codemods/not-found-pattern.mjs +71 -0
  7. package/codemods/patterns-subpath.mjs +242 -81
  8. package/codemods/patterns-subpath.names.json +41 -15
  9. package/codemods/removed-0.20.json +194 -0
  10. package/codemods/tile-grid.mjs +283 -0
  11. package/codemods/unrewritable.mjs +291 -0
  12. package/dist/chunks/DemoStateContext-Cz5TmrYu.js +32 -0
  13. package/dist/chunks/empty-state-BBqhCx0S.js +1217 -0
  14. package/dist/contexts.js +157 -78
  15. package/dist/hirobius-ui.js +1517 -5270
  16. package/dist/manifest.js +12 -13
  17. package/dist/patterns.js +780 -513
  18. package/dist/styles.css +1 -1
  19. package/dist/tokens.css +1 -1
  20. package/dist/tokens.js +29 -8
  21. package/dist/types/src/app/components/avatar-group.d.ts +1 -2
  22. package/dist/types/src/app/components/badge.d.ts +8 -3
  23. package/dist/types/src/app/components/blockquote.d.ts +1 -2
  24. package/dist/types/src/app/components/box-sx.d.ts +110 -13
  25. package/dist/types/src/app/components/box.d.ts +6 -3
  26. package/dist/types/src/app/components/breadcrumb.d.ts +0 -5
  27. package/dist/types/src/app/components/button.d.ts +33 -4
  28. package/dist/types/src/app/components/card.d.ts +7 -8
  29. package/dist/types/src/app/components/combobox.d.ts +47 -11
  30. package/dist/types/src/app/components/container.d.ts +2 -2
  31. package/dist/types/src/app/components/data-table-section.d.ts +1 -1
  32. package/dist/types/src/app/components/dialog.d.ts +7 -1
  33. package/dist/types/src/app/components/disclosure.d.ts +1 -5
  34. package/dist/types/src/app/components/field.d.ts +1 -2
  35. package/dist/types/src/app/components/grid.d.ts +10 -6
  36. package/dist/types/src/app/components/hds-tooltip.d.ts +12 -2
  37. package/dist/types/src/app/components/inline-code.d.ts +1 -2
  38. package/dist/types/src/app/components/input.d.ts +8 -5
  39. package/dist/types/src/app/components/kbd.d.ts +1 -2
  40. package/dist/types/src/app/components/metadata-list.d.ts +1 -2
  41. package/dist/types/src/app/components/page-header.d.ts +0 -2
  42. package/dist/types/src/app/components/popover.d.ts +8 -0
  43. package/dist/types/src/app/components/progress.d.ts +33 -6
  44. package/dist/types/src/app/components/segmented-control.d.ts +2 -26
  45. package/dist/types/src/app/components/select.d.ts +10 -1
  46. package/dist/types/src/app/components/skeleton.d.ts +2 -3
  47. package/dist/types/src/app/components/spinner.d.ts +1 -2
  48. package/dist/types/src/app/components/stack.d.ts +4 -1
  49. package/dist/types/src/app/components/stat.d.ts +1 -2
  50. package/dist/types/src/app/components/status-dot.d.ts +18 -4
  51. package/dist/types/src/app/components/status-list-item.d.ts +1 -2
  52. package/dist/types/src/app/components/surface.d.ts +2 -3
  53. package/dist/types/src/app/components/switcher.d.ts +1 -1
  54. package/dist/types/src/app/components/table.d.ts +1 -15
  55. package/dist/types/src/app/components/tag.d.ts +0 -6
  56. package/dist/types/src/app/components/text.d.ts +1 -2
  57. package/dist/types/src/app/components/textarea.d.ts +1 -2
  58. package/dist/types/src/app/components/toast.d.ts +1 -2
  59. package/dist/types/src/app/components/tooltip.d.ts +1 -1
  60. package/dist/types/src/app/context/DemoStateContext.d.ts +1 -1
  61. package/dist/types/src/app/context/RouterContext.d.ts +5 -5
  62. package/dist/types/src/app/data/manifest-types.d.ts +6 -5
  63. package/dist/types/src/app/design-system/generated-token-refs.d.ts +8 -0
  64. package/dist/types/src/app/design-system/generated-token-values.d.ts +1 -0
  65. package/dist/types/src/app/design-system/tokens.d.ts +22 -3
  66. package/dist/types/src/icons.d.ts +1 -1
  67. package/dist/types/src/index.d.ts +33 -124
  68. package/dist/types/src/patterns.d.ts +20 -25
  69. package/dist/variables.css +6 -0
  70. package/docs/CONSUMING.md +21 -13
  71. package/hirobius.tokens.json +48 -15
  72. package/llms.txt +19 -20
  73. package/package.json +17 -22
  74. package/public/hds-manifest.json +2405 -6537
  75. package/public/llms/components.txt +41 -423
  76. package/public/llms/layout.txt +4 -4
  77. package/public/llms-full.txt +67 -448
  78. package/public/llms.txt +19 -20
  79. package/src/app/data/component-api.json +1379 -3271
  80. package/dist/chunks/LanguageContext-BxdCwiFg.js +0 -95
  81. package/dist/chunks/TokenDisplayContext-DKYJMVWk.js +0 -26
  82. package/dist/chunks/activity-feed-BGQ6v3wc.js +0 -22040
  83. package/dist/types/src/app/components/activity-feed.d.ts +0 -73
  84. package/dist/types/src/app/components/app-shell.d.ts +0 -40
  85. package/dist/types/src/app/components/aspect-ratio.d.ts +0 -25
  86. package/dist/types/src/app/components/bleed.d.ts +0 -39
  87. package/dist/types/src/app/components/button-group.d.ts +0 -22
  88. package/dist/types/src/app/components/calendar.d.ts +0 -22
  89. package/dist/types/src/app/components/carousel.d.ts +0 -26
  90. package/dist/types/src/app/components/center.d.ts +0 -36
  91. package/dist/types/src/app/components/cinematic-link.d.ts +0 -18
  92. package/dist/types/src/app/components/circular-progress.d.ts +0 -28
  93. package/dist/types/src/app/components/cluster.d.ts +0 -39
  94. package/dist/types/src/app/components/command-palette.d.ts +0 -46
  95. package/dist/types/src/app/components/component-instance-matrix.d.ts +0 -27
  96. package/dist/types/src/app/components/context-menu.d.ts +0 -78
  97. package/dist/types/src/app/components/cover.d.ts +0 -43
  98. package/dist/types/src/app/components/date-input.d.ts +0 -31
  99. package/dist/types/src/app/components/date-range-input.d.ts +0 -34
  100. package/dist/types/src/app/components/date-time-input.d.ts +0 -30
  101. package/dist/types/src/app/components/doc-link-card.d.ts +0 -32
  102. package/dist/types/src/app/components/error-boundary.d.ts +0 -25
  103. package/dist/types/src/app/components/file-input.d.ts +0 -30
  104. package/dist/types/src/app/components/foundation-swatch.d.ts +0 -45
  105. package/dist/types/src/app/components/frame.d.ts +0 -38
  106. package/dist/types/src/app/components/heading-stack.d.ts +0 -52
  107. package/dist/types/src/app/components/history-card.d.ts +0 -12
  108. package/dist/types/src/app/components/hover-card.d.ts +0 -46
  109. package/dist/types/src/app/components/icon-button.d.ts +0 -22
  110. package/dist/types/src/app/components/image-lightbox.d.ts +0 -14
  111. package/dist/types/src/app/components/input-group.d.ts +0 -23
  112. package/dist/types/src/app/components/multi-selector.d.ts +0 -40
  113. package/dist/types/src/app/components/nav-group.d.ts +0 -29
  114. package/dist/types/src/app/components/nav-item.d.ts +0 -33
  115. package/dist/types/src/app/components/not-found-pattern.d.ts +0 -1
  116. package/dist/types/src/app/components/overflow-list.d.ts +0 -21
  117. package/dist/types/src/app/components/selectable-card.d.ts +0 -29
  118. package/dist/types/src/app/components/side-nav.d.ts +0 -23
  119. package/dist/types/src/app/components/sketch.d.ts +0 -19
  120. package/dist/types/src/app/components/stacked-card-rail.d.ts +0 -32
  121. package/dist/types/src/app/components/stepper-field.d.ts +0 -12
  122. package/dist/types/src/app/components/stepper.d.ts +0 -33
  123. package/dist/types/src/app/components/text-lockup.d.ts +0 -38
  124. package/dist/types/src/app/components/tile-grid.d.ts +0 -17
  125. package/dist/types/src/app/components/time-input.d.ts +0 -24
  126. package/dist/types/src/app/components/toggle-button.d.ts +0 -32
  127. package/dist/types/src/app/components/token.d.ts +0 -90
  128. package/dist/types/src/app/components/tokenUtils.d.ts +0 -38
  129. package/dist/types/src/app/components/tokenizer.d.ts +0 -24
  130. package/dist/types/src/app/components/toolbar.d.ts +0 -36
  131. package/dist/types/src/app/components/top-nav.d.ts +0 -23
  132. package/dist/types/src/app/components/tree-list.d.ts +0 -30
  133. package/dist/types/src/app/data/nav-model.d.ts +0 -39
  134. package/dist/types/src/app/hooks/useFocusVisible.d.ts +0 -9
  135. package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +0 -20
  136. package/dist/types/src/app/layouts/DocLayout.d.ts +0 -14
  137. package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +0 -6
  138. package/dist/types/src/app/layouts/HdsDocsShell.d.ts +0 -72
  139. package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +0 -14
  140. package/dist/types/src/app/lib/hds-search.d.ts +0 -45
  141. package/dist/types/src/app/lib/nav-active.d.ts +0 -16
  142. package/dist/types/src/app/lib/navLevels.d.ts +0 -4
package/dist/patterns.js CHANGED
@@ -1,430 +1,693 @@
1
1
  'use client';
2
- import { S as I, C as u, a as _, b as V, G as E, T as S, A as p, B as w, E as P, c as z } from "./chunks/activity-feed-BGQ6v3wc.js";
3
- import { d as he, e as pe, f as ue, g as me, h as ge, i as fe, j as ve, D as ye, k as be, F as we, L as xe, N as ke, O as Se, P as Ce, R as Te, l as Ne, m as Ie, n as Ve, o as Ae, p as Me, q as Re, r as $e, s as Fe, t as je, u as De, v as He, w as Le, x as _e, y as Ee, z as Pe, H as ze, I as Be, J as We, K as Oe, M as Ge, Q as Ue, U as Xe, V as Ye, W as qe, X as Ke, Y as Je, Z as Qe, _ as Ze } from "./chunks/activity-feed-BGQ6v3wc.js";
4
- import { F as aa, b as ta, a as ra, u as ia } from "./chunks/form-COP3vK9_.js";
5
- import { jsxs as o, Fragment as A, jsx as e } from "react/jsx-runtime";
6
- import * as d from "react";
7
- import { useRef as x, useEffect as N } from "react";
8
- import v from "./tokens.js";
9
- import { cn as M } from "./cn.js";
10
- const C = 280, B = 380, k = 24, R = 3.5, W = `
11
- .hds-scr-outer {
12
- position: relative;
13
- overflow: hidden;
14
- width: 100%; /* audit-ok: percentage fill in CSS template */
15
- --card-width: ${C}px;
16
- --card-height: ${B}px;
17
- --card-gap: ${k}px;
18
- --visible-count: ${R};
19
- }
20
-
21
- /* Vertical scroll container — maps vertical scrolling to a horizontal strip */
22
- .hds-scr-yscroll {
23
- position: absolute;
24
- top: 0;
25
- left: 0;
26
- width: 100%; /* audit-ok: percentage fill in CSS template */
27
- height: 100%; /* audit-ok: percentage fill in CSS template */
28
- overflow-y: scroll;
29
- overflow-x: hidden;
30
- scrollbar-width: none;
31
- -ms-overflow-style: none;
32
- }
33
- .hds-scr-yscroll::-webkit-scrollbar {
34
- display: none;
35
- }
36
-
37
- /* Tall spacer that gives the vertical scroll room to travel */
38
- .hds-scr-spacer {
39
- /* Total scroll travel = card-width × card-count so each card gets a full
40
- width of scroll travel. The visible window is added back so the last
41
- card reaches the entry position. */
42
- height: var(--hds-scr-spacer-height, 4000px);
43
- width: 100%; /* audit-ok: percentage fill in CSS template */
44
- }
45
-
46
- /* Sticky strip — stays pinned in view while the vertical container scrolls */
47
- .hds-scr-strip {
48
- position: sticky;
49
- top: 0;
50
- overflow-x: scroll;
51
- overflow-y: hidden;
52
- scrollbar-width: none;
53
- -ms-overflow-style: none;
54
- height: calc(var(--card-height) + 48px);
55
- display: flex;
56
- align-items: center;
57
- }
58
- .hds-scr-strip::-webkit-scrollbar {
59
- display: none;
60
- }
61
-
62
- /* Horizontal track */
63
- .hds-scr-track {
64
- display: flex;
65
- align-items: center;
66
- padding: 0 ${k}px;
67
- gap: var(--card-gap);
68
- /* Wide enough to hold all cards plus padding */
69
- min-width: max-content;
70
- }
71
-
72
- /* Individual card wrapper — controls position in the flow */
73
- .hds-scr-card {
74
- flex: 0 0 var(--card-width);
75
- height: var(--card-height);
76
- position: relative;
77
- cursor: pointer;
78
- transition:
79
- transform 0.25s ease,
80
- width 0.25s ease;
81
- z-index: 0;
82
- }
83
-
84
- /* Card inner surface */
85
- .hds-scr-card-inner {
86
- width: 100%; /* audit-ok: percentage fill in CSS template */
87
- height: 100%; /* audit-ok: percentage fill in CSS template */
88
- border-radius: ${v.borderRadius[8]};
89
- background: var(--semantic-color-surface-raised);
90
- border: 1px solid var(--semantic-color-border-default);
91
- box-shadow: var(--semantic-shadow-subtle);
92
- overflow: hidden;
93
- display: flex;
94
- flex-direction: column;
95
- text-decoration: none;
96
- color: inherit;
97
- transition:
98
- transform 0.25s ease,
99
- box-shadow 0.25s ease;
100
- }
101
-
102
- /* Hover: widen card 25% and lift it */
103
- .hds-scr-card:hover {
104
- z-index: 10;
105
- transform: translate(-10%, -4.5%);
106
- flex-basis: calc(var(--card-width) * 1.25);
107
- width: calc(var(--card-width) * 1.25);
108
- }
109
- .hds-scr-card:hover .hds-scr-card-inner {
110
- box-shadow: var(--semantic-shadow-floating);
111
- }
112
-
113
- /* Neighbour shift — requires :has() support */
114
- @supports selector(:has(+ *)) {
115
- .hds-scr-card:hover + .hds-scr-card {
116
- transform: translateX(8%);
117
- }
118
- }
119
-
120
- /* Cover image */
121
- .hds-scr-cover {
122
- flex: 1 1 auto;
123
- min-height: 0;
124
- background-color: var(--semantic-color-surface-page);
125
- overflow: hidden;
126
- }
127
- .hds-scr-cover img {
128
- width: 100%; /* audit-ok: percentage fill in CSS template */
129
- height: 100%; /* audit-ok: percentage fill in CSS template */
130
- object-fit: cover;
131
- display: block;
132
- }
133
- .hds-scr-cover-placeholder {
134
- width: 100%; /* audit-ok: percentage fill in CSS template */
135
- height: 100%; /* audit-ok: percentage fill in CSS template */
136
- display: flex;
137
- align-items: center;
138
- justify-content: center;
139
- background: var(--semantic-color-surface-page);
140
- }
141
-
142
- /* Card metadata footer */
143
- .hds-scr-meta {
144
- flex: 0 0 auto;
145
- padding: 14px 16px 16px;
146
- display: flex;
147
- flex-direction: column;
148
- gap: 4px;
149
- border-top: 1px solid var(--semantic-color-border-subdued);
150
- }
151
-
152
- /* Scroll-driven stacking animation — Chrome 115+ / FF 110+ */
153
- @supports (animation-timeline: scroll()) {
154
- .hds-scr-card-inner {
155
- animation: hds-scr-stack linear;
156
- animation-timeline: view(
157
- x
158
- calc(0px - 2 * var(--card-width))
159
- calc(var(--card-width) * (var(--visible-count) - 0.2))
160
- );
161
- animation-duration: 1ms;
2
+ import { F as ut, b as mt, a as ht, u as ft } from "./chunks/form-COP3vK9_.js";
3
+ import { jsx as a, jsxs as l } from "react/jsx-runtime";
4
+ import m from "./tokens.js";
5
+ import { C as he, h as fe, S as h, G as ae, u as ne, a as L, I as $, T as P, B as V, b as re, A as S, E as ve, c as ge } from "./chunks/empty-state-BBqhCx0S.js";
6
+ import * as y from "react";
7
+ import ye, { useState as I, useId as be, useRef as W } from "react";
8
+ import { AnimatePresence as Z, motion as ie } from "motion/react";
9
+ import { cva as x } from "class-variance-authority";
10
+ import { Check as O, Copy as X, ChevronDown as xe } from "lucide-react";
11
+ import { cn as b } from "./cn.js";
12
+ const we = {
13
+ default: { top: m.space.px48, bottom: m.space.px64 },
14
+ compact: { top: m.space.px24, bottom: m.space.px32 },
15
+ none: { top: "0", bottom: "0" }
16
+ };
17
+ function qe({
18
+ children: r,
19
+ maxWidth: t = "max",
20
+ paddingY: i = "default",
21
+ style: n,
22
+ className: e
23
+ }) {
24
+ const s = we[i];
25
+ return /* @__PURE__ */ a(he, { maxWidth: t, className: e, children: /* @__PURE__ */ a(
26
+ "div",
27
+ {
28
+ "data-hds-component": "Page",
29
+ "data-hds-metrics": `paddingY:${i}`,
30
+ style: { paddingTop: s.top, paddingBottom: s.bottom, ...n },
31
+ children: r
162
32
  }
163
-
164
- @keyframes hds-scr-stack {
165
- from {
166
- transform: translateX(0%) scale(1);
167
- opacity: 1;
168
- }
169
- to {
170
- transform: translateX(300%) scale(0.5);
171
- opacity: 0;
172
- }
33
+ ) });
34
+ }
35
+ const ke = {
36
+ background: "var(--semantic-color-surface-accent)",
37
+ border: "none",
38
+ borderRadius: m.borderRadius.full,
39
+ // content.onAccent flips with the accent fill: white on the dark light-mode
40
+ // fill, a dark neutral on the light dark-mode fill (fixed white read ~1.1:1).
41
+ color: m.color.content.onAccent,
42
+ display: "inline-flex",
43
+ pointerEvents: "none",
44
+ paddingBlock: m.space.px6,
45
+ paddingInline: m.space.px16
46
+ }, Se = {
47
+ ...m.typeStyles.ui,
48
+ userSelect: "none",
49
+ whiteSpace: "nowrap"
50
+ };
51
+ function G({ label: r }) {
52
+ const t = ne("productive");
53
+ return /* @__PURE__ */ a(
54
+ ie.div,
55
+ {
56
+ initial: { opacity: 0, scale: 0.82 },
57
+ animate: { opacity: 1, scale: 1 },
58
+ exit: { opacity: 0, scale: 0.82 },
59
+ transition: { duration: t.duration, ease: t.easing },
60
+ children: /* @__PURE__ */ a(L, { as: "span", padding: "none", style: ke, children: /* @__PURE__ */ a(h, { as: "span", direction: "row", gap: "xs", align: "center", style: Se, children: /* @__PURE__ */ a("span", { children: r }) }) })
173
61
  }
174
-
175
- /* Cancel the animation on a hovered card so it stays visible */
176
- .hds-scr-card:hover .hds-scr-card-inner {
177
- animation: none;
62
+ );
63
+ }
64
+ function K({ visible: r, mode: t, label: i = "Expand", x: n = 0, y: e = 0 }) {
65
+ return t === "cursor" ? /* @__PURE__ */ a(fe, { children: /* @__PURE__ */ a(Z, { children: r && /* @__PURE__ */ a(
66
+ h,
67
+ {
68
+ gap: "xs",
69
+ style: {
70
+ position: "fixed",
71
+ left: n,
72
+ top: e,
73
+ zIndex: m.zIndex.modal,
74
+ transform: "translate(14px, -50%)",
75
+ pointerEvents: "none"
76
+ },
77
+ children: /* @__PURE__ */ a(G, { label: i })
178
78
  }
179
- }
180
-
181
- /* Fallback outer height when scroll-driven animations are not available:
182
- a static card-height plus some breathing room */
183
- .hds-scr-outer[data-fallback="true"] {
184
- /* Outer div becomes a straight horizontal scroll container */
185
- overflow-x: auto;
186
- overflow-y: hidden;
187
- scrollbar-width: thin;
188
- }
189
- .hds-scr-outer[data-fallback="true"] .hds-scr-yscroll {
190
- position: static;
191
- overflow: visible;
192
- height: auto;
193
- width: auto;
194
- }
195
- .hds-scr-outer[data-fallback="true"] .hds-scr-spacer {
196
- height: auto;
197
- width: auto;
198
- }
199
- .hds-scr-outer[data-fallback="true"] .hds-scr-strip {
200
- position: static;
201
- overflow-x: visible;
202
- overflow-y: visible;
203
- }
204
- .hds-scr-outer[data-fallback="true"] .hds-scr-track {
205
- padding: 12px ${k}px;
206
- }
207
- `;
208
- function O() {
209
- return /* @__PURE__ */ e("div", { className: "hds-scr-cover-placeholder", "aria-hidden": "true", children: /* @__PURE__ */ o(
210
- "svg",
79
+ ) }) }) : /* @__PURE__ */ a(Z, { children: r && /* @__PURE__ */ a(
80
+ ae,
211
81
  {
212
- width: "48",
213
- height: "48",
214
- viewBox: "0 0 48 48",
215
- fill: "none",
216
- xmlns: "http://www.w3.org/2000/svg",
217
- "aria-hidden": "true",
218
- children: [
219
- /* @__PURE__ */ e(
220
- "rect",
221
- {
222
- x: "6",
223
- y: "10",
224
- width: "36",
225
- height: "28",
226
- rx: "3",
227
- stroke: "var(--semantic-color-border-default)",
228
- strokeWidth: "1.5"
229
- }
230
- ),
231
- /* @__PURE__ */ e(
232
- "circle",
233
- {
234
- cx: "16",
235
- cy: "20",
236
- r: "4",
237
- stroke: "var(--semantic-color-border-default)",
238
- strokeWidth: "1.5"
239
- }
240
- ),
241
- /* @__PURE__ */ e(
242
- "path",
243
- {
244
- d: "M6 30l10-8 8 6 6-5 12 9",
245
- stroke: "var(--semantic-color-border-default)",
246
- strokeWidth: "1.5",
247
- strokeLinejoin: "round"
248
- }
249
- )
250
- ]
82
+ columns: 1,
83
+ gap: "tight",
84
+ style: {
85
+ position: "absolute",
86
+ inset: 0,
87
+ alignItems: "center",
88
+ justifyItems: "center",
89
+ pointerEvents: "none",
90
+ zIndex: m.zIndex.focus
91
+ },
92
+ children: /* @__PURE__ */ a(G, { label: i })
251
93
  }
252
94
  ) });
253
95
  }
254
- function G({ card: r, index: a, total: s }) {
255
- const t = /* @__PURE__ */ o(A, { children: [
256
- /* @__PURE__ */ e("div", { className: "hds-scr-cover", children: r.coverImage ? /* @__PURE__ */ e(
257
- "img",
96
+ const R = 280;
97
+ function Qe({
98
+ src: r,
99
+ alt: t,
100
+ title: i,
101
+ style: n = {},
102
+ className: e,
103
+ draggable: s = !1,
104
+ isDark: u = !1,
105
+ naturalWidth: d,
106
+ naturalHeight: p,
107
+ onClick: o,
108
+ onMouseDown: g,
109
+ onMouseMove: f,
110
+ onMouseUp: w,
111
+ onMouseLeave: k,
112
+ expandable: T = !0,
113
+ expandLabel: E,
114
+ context: v = "default",
115
+ loading: A = "lazy"
116
+ }) {
117
+ const [_, C] = I(!1), j = n && typeof n == "object" ? n : {}, [F, D] = I(!1), [oe, Y] = I(!1), [ce, le] = I(0), [de, pe] = I(0), ue = v === "default" && T && !!o;
118
+ if (!_)
119
+ return ue ? /* @__PURE__ */ l(
120
+ "div",
258
121
  {
259
- src: r.coverImage,
260
- alt: r.title,
261
- loading: a < 4 ? "eager" : "lazy",
262
- decoding: "async"
122
+ className: e ? `hds-focus ${e}` : "hds-focus",
123
+ style: {
124
+ position: "relative",
125
+ display: "inline-flex",
126
+ overflow: "hidden",
127
+ cursor: "pointer",
128
+ flexShrink: j.flexShrink
129
+ },
130
+ role: "button",
131
+ tabIndex: 0,
132
+ "aria-label": t,
133
+ onClick: o,
134
+ onKeyDown: (c) => {
135
+ (c.key === "Enter" || c.key === " ") && o && (c.preventDefault(), o(c));
136
+ },
137
+ onMouseEnter: () => D(!0),
138
+ onMouseMove: (c) => {
139
+ le(c.clientX), pe(c.clientY), f == null || f(c);
140
+ },
141
+ onMouseLeave: (c) => {
142
+ D(!1), k == null || k(c);
143
+ },
144
+ onMouseDown: g,
145
+ onMouseUp: w,
146
+ onFocus: () => Y(!0),
147
+ onBlur: () => Y(!1),
148
+ children: [
149
+ /* @__PURE__ */ a(
150
+ "img",
151
+ {
152
+ src: r,
153
+ alt: t,
154
+ loading: A,
155
+ style: j,
156
+ draggable: s,
157
+ onError: () => C(!0)
158
+ }
159
+ ),
160
+ /* @__PURE__ */ a(K, { mode: "centered", visible: oe && !F, label: E }),
161
+ /* @__PURE__ */ a(
162
+ K,
163
+ {
164
+ mode: "cursor",
165
+ visible: F,
166
+ x: ce,
167
+ y: de,
168
+ label: E
169
+ }
170
+ )
171
+ ]
263
172
  }
264
- ) : /* @__PURE__ */ e(O, {}) }),
265
- /* @__PURE__ */ o("div", { className: "hds-scr-meta", children: [
266
- r.category && /* @__PURE__ */ e(
267
- "span",
268
- {
269
- style: {
270
- ...v.typeStyles.eyebrow,
271
- color: "var(--semantic-color-content-secondary)"
272
- },
273
- children: r.category
274
- }
275
- ),
276
- /* @__PURE__ */ e(
277
- "span",
173
+ ) : (
174
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
175
+ /* @__PURE__ */ a(
176
+ "img",
278
177
  {
279
- style: {
280
- ...v.typeStyles.heading3,
281
- color: "var(--semantic-color-content-primary)"
282
- },
283
- children: r.title
178
+ src: r,
179
+ alt: t,
180
+ loading: A,
181
+ style: j,
182
+ className: e,
183
+ draggable: s,
184
+ onClick: o,
185
+ onKeyDown: o ? (c) => {
186
+ c.key === "Enter" && o(c);
187
+ } : void 0,
188
+ onMouseDown: g,
189
+ onMouseMove: f,
190
+ onMouseUp: w,
191
+ onMouseLeave: k,
192
+ onError: () => C(!0)
284
193
  }
285
194
  )
286
- ] })
287
- ] });
288
- return /* @__PURE__ */ e(
195
+ );
196
+ if (v === "detail")
197
+ return /* @__PURE__ */ a(
198
+ "div",
199
+ {
200
+ className: e,
201
+ style: {
202
+ backgroundColor: "var(--semantic-color-surface-overlay)",
203
+ display: "flex",
204
+ alignItems: "center",
205
+ justifyContent: "center"
206
+ },
207
+ role: t ? "img" : void 0,
208
+ "aria-hidden": t ? void 0 : !0,
209
+ "aria-label": t || void 0
210
+ }
211
+ );
212
+ const N = d && p ? d / p : 4 / 3, me = N < 1;
213
+ let M = {};
214
+ if (v === "lightbox")
215
+ M = n.width === "100%" ? { width: "100%", aspectRatio: `${N}`, display: "block" } : {
216
+ height: n.maxHeight ?? "70vh",
217
+ width: "auto",
218
+ aspectRatio: `${N}`,
219
+ display: "block",
220
+ flexShrink: 0
221
+ };
222
+ else {
223
+ let c, z;
224
+ if (n.maxHeight && !n.width) {
225
+ const H = parseInt(n.maxHeight) || R;
226
+ z = H, c = Math.round(H * N);
227
+ } else if (n.maxWidth && !n.height) {
228
+ const H = parseInt(n.maxWidth) || R;
229
+ c = H, z = Math.round(H / N);
230
+ } else n.width === "100%" ? (c = 0, z = 0) : me ? (c = R, z = Math.round(R / N)) : (z = R, c = Math.round(R * N));
231
+ M = c === 0 ? { width: "100%", aspectRatio: `${N}`, display: "block" } : { width: c, height: z, display: "block", flexShrink: 0 };
232
+ }
233
+ return /* @__PURE__ */ a(
289
234
  "div",
290
235
  {
291
- className: "hds-scr-card",
292
- style: { "--card-index": a },
293
- "aria-label": `${r.title}${r.category ? `, ${r.category}` : ""}, card ${a + 1} of ${s}`,
294
- children: r.href ? /* @__PURE__ */ e(
295
- "a",
236
+ className: e,
237
+ style: {
238
+ ...M,
239
+ backgroundColor: "var(--semantic-color-surface-overlay)",
240
+ display: "flex",
241
+ alignItems: "center",
242
+ justifyContent: "center",
243
+ flexDirection: "column",
244
+ gap: m.space.px4,
245
+ overflow: "hidden",
246
+ cursor: o ? v === "lightbox" ? "zoom-in" : "pointer" : void 0
247
+ },
248
+ role: o ? "button" : t ? "img" : void 0,
249
+ "aria-hidden": !o && !t ? !0 : void 0,
250
+ tabIndex: o ? 0 : void 0,
251
+ onClick: o,
252
+ onKeyDown: o ? (c) => {
253
+ (c.key === "Enter" || c.key === " ") && o(c);
254
+ } : void 0,
255
+ "aria-label": t || void 0,
256
+ children: i && /* @__PURE__ */ a(
257
+ "span",
296
258
  {
297
- href: r.href,
298
- className: "hds-focus hds-scr-card-inner",
299
259
  style: {
300
- display: "flex",
301
- flexDirection: "column",
302
- height: "100%",
303
- textDecoration: "none",
304
- color: "inherit"
260
+ ...m.typeStyles.caption,
261
+ color: "var(--semantic-color-content-secondary)",
262
+ textAlign: "center",
263
+ maxWidth: "75%",
264
+ whiteSpace: "normal",
265
+ userSelect: "none"
305
266
  },
306
- children: t
267
+ children: i
307
268
  }
308
- ) : /* @__PURE__ */ e("div", { className: "hds-scr-card-inner", children: t })
269
+ )
309
270
  }
310
271
  );
311
272
  }
312
- function te({ cards: r }) {
313
- const a = x(null), s = x(null), t = x(null), n = r.length, c = C * n + /* trailing breathing room */
314
- C * R;
315
- return N(() => {
316
- const i = s.current, l = t.current;
317
- if (!i || !l) return;
318
- function h() {
319
- !i || !l || (l.scrollLeft = i.scrollTop);
273
+ const B = "[font-family:var(--semantic-typography-mono-font-family)] [font-size:var(--semantic-typography-mono-font-size)] [font-weight:var(--semantic-typography-mono-font-weight)] [letter-spacing:var(--semantic-typography-mono-letter-spacing)] [line-height:var(--semantic-typography-mono-line-height)] max-w-[var(--semantic-typography-mono-max-width)]", U = /* @__PURE__ */ x(
274
+ "overflow-hidden rounded-[var(--semantic-radius-action)] border border-solid border-[var(--semantic-color-border-default)] bg-[var(--semantic-color-surface-raised)]"
275
+ ), Ne = /* @__PURE__ */ x(
276
+ "flex w-full min-w-0 min-h-[var(--semantic-size-control-lg)] items-center justify-between gap-[var(--semantic-space-subgrid-gap)] overflow-hidden rounded-[var(--semantic-radius-action)] border border-solid border-[var(--semantic-color-border-default)] bg-[var(--semantic-color-surface-raised)] py-[var(--semantic-space-subgrid-gap)] pl-[var(--semantic-space-scale-xs)] pr-[var(--semantic-space-subgrid-gap)]"
277
+ ), Ce = /* @__PURE__ */ x(
278
+ "flex items-center justify-between border-b border-solid border-[var(--semantic-color-border-default)] py-[var(--semantic-space-subgrid-gap)] pl-[var(--semantic-space-surface-padding)] pr-[var(--semantic-space-subgrid-gap)]"
279
+ ), J = /* @__PURE__ */ x(
280
+ "flex items-center gap-[var(--semantic-space-scale-xs)]"
281
+ ), Ie = /* @__PURE__ */ x(
282
+ `flex w-full cursor-pointer items-center justify-between border-0 bg-transparent px-[var(--semantic-space-surface-padding)] py-[var(--semantic-space-scale-xs)] text-[var(--semantic-color-content-primary)] ${B}`
283
+ ), Te = /* @__PURE__ */ x(
284
+ "border-t border-solid border-[var(--semantic-color-border-default)]"
285
+ ), Ee = /* @__PURE__ */ x(
286
+ "inline-flex transition-transform duration-[var(--hds-motion-productive-duration)] ease",
287
+ {
288
+ variants: {
289
+ expanded: {
290
+ true: "rotate-180",
291
+ false: "rotate-0"
292
+ }
293
+ },
294
+ defaultVariants: { expanded: !1 }
295
+ }
296
+ ), q = /* @__PURE__ */ x(
297
+ "flex cursor-pointer items-center gap-[var(--semantic-space-subgrid-gap)]",
298
+ {
299
+ variants: {
300
+ variant: {
301
+ inline: "shrink-0 border-0 bg-transparent py-[var(--semantic-space-subgrid-gap)] pl-[var(--semantic-space-scale-xs)] pr-[var(--semantic-space-subgrid-gap)] transition-[background-color,color,transform] duration-[var(--hds-motion-productive-duration)] ease",
302
+ block: "absolute right-[var(--semantic-space-subgrid-gap)] top-[var(--semantic-space-subgrid-gap)] rounded-[var(--semantic-radius-action)] border border-solid border-[var(--semantic-color-border-default)] bg-[var(--semantic-color-surface-raised)] px-[var(--semantic-space-scale-xs)] py-[var(--semantic-space-subgrid-gap)] transition-[background-color,color] duration-[var(--hds-motion-productive-duration)] ease"
303
+ }
304
+ },
305
+ defaultVariants: { variant: "block" }
306
+ }
307
+ ), Ae = /* @__PURE__ */ x(
308
+ `block min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap not-italic text-[var(--semantic-color-content-primary)] ${B}`,
309
+ {
310
+ variants: {
311
+ truncateFromStart: {
312
+ true: "[direction:rtl] [text-align:left]",
313
+ false: "[direction:ltr] [text-align:inherit]"
314
+ }
315
+ },
316
+ defaultVariants: { truncateFromStart: !1 }
317
+ }
318
+ ), Q = /* @__PURE__ */ x(
319
+ `whitespace-pre text-[var(--semantic-color-content-primary)] ${B}`
320
+ ), ee = /* @__PURE__ */ x(
321
+ "m-0 overflow-x-auto p-[var(--semantic-space-section-stack)] pr-[calc(var(--semantic-space-section-stack)_+_var(--semantic-size-control-lg))]",
322
+ {
323
+ variants: {
324
+ panelBackground: {
325
+ true: "bg-[var(--role-muted,var(--semantic-color-surface-raised))]",
326
+ false: ""
327
+ }
328
+ },
329
+ defaultVariants: { panelBackground: !1 }
330
+ }
331
+ );
332
+ function et({
333
+ code: r,
334
+ variant: t = "block",
335
+ truncateFromStart: i = !1,
336
+ language: n,
337
+ filename: e,
338
+ collapsible: s = !1,
339
+ defaultExpanded: u = !1,
340
+ className: d
341
+ }) {
342
+ const [p, o] = I(!1), [g, f] = I(u), w = be(), k = W(null), T = W(null);
343
+ function E() {
344
+ var F, D;
345
+ const j = !g;
346
+ !j && ((F = T.current) != null && F.contains(document.activeElement)) && ((D = k.current) == null || D.focus()), f(j);
347
+ }
348
+ function v() {
349
+ navigator.clipboard.writeText(r).then(() => {
350
+ o(!0), setTimeout(() => o(!1), 2e3);
351
+ });
352
+ }
353
+ if (t === "inline")
354
+ return /* @__PURE__ */ l("div", { className: b(Ne(), d), children: [
355
+ /* @__PURE__ */ a("code", { className: Ae({ truncateFromStart: i }), children: p ? "Copied" : r }),
356
+ /* @__PURE__ */ a(
357
+ "button",
358
+ {
359
+ onClick: v,
360
+ "aria-label": p ? "Copied" : "Copy code",
361
+ className: b("hds-focus", q({ variant: "inline" })),
362
+ children: p ? /* @__PURE__ */ a($, { icon: O, size: "small", color: "var(--semantic-color-content-primary)" }) : /* @__PURE__ */ a($, { icon: X, size: "small", color: "var(--semantic-color-content-primary)" })
363
+ }
364
+ )
365
+ ] });
366
+ const A = e || n ? /* @__PURE__ */ a("div", { className: Ce(), children: /* @__PURE__ */ l("div", { className: J(), children: [
367
+ e && /* @__PURE__ */ a(
368
+ "span",
369
+ {
370
+ className: b(B, "text-[var(--semantic-color-content-primary)]"),
371
+ children: e
372
+ }
373
+ ),
374
+ n && /* @__PURE__ */ a(
375
+ "span",
376
+ {
377
+ className: b(
378
+ B,
379
+ "text-[var(--semantic-color-content-secondary)]"
380
+ ),
381
+ children: n.toLowerCase()
382
+ }
383
+ )
384
+ ] }) }) : null, _ = /* @__PURE__ */ a(
385
+ "button",
386
+ {
387
+ onClick: v,
388
+ "aria-label": p ? "Copied" : "Copy code",
389
+ className: b("hds-focus", q({ variant: "block" })),
390
+ children: p ? /* @__PURE__ */ a($, { icon: O, size: "small", color: "var(--semantic-color-content-primary)" }) : /* @__PURE__ */ a($, { icon: X, size: "small", color: "var(--semantic-color-content-primary)" })
320
391
  }
321
- return i.addEventListener("scroll", h, { passive: !0 }), () => {
322
- i.removeEventListener("scroll", h);
323
- };
324
- }, []), N(() => {
325
- const i = a.current;
326
- if (!i) return;
327
- typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("animation-timeline", "scroll()") || i.setAttribute("data-fallback", "true");
328
- }, []), /* @__PURE__ */ o(A, { children: [
329
- /* @__PURE__ */ e("style", { dangerouslySetInnerHTML: { __html: W } }),
330
- /* @__PURE__ */ e(
331
- "div",
392
+ ), C = /* @__PURE__ */ l("div", { className: "relative", children: [
393
+ /* @__PURE__ */ a(
394
+ "pre",
332
395
  {
333
- ref: a,
334
- className: "hds-scr-outer",
335
- style: {
336
- height: "calc(var(--card-height) + 48px)"
337
- },
396
+ tabIndex: 0,
338
397
  role: "region",
339
- "aria-label": "Project cards",
340
- children: /* @__PURE__ */ o(
341
- "div",
398
+ "aria-label": "Code sample",
399
+ className: ee({ panelBackground: !0 }),
400
+ children: /* @__PURE__ */ a("code", { className: Q(), children: te(r, n) })
401
+ }
402
+ ),
403
+ _
404
+ ] });
405
+ return s ? /* @__PURE__ */ l("div", { className: b(U(), d), children: [
406
+ /* @__PURE__ */ l(
407
+ "button",
408
+ {
409
+ ref: k,
410
+ type: "button",
411
+ onClick: E,
412
+ "aria-expanded": g,
413
+ "aria-controls": w,
414
+ className: b("hds-focus", Ie()),
415
+ children: [
416
+ /* @__PURE__ */ l("span", { className: J(), children: [
417
+ /* @__PURE__ */ a("span", { children: g ? "Hide code" : "Show code" }),
418
+ e && // eslint-disable-next-line tailwindcss/no-arbitrary-value -- content-secondary token has no matching Tailwind-theme utility; var()-based so still token-driven
419
+ /* @__PURE__ */ a("span", { className: "text-[var(--semantic-color-content-secondary)]", children: e }),
420
+ n && // eslint-disable-next-line tailwindcss/no-arbitrary-value -- content-secondary token has no matching Tailwind-theme utility; var()-based so still token-driven
421
+ /* @__PURE__ */ a("span", { className: "text-[var(--semantic-color-content-secondary)]", children: n.toLowerCase() })
422
+ ] }),
423
+ /* @__PURE__ */ a("span", { className: Ee({ expanded: g }), children: /* @__PURE__ */ a($, { icon: xe, size: "small", color: "var(--semantic-color-content-secondary)" }) })
424
+ ]
425
+ }
426
+ ),
427
+ g && /* @__PURE__ */ a("div", { ref: T, id: w, className: Te(), children: C })
428
+ ] }) : /* @__PURE__ */ l("div", { className: b(U(), d), children: [
429
+ A,
430
+ /* @__PURE__ */ l("div", { className: "relative", children: [
431
+ /* @__PURE__ */ a(
432
+ "pre",
433
+ {
434
+ tabIndex: 0,
435
+ role: "region",
436
+ "aria-label": "Code sample",
437
+ className: ee({ panelBackground: !1 }),
438
+ children: /* @__PURE__ */ a("code", { className: Q(), children: te(r, n) })
439
+ }
440
+ ),
441
+ _
442
+ ] })
443
+ ] });
444
+ }
445
+ const _e = /* @__PURE__ */ new Set([
446
+ "import",
447
+ "export",
448
+ "from",
449
+ "as",
450
+ "default",
451
+ "const",
452
+ "let",
453
+ "var",
454
+ "function",
455
+ "return",
456
+ "if",
457
+ "else",
458
+ "for",
459
+ "while",
460
+ "switch",
461
+ "case",
462
+ "break",
463
+ "continue",
464
+ "new",
465
+ "class",
466
+ "extends",
467
+ "implements",
468
+ "interface",
469
+ "type",
470
+ "enum",
471
+ "public",
472
+ "private",
473
+ "protected",
474
+ "readonly",
475
+ "static",
476
+ "async",
477
+ "await",
478
+ "try",
479
+ "catch",
480
+ "finally",
481
+ "throw",
482
+ "typeof",
483
+ "instanceof",
484
+ "true",
485
+ "false",
486
+ "null",
487
+ "undefined",
488
+ "void",
489
+ "this",
490
+ "super",
491
+ "in",
492
+ "of"
493
+ ]), je = /* @__PURE__ */ new Set(["important", "inherit", "initial", "unset", "auto", "none"]);
494
+ function ze(r) {
495
+ switch (r) {
496
+ case "keyword":
497
+ return "text-[var(--semantic-color-content-accent,var(--semantic-color-content-primary))]";
498
+ case "string":
499
+ return "text-[var(--semantic-color-feedback-success)]";
500
+ case "comment":
501
+ return "text-[var(--semantic-color-content-secondary)]";
502
+ case "number":
503
+ return "text-[var(--semantic-color-feedback-warning)]";
504
+ case "type":
505
+ return "text-[var(--semantic-color-feedback-info)]";
506
+ default:
507
+ return "text-[var(--semantic-color-content-primary)]";
508
+ }
509
+ }
510
+ function Re(r) {
511
+ if (!r) return;
512
+ const t = r.trim().toLowerCase();
513
+ if (["ts", "tsx", "typescript", "js", "jsx", "javascript"].includes(t)) return "ts";
514
+ if (t === "json") return "json";
515
+ if (t === "css") return "css";
516
+ if (["html", "xml", "svg"].includes(t)) return "html";
517
+ }
518
+ function Fe(r) {
519
+ const t = [], i = /(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`)|(\b\d[\d_.eE+-]*\b)|([A-Za-z_$][\w$]*)/g;
520
+ let n = 0, e;
521
+ for (; (e = i.exec(r)) !== null; ) {
522
+ if (e.index > n && t.push({ kind: "plain", value: r.slice(n, e.index) }), e[1]) t.push({ kind: "comment", value: e[1] });
523
+ else if (e[2]) t.push({ kind: "string", value: e[2] });
524
+ else if (e[3]) t.push({ kind: "number", value: e[3] });
525
+ else if (e[4]) {
526
+ const s = e[4];
527
+ _e.has(s) ? t.push({ kind: "keyword", value: s }) : /^[A-Z]/.test(s) ? t.push({ kind: "type", value: s }) : t.push({ kind: "plain", value: s });
528
+ }
529
+ n = i.lastIndex;
530
+ }
531
+ return n < r.length && t.push({ kind: "plain", value: r.slice(n) }), t;
532
+ }
533
+ function De(r) {
534
+ const t = [], i = /("(?:\\.|[^"\\])*")(\s*:)?|(\b-?\d[\d.eE+-]*\b)|\b(true|false|null)\b/g;
535
+ let n = 0, e;
536
+ for (; (e = i.exec(r)) !== null; )
537
+ e.index > n && t.push({ kind: "plain", value: r.slice(n, e.index) }), e[1] ? (t.push({ kind: e[2] ? "type" : "string", value: e[1] }), e[2] && t.push({ kind: "plain", value: e[2] })) : e[3] ? t.push({ kind: "number", value: e[3] }) : e[4] && t.push({ kind: "keyword", value: e[4] }), n = i.lastIndex;
538
+ return n < r.length && t.push({ kind: "plain", value: r.slice(n) }), t;
539
+ }
540
+ function He(r) {
541
+ const t = [], i = /(\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*")|(--[A-Za-z_-][\w-]*)|(#[0-9a-fA-F]{3,8}\b|\b\d[\d.]*(?:px|rem|em|%|vh|vw|s|ms)?\b)|([A-Za-z_-][\w-]*)/g;
542
+ let n = 0, e;
543
+ for (; (e = i.exec(r)) !== null; )
544
+ e.index > n && t.push({ kind: "plain", value: r.slice(n, e.index) }), e[1] ? t.push({ kind: "comment", value: e[1] }) : e[2] ? t.push({ kind: "string", value: e[2] }) : e[3] ? t.push({ kind: "type", value: e[3] }) : e[4] ? t.push({ kind: "number", value: e[4] }) : e[5] && t.push({
545
+ kind: je.has(e[5].toLowerCase()) ? "keyword" : "plain",
546
+ value: e[5]
547
+ }), n = i.lastIndex;
548
+ return n < r.length && t.push({ kind: "plain", value: r.slice(n) }), t;
549
+ }
550
+ function $e(r) {
551
+ const t = [], i = /(<!--[\s\S]*?-->)|(<\/?)([A-Za-z][\w-]*)|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')|([A-Za-z_-][\w-]*)(=)/g;
552
+ let n = 0, e;
553
+ for (; (e = i.exec(r)) !== null; )
554
+ e.index > n && t.push({ kind: "plain", value: r.slice(n, e.index) }), e[1] ? t.push({ kind: "comment", value: e[1] }) : e[2] && e[3] ? (t.push({ kind: "plain", value: e[2] }), t.push({ kind: "keyword", value: e[3] })) : e[4] ? t.push({ kind: "string", value: e[4] }) : e[5] && (t.push({ kind: "type", value: e[5] }), t.push({ kind: "plain", value: e[6] })), n = i.lastIndex;
555
+ return n < r.length && t.push({ kind: "plain", value: r.slice(n) }), t;
556
+ }
557
+ function te(r, t) {
558
+ const i = Re(t);
559
+ if (!i) return r;
560
+ let n;
561
+ try {
562
+ if (i === "ts") n = Fe(r);
563
+ else if (i === "json") n = De(r);
564
+ else if (i === "css") n = He(r);
565
+ else if (i === "html") n = $e(r);
566
+ else return r;
567
+ } catch {
568
+ return r;
569
+ }
570
+ return n.map(
571
+ (e, s) => e.kind === "plain" ? /* @__PURE__ */ a("span", { children: e.value }, s) : /* @__PURE__ */ a("span", { className: ze(e.kind), children: e.value }, s)
572
+ );
573
+ }
574
+ const Pe = {
575
+ minHeight: "100vh",
576
+ display: "flex",
577
+ alignItems: "center",
578
+ justifyContent: "center",
579
+ fontFamily: m.fontFamily
580
+ };
581
+ function tt({
582
+ displayText: r = "Oops",
583
+ message: t = "Something went wrong"
584
+ }) {
585
+ const i = ne("spatial");
586
+ return /* @__PURE__ */ a("div", { style: Pe, "data-role": "error-recovery", children: /* @__PURE__ */ a(L, { padding: "component", children: /* @__PURE__ */ a(
587
+ ie.div,
588
+ {
589
+ initial: { opacity: 0, y: 2 },
590
+ animate: { opacity: 1, y: 0 },
591
+ transition: { duration: i.duration, ease: i.easing },
592
+ children: /* @__PURE__ */ l(h, { gap: "normal", style: { alignItems: "center", textAlign: "center" }, children: [
593
+ /* @__PURE__ */ a(
594
+ P,
342
595
  {
343
- ref: s,
344
- className: "hds-scr-yscroll",
345
- role: "region",
346
- "aria-label": "Project cards, vertical scroll",
347
- tabIndex: 0,
348
- style: { height: "100%" },
349
- children: [
350
- /* @__PURE__ */ e(
351
- "div",
352
- {
353
- className: "hds-scr-spacer",
354
- style: {
355
- "--hds-scr-spacer-height": `${c}px`
356
- }
357
- }
358
- ),
359
- /* @__PURE__ */ e(
360
- "div",
361
- {
362
- ref: t,
363
- className: "hds-scr-strip",
364
- role: "region",
365
- "aria-label": "Project cards, horizontal scroll",
366
- tabIndex: 0,
367
- children: /* @__PURE__ */ e("div", { className: "hds-scr-track", role: "list", children: r.map((i, l) => /* @__PURE__ */ e("div", { role: "listitem", children: /* @__PURE__ */ e(G, { card: i, index: l, total: n }) }, i.id)) })
368
- }
369
- )
370
- ]
596
+ variant: "display",
597
+ as: "h1",
598
+ className: "text-primary",
599
+ style: { whiteSpace: "nowrap" },
600
+ children: r
601
+ }
602
+ ),
603
+ /* @__PURE__ */ a(
604
+ P,
605
+ {
606
+ variant: "heading2",
607
+ as: "p",
608
+ className: "text-secondary",
609
+ style: { whiteSpace: "nowrap" },
610
+ children: t
611
+ }
612
+ ),
613
+ /* @__PURE__ */ a(
614
+ V,
615
+ {
616
+ variant: "primary",
617
+ onClick: () => {
618
+ typeof window < "u" && window.history.back();
619
+ },
620
+ children: "Back"
371
621
  }
372
622
  )
373
- }
374
- )
375
- ] });
623
+ ] })
624
+ }
625
+ ) }) });
376
626
  }
377
- const re = /* @__PURE__ */ d.forwardRef(
378
- function({ breadcrumb: a, title: s, status: t, actions: n, level: c = 1, className: i, ...l }, h) {
379
- const g = `h${c}`;
380
- return /* @__PURE__ */ e(
627
+ const at = /* @__PURE__ */ ye.forwardRef(function({ children: t, animation: i = "fade-up", className: n, style: e, as: s = "div" }, u) {
628
+ return /* @__PURE__ */ a(
629
+ s,
630
+ {
631
+ ref: u,
632
+ className: ["hds-reveal", n].filter(Boolean).join(" "),
633
+ "data-reveal": i,
634
+ "data-hds-component": "Reveal",
635
+ "data-hds-metrics": `animation:${i}`,
636
+ style: e,
637
+ children: t
638
+ }
639
+ );
640
+ }), nt = /* @__PURE__ */ y.forwardRef(
641
+ function({ breadcrumb: t, title: i, status: n, actions: e, level: s = 1, className: u, ...d }, p) {
642
+ const o = `h${s}`;
643
+ return /* @__PURE__ */ a(
381
644
  "header",
382
645
  {
383
- ref: h,
646
+ ref: p,
384
647
  "data-hds-component": "PageHeader",
385
- className: M("w-full", i),
386
- ...l,
387
- children: /* @__PURE__ */ o(I, { gap: "tight", children: [
388
- a ? /* @__PURE__ */ e("div", { "data-slot": "breadcrumb", children: a }) : null,
389
- /* @__PURE__ */ o(u, { gap: "normal", align: "start", justify: "space-between", children: [
390
- /* @__PURE__ */ o(u, { gap: "tight", align: "center", children: [
391
- /* @__PURE__ */ e(
392
- g,
648
+ className: b("w-full", u),
649
+ ...d,
650
+ children: /* @__PURE__ */ l(h, { gap: "tight", children: [
651
+ t ? /* @__PURE__ */ a("div", { "data-slot": "breadcrumb", children: t }) : null,
652
+ /* @__PURE__ */ l(h, { direction: "row", wrap: "wrap", gap: "normal", align: "start", justify: "space-between", children: [
653
+ /* @__PURE__ */ l(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "start", children: [
654
+ /* @__PURE__ */ a(
655
+ o,
393
656
  {
394
657
  style: {
395
- ...v.typeStyles.heading2,
658
+ ...m.typeStyles.heading2,
396
659
  margin: 0,
397
660
  color: "var(--semantic-color-content-primary)"
398
661
  },
399
- children: s
662
+ children: i
400
663
  }
401
664
  ),
402
- t ? /* @__PURE__ */ e("div", { "data-slot": "status", children: t }) : null
665
+ n ? /* @__PURE__ */ a("div", { "data-slot": "status", children: n }) : null
403
666
  ] }),
404
- n ? /* @__PURE__ */ e("div", { "data-slot": "actions", className: "ml-auto", children: /* @__PURE__ */ e(u, { gap: "tight", align: "center", justify: "end", children: n }) }) : null
667
+ e ? /* @__PURE__ */ a("div", { "data-slot": "actions", className: "ml-auto", children: /* @__PURE__ */ a(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "end", children: e }) }) : null
405
668
  ] })
406
669
  ] })
407
670
  }
408
671
  );
409
672
  }
410
- ), U = 4, X = "calc(var(--primitive-size-96) + var(--primitive-size-24))", Y = " ", ie = /* @__PURE__ */ d.forwardRef(
411
- function({ label: a, value: s, sub: t, tone: n = "neutral", style: c, ...i }, l) {
412
- return /* @__PURE__ */ e(
413
- _,
673
+ ), Be = 4, Ve = "var(--semantic-size-tile)", Me = " ", rt = /* @__PURE__ */ y.forwardRef(
674
+ function({ label: t, value: i, sub: n, tone: e = "neutral", style: s, ...u }, d) {
675
+ return /* @__PURE__ */ a(
676
+ L,
414
677
  {
415
- ref: l,
678
+ ref: d,
416
679
  padding: "item",
417
680
  "data-hds-component": "MetricTile",
418
- "data-tone": n,
419
- style: { minHeight: X, ...c },
420
- ...i,
421
- children: /* @__PURE__ */ e(
422
- V.Metric,
681
+ "data-tone": e,
682
+ style: { minHeight: Ve, ...s },
683
+ ...u,
684
+ children: /* @__PURE__ */ a(
685
+ re.Metric,
423
686
  {
424
- label: a,
425
- value: s,
426
- sub: t ?? Y,
427
- tone: n,
687
+ label: t,
688
+ value: i,
689
+ sub: n ?? Me,
690
+ tone: e,
428
691
  className: "px-0"
429
692
  }
430
693
  )
@@ -432,175 +695,179 @@ const re = /* @__PURE__ */ d.forwardRef(
432
695
  );
433
696
  }
434
697
  );
435
- function $(r) {
436
- return d.Children.toArray(r).reduce((a, s) => d.isValidElement(s) ? s.type === d.Fragment ? a + $(s.props.children) : a + 1 : a, 0);
698
+ function se(r) {
699
+ return y.Children.toArray(r).reduce((t, i) => y.isValidElement(i) ? i.type === y.Fragment ? t + se(i.props.children) : t + 1 : t, 0);
437
700
  }
438
- const se = /* @__PURE__ */ d.forwardRef(
439
- function({ children: a, ...s }, t) {
440
- const n = Math.min(Math.max($(a), 1), U);
441
- return /* @__PURE__ */ e("div", { ref: t, "data-hds-component": "MetricTiles", ...s, children: /* @__PURE__ */ e(E, { columns: n, gap: "tight", children: a }) });
701
+ const it = /* @__PURE__ */ y.forwardRef(
702
+ function({ children: t, ...i }, n) {
703
+ const e = Math.min(Math.max(se(t), 1), Be);
704
+ return /* @__PURE__ */ a("div", { ref: n, "data-hds-component": "MetricTiles", ...i, children: /* @__PURE__ */ a(ae, { columns: e, gap: "tight", children: t }) });
442
705
  }
443
- ), ne = /* @__PURE__ */ d.forwardRef(
444
- function({ primary: a, secondary: s, destructive: t, sticky: n = !1, className: c, style: i, ...l }, h) {
445
- return /* @__PURE__ */ e(
706
+ ), st = /* @__PURE__ */ y.forwardRef(
707
+ function({ primary: t, secondary: i, destructive: n, sticky: e = !1, className: s, style: u, ...d }, p) {
708
+ return /* @__PURE__ */ a(
446
709
  "div",
447
710
  {
448
- ref: h,
711
+ ref: p,
449
712
  "data-hds-component": "FormActions",
450
- "data-sticky": n ? "true" : void 0,
451
- className: M(n && "border-t border-border bg-background py-3", c),
452
- style: n ? { position: "sticky", bottom: 0, ...i } : i,
453
- ...l,
454
- children: /* @__PURE__ */ o(u, { gap: "tight", align: "center", justify: t ? "space-between" : "end", children: [
455
- t ? /* @__PURE__ */ e("div", { "data-slot": "destructive", children: t }) : null,
456
- /* @__PURE__ */ e("div", { "data-slot": "group", className: "ml-auto", children: /* @__PURE__ */ o(u, { gap: "tight", align: "center", justify: "end", children: [
457
- s,
458
- a
459
- ] }) })
460
- ] })
713
+ "data-sticky": e ? "true" : void 0,
714
+ className: b(e && "border-t border-border bg-background py-3", s),
715
+ style: e ? { position: "sticky", bottom: 0, ...u } : u,
716
+ ...d,
717
+ children: /* @__PURE__ */ l(
718
+ h,
719
+ {
720
+ direction: "row",
721
+ wrap: "wrap",
722
+ gap: "tight",
723
+ align: "center",
724
+ justify: n ? "space-between" : "end",
725
+ children: [
726
+ n ? /* @__PURE__ */ a("div", { "data-slot": "destructive", children: n }) : null,
727
+ /* @__PURE__ */ a("div", { "data-slot": "group", className: "ml-auto", children: /* @__PURE__ */ l(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "end", children: [
728
+ i,
729
+ t
730
+ ] }) })
731
+ ]
732
+ }
733
+ )
461
734
  }
462
735
  );
463
736
  }
464
- ), oe = /* @__PURE__ */ d.forwardRef(function({
465
- title: a,
466
- description: s,
467
- actionLabel: t,
468
- confirmLabel: n,
469
- confirmBody: c,
470
- onConfirm: i,
471
- cancelLabel: l = "Cancel",
472
- level: h = 2,
473
- ...g
474
- }, y) {
475
- const m = d.useId();
476
- return /* @__PURE__ */ e(
737
+ ), ot = /* @__PURE__ */ y.forwardRef(function({
738
+ title: t,
739
+ description: i,
740
+ actionLabel: n,
741
+ confirmLabel: e,
742
+ confirmBody: s,
743
+ onConfirm: u,
744
+ cancelLabel: d = "Cancel",
745
+ level: p = 2,
746
+ ...o
747
+ }, g) {
748
+ const f = y.useId();
749
+ return /* @__PURE__ */ a(
477
750
  "section",
478
751
  {
479
- ref: y,
752
+ ref: g,
480
753
  "data-hds-component": "DestructiveSection",
481
- "aria-labelledby": m,
482
- ...g,
483
- children: /* @__PURE__ */ e(V, { tone: "danger", children: /* @__PURE__ */ o(u, { gap: "normal", align: "center", justify: "space-between", children: [
484
- /* @__PURE__ */ o("div", { "data-slot": "copy", className: "min-w-0 grow basis-64", children: [
485
- /* @__PURE__ */ e(S, { id: m, as: `h${h}`, variant: "heading3", children: a }),
486
- /* @__PURE__ */ e(S, { as: "p", variant: "caption", className: "text-muted-foreground", children: s })
754
+ "aria-labelledby": f,
755
+ ...o,
756
+ children: /* @__PURE__ */ a(re, { tone: "danger", children: /* @__PURE__ */ l(h, { direction: "row", wrap: "wrap", gap: "normal", align: "center", justify: "space-between", children: [
757
+ /* @__PURE__ */ l("div", { "data-slot": "copy", className: "min-w-0 grow basis-64", children: [
758
+ /* @__PURE__ */ a(P, { id: f, as: `h${p}`, variant: "heading3", children: t }),
759
+ /* @__PURE__ */ a(P, { as: "p", variant: "caption", className: "text-muted-foreground", children: i })
487
760
  ] }),
488
- /* @__PURE__ */ e("div", { "data-slot": "action", className: "shrink-0", children: /* @__PURE__ */ o(p, { children: [
489
- /* @__PURE__ */ e(p.Trigger, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "secondary", tone: "danger", children: t ?? n }) }),
490
- /* @__PURE__ */ o(p.Content, { children: [
491
- /* @__PURE__ */ o(p.Header, { children: [
492
- /* @__PURE__ */ e(p.Title, { children: a }),
493
- /* @__PURE__ */ e(p.Description, { children: c })
761
+ /* @__PURE__ */ a("div", { "data-slot": "action", className: "shrink-0", children: /* @__PURE__ */ l(S, { children: [
762
+ /* @__PURE__ */ a(S.Trigger, { asChild: !0, children: /* @__PURE__ */ a(V, { variant: "secondary", tone: "danger", children: n ?? e }) }),
763
+ /* @__PURE__ */ l(S.Content, { children: [
764
+ /* @__PURE__ */ l(S.Header, { children: [
765
+ /* @__PURE__ */ a(S.Title, { children: t }),
766
+ /* @__PURE__ */ a(S.Description, { children: s })
494
767
  ] }),
495
- /* @__PURE__ */ o(p.Footer, { children: [
496
- /* @__PURE__ */ e(p.Cancel, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "secondary", children: l }) }),
497
- /* @__PURE__ */ e(p.Action, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "primary", tone: "danger", onClick: i, children: n }) })
768
+ /* @__PURE__ */ l(S.Footer, { children: [
769
+ /* @__PURE__ */ a(S.Cancel, { asChild: !0, children: /* @__PURE__ */ a(V, { variant: "secondary", children: d }) }),
770
+ /* @__PURE__ */ a(S.Action, { asChild: !0, children: /* @__PURE__ */ a(V, { variant: "primary", tone: "danger", onClick: u, children: e }) })
498
771
  ] })
499
772
  ] })
500
773
  ] }) })
501
774
  ] }) })
502
775
  }
503
776
  );
504
- }), q = "8rem", K = "6rem", le = /* @__PURE__ */ d.forwardRef(function({
505
- title: a,
506
- toolbar: s,
507
- columns: t,
508
- rows: n,
509
- actionsLabel: c = "Actions",
510
- emptyTitle: i = "Nothing here yet",
511
- emptyDescription: l,
512
- level: h = 2,
513
- ...g
514
- }, y) {
515
- const m = d.useId(), b = n.some((f) => f.actions != null), F = b ? [...t, { key: "__actions", label: c, align: "right", width: "max-content" }] : t, j = n.map((f) => ({
516
- key: f.key,
777
+ }), Le = "8rem", Ye = "6rem", ct = /* @__PURE__ */ y.forwardRef(function({
778
+ title: t,
779
+ toolbar: i,
780
+ columns: n,
781
+ rows: e,
782
+ actionsLabel: s = "Actions",
783
+ emptyTitle: u = "Nothing here yet",
784
+ emptyDescription: d,
785
+ level: p = 2,
786
+ ...o
787
+ }, g) {
788
+ const f = y.useId(), w = e.some((v) => v.actions != null), k = w ? [...n, { key: "__actions", label: s, align: "right", width: "max-content" }] : n, T = e.map((v) => ({
789
+ key: v.key,
517
790
  cells: [
518
- ...f.cells.map((H, L) => {
519
- var T;
791
+ ...v.cells.map((A, _) => {
792
+ var C;
520
793
  return {
521
794
  slot: "custom",
522
- content: H,
523
- align: (T = t[L]) == null ? void 0 : T.align
795
+ content: A,
796
+ align: (C = n[_]) == null ? void 0 : C.align
524
797
  };
525
798
  }),
526
- ...b ? [
799
+ ...w ? [
527
800
  {
528
801
  slot: "action",
529
802
  align: "right",
530
- content: /* @__PURE__ */ e(u, { gap: "tight", align: "center", justify: "end", children: f.actions })
803
+ content: /* @__PURE__ */ a(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "end", children: v.actions })
531
804
  }
532
805
  ] : []
533
806
  ]
534
- })), D = `calc(${t.length} * ${q}${b ? ` + ${K}` : ""})`;
535
- return /* @__PURE__ */ e("section", { ref: y, "data-hds-component": "DataTableSection", "aria-labelledby": m, ...g, children: /* @__PURE__ */ o(I, { gap: "tight", children: [
536
- /* @__PURE__ */ o(u, { gap: "normal", align: "center", justify: "space-between", children: [
537
- /* @__PURE__ */ e(S, { id: m, as: `h${h}`, variant: "heading3", children: a }),
538
- s ? /* @__PURE__ */ e("div", { "data-slot": "toolbar", className: "ml-auto", children: /* @__PURE__ */ e(u, { gap: "tight", align: "center", justify: "end", children: s }) }) : null
807
+ })), E = `calc(${n.length} * ${Le}${w ? ` + ${Ye}` : ""})`;
808
+ return /* @__PURE__ */ a("section", { ref: g, "data-hds-component": "DataTableSection", "aria-labelledby": f, ...o, children: /* @__PURE__ */ l(h, { gap: "tight", children: [
809
+ /* @__PURE__ */ l(h, { direction: "row", wrap: "wrap", gap: "normal", align: "center", justify: "space-between", children: [
810
+ /* @__PURE__ */ a(P, { id: f, as: `h${p}`, variant: "heading3", children: t }),
811
+ i ? /* @__PURE__ */ a("div", { "data-slot": "toolbar", className: "ml-auto", children: /* @__PURE__ */ a(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "end", children: i }) }) : null
539
812
  ] }),
540
- n.length === 0 ? /* @__PURE__ */ e(P, { title: i, description: l }) : /* @__PURE__ */ e(
541
- z,
813
+ e.length === 0 ? /* @__PURE__ */ a(ve, { title: u, description: d }) : /* @__PURE__ */ a(
814
+ ge,
542
815
  {
543
- columns: F,
544
- rows: j,
545
- minWidth: D,
546
- labelledBy: m
816
+ columns: k,
817
+ rows: T,
818
+ minWidth: E,
819
+ labelledBy: f
547
820
  }
548
821
  )
549
822
  ] }) });
550
- });
823
+ }), lt = /* @__PURE__ */ y.forwardRef(
824
+ function({ tone: t = "neutral", title: i, notes: n, trailing: e, className: s, ...u }, d) {
825
+ return /* @__PURE__ */ l(
826
+ "div",
827
+ {
828
+ ref: d,
829
+ "data-hds-component": "StatusTile",
830
+ "data-hds-metrics": `tone:${t}`,
831
+ className: b(
832
+ "flex h-full items-start gap-3 rounded-lg bg-[var(--semantic-color-surface-raised)] p-4",
833
+ s
834
+ ),
835
+ ...u,
836
+ children: [
837
+ /* @__PURE__ */ l("div", { className: "min-w-0 flex-1", children: [
838
+ /* @__PURE__ */ a("p", { className: "m-0 text-sm text-foreground", children: i }),
839
+ n == null ? void 0 : n.map((p, o) => /* @__PURE__ */ a("p", { className: "m-0 mt-1 text-xs text-muted-foreground", children: p }, o))
840
+ ] }),
841
+ e && /* @__PURE__ */ a("div", { className: "shrink-0", children: e })
842
+ ]
843
+ }
844
+ );
845
+ }
846
+ );
551
847
  export {
552
- he as ActivityFeed,
553
- pe as AppShell,
554
- ue as AssetImg,
555
- me as Calendar,
556
- ge as Carousel,
557
- fe as CodeBlock,
558
- ve as CommandPalette,
559
- le as DataTableSection,
560
- oe as DestructiveSection,
561
- ye as DocLinkCard,
562
- be as ErrorPattern,
563
- we as FileInput,
564
- aa as Form,
565
- ne as FormActions,
566
- ta as FormField,
567
- ra as FormFieldShell,
568
- xe as Lightbox,
569
- ie as MetricTile,
570
- se as MetricTiles,
571
- ke as NavItem,
572
- Se as OverflowList,
573
- Ce as Page,
574
- re as PageHeader,
575
- Te as Reveal,
576
- Ne as SideNav,
577
- te as StackedCardRail,
578
- Ie as Stepper,
579
- Ve as Toolbar,
580
- Ae as TopNav,
581
- Me as TreeList,
582
- Re as activityAvatarVariants,
583
- $e as activityToneVariants,
584
- Fe as appShellVariants,
585
- je as blockCodeTextVariants,
586
- De as blockContainerVariants,
587
- He as blockHeaderVariants,
588
- Le as carouselControlVariants,
589
- _e as chevronVariants,
590
- Ee as cmdkDescriptionVariants,
591
- Pe as cmdkKindBadgeVariants,
592
- ze as cmdkRowVariants,
593
- Be as collapsibleToggleVariants,
594
- We as copyButtonVariants,
595
- Oe as defaultActivityEvents,
596
- Ge as docLinkCardVariants,
597
- Ue as fileInputVariants,
598
- Xe as inlineCodeTextVariants,
599
- Ye as inlineWrapperVariants,
600
- qe as navIndicatorVariants,
601
- Ke as navItemVariants,
602
- Je as prePanelVariants,
603
- Qe as sideNavVariants,
604
- Ze as stepMarkerVariants,
605
- ia as useFieldWiring
848
+ Qe as AssetImg,
849
+ et as CodeBlock,
850
+ ct as DataTableSection,
851
+ ot as DestructiveSection,
852
+ tt as ErrorPattern,
853
+ ut as Form,
854
+ st as FormActions,
855
+ mt as FormField,
856
+ ht as FormFieldShell,
857
+ rt as MetricTile,
858
+ it as MetricTiles,
859
+ qe as Page,
860
+ nt as PageHeader,
861
+ at as Reveal,
862
+ lt as StatusTile,
863
+ Q as blockCodeTextVariants,
864
+ U as blockContainerVariants,
865
+ Ce as blockHeaderVariants,
866
+ Ee as chevronVariants,
867
+ Ie as collapsibleToggleVariants,
868
+ q as copyButtonVariants,
869
+ Ae as inlineCodeTextVariants,
870
+ Ne as inlineWrapperVariants,
871
+ ee as prePanelVariants,
872
+ ft as useFieldWiring
606
873
  };