@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.
- package/AGENTS.md +125 -0
- package/CHANGELOG.md +969 -0
- package/CONSUMING.md +27 -11
- package/DESIGN.md +28 -17
- package/MIGRATIONS.md +603 -0
- package/NOTICE.md +1 -1
- package/README.md +39 -5
- package/UPGRADING.md +222 -0
- package/codemods/hds-prefix.mjs +28 -13
- package/codemods/jsx-fold.mjs +28 -13
- package/codemods/lib/atomic-write.mjs +28 -0
- package/codemods/lib/installed-version.mjs +354 -0
- package/codemods/lib/project.mjs +395 -0
- package/codemods/lib/record.mjs +110 -0
- package/codemods/lib/scan.mjs +323 -0
- package/codemods/lib/semver.mjs +57 -0
- package/codemods/not-found-pattern.mjs +3 -3
- package/codemods/patterns-subpath.mjs +28 -12
- package/codemods/registry.mjs +67 -0
- package/codemods/tile-grid.mjs +3 -3
- package/codemods/upgrade.mjs +909 -0
- package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
- package/dist/chunks/form-By82qZcC.js +66 -0
- package/dist/fonts/geist-mono-400.woff2 +0 -0
- package/dist/fonts/satoshi-400.woff2 +0 -0
- package/dist/fonts/satoshi-500.woff2 +0 -0
- package/dist/fonts/satoshi-700.woff2 +0 -0
- package/dist/fonts.css +53 -0
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +876 -877
- package/dist/manifest.js +3 -3
- package/dist/patterns.js +189 -170
- package/dist/styles.css +2 -2
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +136 -57
- package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
- package/dist/types/src/app/components/alert.d.ts +1 -1
- package/dist/types/src/app/components/asset-img.d.ts +1 -0
- package/dist/types/src/app/components/avatar-group.d.ts +1 -0
- package/dist/types/src/app/components/avatar.d.ts +1 -1
- package/dist/types/src/app/components/badge.d.ts +2 -2
- package/dist/types/src/app/components/blockquote.d.ts +1 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
- package/dist/types/src/app/components/button.d.ts +3 -1
- package/dist/types/src/app/components/callout.d.ts +1 -1
- package/dist/types/src/app/components/card.d.ts +4 -3
- package/dist/types/src/app/components/checkbox.d.ts +1 -1
- package/dist/types/src/app/components/code-block.d.ts +1 -1
- package/dist/types/src/app/components/combobox.d.ts +1 -1
- package/dist/types/src/app/components/data-table-section.d.ts +1 -0
- package/dist/types/src/app/components/destructive-section.d.ts +1 -0
- package/dist/types/src/app/components/dialog.d.ts +2 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -1
- package/dist/types/src/app/components/divider.d.ts +1 -1
- package/dist/types/src/app/components/empty-state.d.ts +1 -1
- package/dist/types/src/app/components/error-pattern.d.ts +6 -1
- package/dist/types/src/app/components/field.d.ts +1 -1
- package/dist/types/src/app/components/form-actions.d.ts +1 -0
- package/dist/types/src/app/components/form-control.d.ts +10 -0
- package/dist/types/src/app/components/form.d.ts +1 -1
- package/dist/types/src/app/components/grid.d.ts +5 -0
- package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
- package/dist/types/src/app/components/icon.d.ts +1 -0
- package/dist/types/src/app/components/inline-link.d.ts +1 -1
- package/dist/types/src/app/components/input.d.ts +1 -1
- package/dist/types/src/app/components/kbd.d.ts +1 -0
- package/dist/types/src/app/components/menu.d.ts +1 -1
- package/dist/types/src/app/components/metadata-list.d.ts +1 -0
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
- package/dist/types/src/app/components/pagination.d.ts +1 -1
- package/dist/types/src/app/components/popover.d.ts +1 -1
- package/dist/types/src/app/components/progress.d.ts +2 -2
- package/dist/types/src/app/components/radio.d.ts +1 -1
- package/dist/types/src/app/components/select.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +2 -2
- package/dist/types/src/app/components/slider.d.ts +1 -1
- package/dist/types/src/app/components/spinner.d.ts +1 -1
- package/dist/types/src/app/components/stat.d.ts +5 -4
- package/dist/types/src/app/components/status-list-item.d.ts +1 -1
- package/dist/types/src/app/components/status-tile.d.ts +4 -3
- package/dist/types/src/app/components/table.d.ts +6 -1
- package/dist/types/src/app/components/tabs.d.ts +1 -1
- package/dist/types/src/app/components/tag.d.ts +1 -1
- package/dist/types/src/app/components/text.d.ts +53 -6
- package/dist/types/src/app/components/textarea.d.ts +1 -1
- package/dist/types/src/app/components/timestamp.d.ts +1 -0
- package/dist/types/src/app/components/toast.d.ts +1 -1
- package/dist/types/src/app/components/toggle.d.ts +1 -1
- package/dist/types/src/app/data/manifest-types.d.ts +4 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +37 -28
- package/dist/types/src/app/design-system/generated-token-values.d.ts +3 -0
- package/dist/types/src/app/design-system/tokens.d.ts +117 -15
- package/dist/types/src/index.d.ts +122 -72
- package/dist/variables.css +41 -33
- package/docs/CONSUMING.md +63 -39
- package/hirobius.tokens.json +163 -112
- package/llms.txt +158 -50
- package/mcp/catalog.mjs +369 -0
- package/mcp/core-set.mjs +66 -0
- package/mcp/guide.mjs +272 -0
- package/mcp/hds-mcp.mjs +49 -0
- package/mcp/server.mjs +94 -0
- package/package.json +53 -11
- package/public/hds-manifest.json +430 -336
- package/public/llms/components.txt +4 -3
- package/public/llms/layout.txt +1 -1
- package/public/llms-full.txt +190 -70
- package/public/llms.txt +158 -50
- package/scripts/eslint-plugin-hds/index.d.mts +29 -0
- package/scripts/eslint-plugin-hds/index.mjs +55 -0
- package/scripts/eslint-plugin-hds/package.json +30 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
- package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
- package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
- package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
- package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
- package/src/app/data/component-api.json +154 -93
- package/upgrade/index.json +208 -0
- package/upgrade/releases/0.17.0.json +962 -0
- package/upgrade/releases/0.18.0.json +8 -0
- package/upgrade/releases/0.19.0.json +233 -0
- package/upgrade/releases/0.19.1.json +8 -0
- package/upgrade/releases/0.20.0.json +5108 -0
- package/upgrade/releases/0.21.0.json +538 -0
- package/upgrade/releases/0.22.0.json +94 -0
- package/upgrade/schema.json +989 -0
- package/dist/chunks/empty-state-BBqhCx0S.js +0 -1217
- package/dist/chunks/form-COP3vK9_.js +0 -66
- package/dist/types/src/app/components/status-dot.d.ts +0 -39
package/dist/patterns.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { F as ut, b as mt, a as ht, u as ft } from "./chunks/form-
|
|
2
|
+
import { F as ut, b as mt, a as ht, u as ft } from "./chunks/form-By82qZcC.js";
|
|
3
3
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
4
4
|
import m from "./tokens.js";
|
|
5
|
-
import { C as
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import { AnimatePresence as Z, motion as
|
|
5
|
+
import { C as fe, h as ve, S as h, G as ne, u as re, a as M, I as H, T as V, B as P, b as ie, A as S, E as ge, c as ye } from "./chunks/empty-state-DNoThgfV.js";
|
|
6
|
+
import * as f from "react";
|
|
7
|
+
import be, { useState as I, useId as xe, useRef as Y } from "react";
|
|
8
|
+
import { AnimatePresence as Z, motion as se } from "motion/react";
|
|
9
9
|
import { cva as x } from "class-variance-authority";
|
|
10
|
-
import { Check as O, Copy as X, ChevronDown as
|
|
10
|
+
import { Check as O, Copy as X, ChevronDown as we } from "lucide-react";
|
|
11
11
|
import { cn as b } from "./cn.js";
|
|
12
|
-
const
|
|
12
|
+
const ke = {
|
|
13
13
|
default: { top: m.space.px48, bottom: m.space.px64 },
|
|
14
14
|
compact: { top: m.space.px24, bottom: m.space.px32 },
|
|
15
15
|
none: { top: "0", bottom: "0" }
|
|
@@ -21,8 +21,8 @@ function qe({
|
|
|
21
21
|
style: n,
|
|
22
22
|
className: e
|
|
23
23
|
}) {
|
|
24
|
-
const s =
|
|
25
|
-
return /* @__PURE__ */ a(
|
|
24
|
+
const s = ke[i];
|
|
25
|
+
return /* @__PURE__ */ a(fe, { maxWidth: t, className: e, children: /* @__PURE__ */ a(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
28
|
"data-hds-component": "Page",
|
|
@@ -32,7 +32,7 @@ function qe({
|
|
|
32
32
|
}
|
|
33
33
|
) });
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const Se = {
|
|
36
36
|
background: "var(--semantic-color-surface-accent)",
|
|
37
37
|
border: "none",
|
|
38
38
|
borderRadius: m.borderRadius.full,
|
|
@@ -43,26 +43,26 @@ const ke = {
|
|
|
43
43
|
pointerEvents: "none",
|
|
44
44
|
paddingBlock: m.space.px6,
|
|
45
45
|
paddingInline: m.space.px16
|
|
46
|
-
},
|
|
46
|
+
}, Ne = {
|
|
47
47
|
...m.typeStyles.ui,
|
|
48
48
|
userSelect: "none",
|
|
49
49
|
whiteSpace: "nowrap"
|
|
50
50
|
};
|
|
51
51
|
function G({ label: r }) {
|
|
52
|
-
const t =
|
|
52
|
+
const t = re("productive");
|
|
53
53
|
return /* @__PURE__ */ a(
|
|
54
|
-
|
|
54
|
+
se.div,
|
|
55
55
|
{
|
|
56
56
|
initial: { opacity: 0, scale: 0.82 },
|
|
57
57
|
animate: { opacity: 1, scale: 1 },
|
|
58
58
|
exit: { opacity: 0, scale: 0.82 },
|
|
59
59
|
transition: { duration: t.duration, ease: t.easing },
|
|
60
|
-
children: /* @__PURE__ */ a(
|
|
60
|
+
children: /* @__PURE__ */ a(M, { as: "span", padding: "none", style: Se, children: /* @__PURE__ */ a(h, { as: "span", direction: "row", gap: "xs", align: "center", style: Ne, children: /* @__PURE__ */ a("span", { children: r }) }) })
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
function K({ visible: r, mode: t, label: i = "Expand", x: n = 0, y: e = 0 }) {
|
|
65
|
-
return t === "cursor" ? /* @__PURE__ */ a(
|
|
65
|
+
return t === "cursor" ? /* @__PURE__ */ a(ve, { children: /* @__PURE__ */ a(Z, { children: r && /* @__PURE__ */ a(
|
|
66
66
|
h,
|
|
67
67
|
{
|
|
68
68
|
gap: "xs",
|
|
@@ -77,7 +77,7 @@ function K({ visible: r, mode: t, label: i = "Expand", x: n = 0, y: e = 0 }) {
|
|
|
77
77
|
children: /* @__PURE__ */ a(G, { label: i })
|
|
78
78
|
}
|
|
79
79
|
) }) }) : /* @__PURE__ */ a(Z, { children: r && /* @__PURE__ */ a(
|
|
80
|
-
|
|
80
|
+
ne,
|
|
81
81
|
{
|
|
82
82
|
columns: 1,
|
|
83
83
|
gap: "tight",
|
|
@@ -93,7 +93,7 @@ function K({ visible: r, mode: t, label: i = "Expand", x: n = 0, y: e = 0 }) {
|
|
|
93
93
|
}
|
|
94
94
|
) });
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const z = 280;
|
|
97
97
|
function Qe({
|
|
98
98
|
src: r,
|
|
99
99
|
alt: t,
|
|
@@ -105,18 +105,18 @@ function Qe({
|
|
|
105
105
|
naturalWidth: d,
|
|
106
106
|
naturalHeight: p,
|
|
107
107
|
onClick: o,
|
|
108
|
-
onMouseDown:
|
|
109
|
-
onMouseMove:
|
|
108
|
+
onMouseDown: y,
|
|
109
|
+
onMouseMove: v,
|
|
110
110
|
onMouseUp: w,
|
|
111
111
|
onMouseLeave: k,
|
|
112
112
|
expandable: T = !0,
|
|
113
113
|
expandLabel: E,
|
|
114
|
-
context:
|
|
114
|
+
context: g = "default",
|
|
115
115
|
loading: A = "lazy"
|
|
116
116
|
}) {
|
|
117
|
-
const [_, C] = I(!1), j = n && typeof n == "object" ? n : {}, [F, D] = I(!1), [
|
|
117
|
+
const [_, C] = I(!1), j = n && typeof n == "object" ? n : {}, [F, D] = I(!1), [ce, L] = I(!1), [le, de] = I(0), [pe, ue] = I(0), me = g === "default" && T && !!o;
|
|
118
118
|
if (!_)
|
|
119
|
-
return
|
|
119
|
+
return me ? /* @__PURE__ */ l(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
122
|
className: e ? `hds-focus ${e}` : "hds-focus",
|
|
@@ -136,15 +136,15 @@ function Qe({
|
|
|
136
136
|
},
|
|
137
137
|
onMouseEnter: () => D(!0),
|
|
138
138
|
onMouseMove: (c) => {
|
|
139
|
-
|
|
139
|
+
de(c.clientX), ue(c.clientY), v == null || v(c);
|
|
140
140
|
},
|
|
141
141
|
onMouseLeave: (c) => {
|
|
142
142
|
D(!1), k == null || k(c);
|
|
143
143
|
},
|
|
144
|
-
onMouseDown:
|
|
144
|
+
onMouseDown: y,
|
|
145
145
|
onMouseUp: w,
|
|
146
|
-
onFocus: () =>
|
|
147
|
-
onBlur: () =>
|
|
146
|
+
onFocus: () => L(!0),
|
|
147
|
+
onBlur: () => L(!1),
|
|
148
148
|
children: [
|
|
149
149
|
/* @__PURE__ */ a(
|
|
150
150
|
"img",
|
|
@@ -157,14 +157,14 @@ function Qe({
|
|
|
157
157
|
onError: () => C(!0)
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
|
-
/* @__PURE__ */ a(K, { mode: "centered", visible:
|
|
160
|
+
/* @__PURE__ */ a(K, { mode: "centered", visible: ce && !F, label: E }),
|
|
161
161
|
/* @__PURE__ */ a(
|
|
162
162
|
K,
|
|
163
163
|
{
|
|
164
164
|
mode: "cursor",
|
|
165
165
|
visible: F,
|
|
166
|
-
x:
|
|
167
|
-
y:
|
|
166
|
+
x: le,
|
|
167
|
+
y: pe,
|
|
168
168
|
label: E
|
|
169
169
|
}
|
|
170
170
|
)
|
|
@@ -185,15 +185,15 @@ function Qe({
|
|
|
185
185
|
onKeyDown: o ? (c) => {
|
|
186
186
|
c.key === "Enter" && o(c);
|
|
187
187
|
} : void 0,
|
|
188
|
-
onMouseDown:
|
|
189
|
-
onMouseMove:
|
|
188
|
+
onMouseDown: y,
|
|
189
|
+
onMouseMove: v,
|
|
190
190
|
onMouseUp: w,
|
|
191
191
|
onMouseLeave: k,
|
|
192
192
|
onError: () => C(!0)
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
);
|
|
196
|
-
if (
|
|
196
|
+
if (g === "detail")
|
|
197
197
|
return /* @__PURE__ */ a(
|
|
198
198
|
"div",
|
|
199
199
|
{
|
|
@@ -209,33 +209,42 @@ function Qe({
|
|
|
209
209
|
"aria-label": t || void 0
|
|
210
210
|
}
|
|
211
211
|
);
|
|
212
|
-
const N = d && p ? d / p : 4 / 3,
|
|
213
|
-
let
|
|
214
|
-
if (
|
|
215
|
-
|
|
212
|
+
const N = d && p ? d / p : 4 / 3, he = N < 1;
|
|
213
|
+
let W = {};
|
|
214
|
+
if (g === "lightbox")
|
|
215
|
+
W = n.width === "100%" ? { width: "100%", aspectRatio: `${N}`, display: "block" } : {
|
|
216
216
|
height: n.maxHeight ?? "70vh",
|
|
217
217
|
width: "auto",
|
|
218
|
+
maxWidth: "100%",
|
|
218
219
|
aspectRatio: `${N}`,
|
|
219
220
|
display: "block",
|
|
220
221
|
flexShrink: 0
|
|
221
222
|
};
|
|
222
223
|
else {
|
|
223
|
-
let c,
|
|
224
|
+
let c, R;
|
|
224
225
|
if (n.maxHeight && !n.width) {
|
|
225
|
-
const
|
|
226
|
-
|
|
226
|
+
const $ = parseInt(n.maxHeight) || z;
|
|
227
|
+
R = $, c = Math.round($ * N);
|
|
227
228
|
} else if (n.maxWidth && !n.height) {
|
|
228
|
-
const
|
|
229
|
-
c =
|
|
230
|
-
} else n.width === "100%" ? (c = 0,
|
|
231
|
-
|
|
229
|
+
const $ = parseInt(n.maxWidth) || z;
|
|
230
|
+
c = $, R = Math.round($ / N);
|
|
231
|
+
} else n.width === "100%" ? (c = 0, R = 0) : he ? (c = z, R = Math.round(z / N)) : (R = z, c = Math.round(z * N));
|
|
232
|
+
W = c === 0 ? { width: "100%", aspectRatio: `${N}`, display: "block" } : {
|
|
233
|
+
// Fit the container: the frame keeps its aspect ratio but never exceeds the
|
|
234
|
+
// parent (a fixed 373x280 block overflowed a 276px column, hds#522).
|
|
235
|
+
width: c,
|
|
236
|
+
maxWidth: "100%",
|
|
237
|
+
aspectRatio: `${c / R}`,
|
|
238
|
+
display: "block",
|
|
239
|
+
flexShrink: 0
|
|
240
|
+
};
|
|
232
241
|
}
|
|
233
242
|
return /* @__PURE__ */ a(
|
|
234
243
|
"div",
|
|
235
244
|
{
|
|
236
245
|
className: e,
|
|
237
246
|
style: {
|
|
238
|
-
...
|
|
247
|
+
...W,
|
|
239
248
|
backgroundColor: "var(--semantic-color-surface-overlay)",
|
|
240
249
|
display: "flex",
|
|
241
250
|
alignItems: "center",
|
|
@@ -243,7 +252,7 @@ function Qe({
|
|
|
243
252
|
flexDirection: "column",
|
|
244
253
|
gap: m.space.px4,
|
|
245
254
|
overflow: "hidden",
|
|
246
|
-
cursor: o ?
|
|
255
|
+
cursor: o ? g === "lightbox" ? "zoom-in" : "pointer" : void 0
|
|
247
256
|
},
|
|
248
257
|
role: o ? "button" : t ? "img" : void 0,
|
|
249
258
|
"aria-hidden": !o && !t ? !0 : void 0,
|
|
@@ -272,17 +281,17 @@ function Qe({
|
|
|
272
281
|
}
|
|
273
282
|
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
283
|
"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
284
|
), Ce = /* @__PURE__ */ x(
|
|
285
|
+
"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)]"
|
|
286
|
+
), Ie = /* @__PURE__ */ x(
|
|
278
287
|
"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
288
|
), J = /* @__PURE__ */ x(
|
|
280
289
|
"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
290
|
), Te = /* @__PURE__ */ x(
|
|
284
|
-
|
|
291
|
+
`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}`
|
|
285
292
|
), Ee = /* @__PURE__ */ x(
|
|
293
|
+
"border-t border-solid border-[var(--semantic-color-border-default)]"
|
|
294
|
+
), Ae = /* @__PURE__ */ x(
|
|
286
295
|
"inline-flex transition-transform duration-[var(--hds-motion-productive-duration)] ease",
|
|
287
296
|
{
|
|
288
297
|
variants: {
|
|
@@ -294,7 +303,7 @@ const B = "[font-family:var(--semantic-typography-mono-font-family)] [font-size:
|
|
|
294
303
|
defaultVariants: { expanded: !1 }
|
|
295
304
|
}
|
|
296
305
|
), q = /* @__PURE__ */ x(
|
|
297
|
-
"flex cursor-pointer items-center gap-[var(--semantic-space-subgrid-gap)]",
|
|
306
|
+
"hds-touch-target flex cursor-pointer items-center gap-[var(--semantic-space-subgrid-gap)]",
|
|
298
307
|
{
|
|
299
308
|
variants: {
|
|
300
309
|
variant: {
|
|
@@ -304,7 +313,7 @@ const B = "[font-family:var(--semantic-typography-mono-font-family)] [font-size:
|
|
|
304
313
|
},
|
|
305
314
|
defaultVariants: { variant: "block" }
|
|
306
315
|
}
|
|
307
|
-
),
|
|
316
|
+
), _e = /* @__PURE__ */ x(
|
|
308
317
|
`block min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap not-italic text-[var(--semantic-color-content-primary)] ${B}`,
|
|
309
318
|
{
|
|
310
319
|
variants: {
|
|
@@ -318,7 +327,8 @@ const B = "[font-family:var(--semantic-typography-mono-font-family)] [font-size:
|
|
|
318
327
|
), Q = /* @__PURE__ */ x(
|
|
319
328
|
`whitespace-pre text-[var(--semantic-color-content-primary)] ${B}`
|
|
320
329
|
), ee = /* @__PURE__ */ x(
|
|
321
|
-
|
|
330
|
+
// 16px inset (scale-sm), not section-stack (80px): a 2-line snippet was 188px tall (hds#522).
|
|
331
|
+
"m-0 overflow-x-auto p-[var(--semantic-space-scale-sm)] pr-[calc(var(--semantic-space-scale-sm)_+_var(--semantic-size-control-lg))]",
|
|
322
332
|
{
|
|
323
333
|
variants: {
|
|
324
334
|
panelBackground: {
|
|
@@ -339,31 +349,31 @@ function et({
|
|
|
339
349
|
defaultExpanded: u = !1,
|
|
340
350
|
className: d
|
|
341
351
|
}) {
|
|
342
|
-
const [p, o] = I(!1), [
|
|
352
|
+
const [p, o] = I(!1), [y, v] = I(u), w = xe(), k = Y(null), T = Y(null);
|
|
343
353
|
function E() {
|
|
344
354
|
var F, D;
|
|
345
|
-
const j = !
|
|
346
|
-
!j && ((F = T.current) != null && F.contains(document.activeElement)) && ((D = k.current) == null || D.focus()),
|
|
355
|
+
const j = !y;
|
|
356
|
+
!j && ((F = T.current) != null && F.contains(document.activeElement)) && ((D = k.current) == null || D.focus()), v(j);
|
|
347
357
|
}
|
|
348
|
-
function
|
|
358
|
+
function g() {
|
|
349
359
|
navigator.clipboard.writeText(r).then(() => {
|
|
350
360
|
o(!0), setTimeout(() => o(!1), 2e3);
|
|
351
361
|
});
|
|
352
362
|
}
|
|
353
363
|
if (t === "inline")
|
|
354
|
-
return /* @__PURE__ */ l("div", { className: b(
|
|
355
|
-
/* @__PURE__ */ a("code", { className:
|
|
364
|
+
return /* @__PURE__ */ l("div", { className: b(Ce(), d), children: [
|
|
365
|
+
/* @__PURE__ */ a("code", { className: _e({ truncateFromStart: i }), children: p ? "Copied" : r }),
|
|
356
366
|
/* @__PURE__ */ a(
|
|
357
367
|
"button",
|
|
358
368
|
{
|
|
359
|
-
onClick:
|
|
369
|
+
onClick: g,
|
|
360
370
|
"aria-label": p ? "Copied" : "Copy code",
|
|
361
371
|
className: b("hds-focus", q({ variant: "inline" })),
|
|
362
|
-
children: p ? /* @__PURE__ */ a(
|
|
372
|
+
children: p ? /* @__PURE__ */ a(H, { icon: O, size: "small", color: "var(--semantic-color-content-primary)" }) : /* @__PURE__ */ a(H, { icon: X, size: "small", color: "var(--semantic-color-content-primary)" })
|
|
363
373
|
}
|
|
364
374
|
)
|
|
365
375
|
] });
|
|
366
|
-
const A = e || n ? /* @__PURE__ */ a("div", { className:
|
|
376
|
+
const A = e || n ? /* @__PURE__ */ a("div", { className: Ie(), children: /* @__PURE__ */ l("div", { className: J(), children: [
|
|
367
377
|
e && /* @__PURE__ */ a(
|
|
368
378
|
"span",
|
|
369
379
|
{
|
|
@@ -384,10 +394,10 @@ function et({
|
|
|
384
394
|
] }) }) : null, _ = /* @__PURE__ */ a(
|
|
385
395
|
"button",
|
|
386
396
|
{
|
|
387
|
-
onClick:
|
|
397
|
+
onClick: g,
|
|
388
398
|
"aria-label": p ? "Copied" : "Copy code",
|
|
389
399
|
className: b("hds-focus", q({ variant: "block" })),
|
|
390
|
-
children: p ? /* @__PURE__ */ a(
|
|
400
|
+
children: p ? /* @__PURE__ */ a(H, { icon: O, size: "small", color: "var(--semantic-color-content-primary)" }) : /* @__PURE__ */ a(H, { icon: X, size: "small", color: "var(--semantic-color-content-primary)" })
|
|
391
401
|
}
|
|
392
402
|
), C = /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
393
403
|
/* @__PURE__ */ a(
|
|
@@ -409,22 +419,22 @@ function et({
|
|
|
409
419
|
ref: k,
|
|
410
420
|
type: "button",
|
|
411
421
|
onClick: E,
|
|
412
|
-
"aria-expanded":
|
|
422
|
+
"aria-expanded": y,
|
|
413
423
|
"aria-controls": w,
|
|
414
|
-
className: b("hds-focus",
|
|
424
|
+
className: b("hds-focus", Te()),
|
|
415
425
|
children: [
|
|
416
426
|
/* @__PURE__ */ l("span", { className: J(), children: [
|
|
417
|
-
/* @__PURE__ */ a("span", { children:
|
|
427
|
+
/* @__PURE__ */ a("span", { children: y ? "Hide code" : "Show code" }),
|
|
418
428
|
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
429
|
/* @__PURE__ */ a("span", { className: "text-[var(--semantic-color-content-secondary)]", children: e }),
|
|
420
430
|
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
431
|
/* @__PURE__ */ a("span", { className: "text-[var(--semantic-color-content-secondary)]", children: n.toLowerCase() })
|
|
422
432
|
] }),
|
|
423
|
-
/* @__PURE__ */ a("span", { className:
|
|
433
|
+
/* @__PURE__ */ a("span", { className: Ae({ expanded: y }), children: /* @__PURE__ */ a(H, { icon: we, size: "small", color: "var(--semantic-color-content-secondary)" }) })
|
|
424
434
|
]
|
|
425
435
|
}
|
|
426
436
|
),
|
|
427
|
-
|
|
437
|
+
y && /* @__PURE__ */ a("div", { ref: T, id: w, className: Ee(), children: C })
|
|
428
438
|
] }) : /* @__PURE__ */ l("div", { className: b(U(), d), children: [
|
|
429
439
|
A,
|
|
430
440
|
/* @__PURE__ */ l("div", { className: "relative", children: [
|
|
@@ -442,7 +452,7 @@ function et({
|
|
|
442
452
|
] })
|
|
443
453
|
] });
|
|
444
454
|
}
|
|
445
|
-
const
|
|
455
|
+
const je = /* @__PURE__ */ new Set([
|
|
446
456
|
"import",
|
|
447
457
|
"export",
|
|
448
458
|
"from",
|
|
@@ -490,7 +500,7 @@ const _e = /* @__PURE__ */ new Set([
|
|
|
490
500
|
"super",
|
|
491
501
|
"in",
|
|
492
502
|
"of"
|
|
493
|
-
]),
|
|
503
|
+
]), Re = /* @__PURE__ */ new Set(["important", "inherit", "initial", "unset", "auto", "none"]);
|
|
494
504
|
function ze(r) {
|
|
495
505
|
switch (r) {
|
|
496
506
|
case "keyword":
|
|
@@ -507,7 +517,7 @@ function ze(r) {
|
|
|
507
517
|
return "text-[var(--semantic-color-content-primary)]";
|
|
508
518
|
}
|
|
509
519
|
}
|
|
510
|
-
function
|
|
520
|
+
function Fe(r) {
|
|
511
521
|
if (!r) return;
|
|
512
522
|
const t = r.trim().toLowerCase();
|
|
513
523
|
if (["ts", "tsx", "typescript", "js", "jsx", "javascript"].includes(t)) return "ts";
|
|
@@ -515,7 +525,7 @@ function Re(r) {
|
|
|
515
525
|
if (t === "css") return "css";
|
|
516
526
|
if (["html", "xml", "svg"].includes(t)) return "html";
|
|
517
527
|
}
|
|
518
|
-
function
|
|
528
|
+
function De(r) {
|
|
519
529
|
const t = [], i = /(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`)|(\b\d[\d_.eE+-]*\b)|([A-Za-z_$][\w$]*)/g;
|
|
520
530
|
let n = 0, e;
|
|
521
531
|
for (; (e = i.exec(r)) !== null; ) {
|
|
@@ -524,13 +534,13 @@ function Fe(r) {
|
|
|
524
534
|
else if (e[3]) t.push({ kind: "number", value: e[3] });
|
|
525
535
|
else if (e[4]) {
|
|
526
536
|
const s = e[4];
|
|
527
|
-
|
|
537
|
+
je.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
538
|
}
|
|
529
539
|
n = i.lastIndex;
|
|
530
540
|
}
|
|
531
541
|
return n < r.length && t.push({ kind: "plain", value: r.slice(n) }), t;
|
|
532
542
|
}
|
|
533
|
-
function
|
|
543
|
+
function $e(r) {
|
|
534
544
|
const t = [], i = /("(?:\\.|[^"\\])*")(\s*:)?|(\b-?\d[\d.eE+-]*\b)|\b(true|false|null)\b/g;
|
|
535
545
|
let n = 0, e;
|
|
536
546
|
for (; (e = i.exec(r)) !== null; )
|
|
@@ -542,12 +552,12 @@ function He(r) {
|
|
|
542
552
|
let n = 0, e;
|
|
543
553
|
for (; (e = i.exec(r)) !== null; )
|
|
544
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] ? 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:
|
|
555
|
+
kind: Re.has(e[5].toLowerCase()) ? "keyword" : "plain",
|
|
546
556
|
value: e[5]
|
|
547
557
|
}), n = i.lastIndex;
|
|
548
558
|
return n < r.length && t.push({ kind: "plain", value: r.slice(n) }), t;
|
|
549
559
|
}
|
|
550
|
-
function
|
|
560
|
+
function Pe(r) {
|
|
551
561
|
const t = [], i = /(<!--[\s\S]*?-->)|(<\/?)([A-Za-z][\w-]*)|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')|([A-Za-z_-][\w-]*)(=)/g;
|
|
552
562
|
let n = 0, e;
|
|
553
563
|
for (; (e = i.exec(r)) !== null; )
|
|
@@ -555,14 +565,14 @@ function $e(r) {
|
|
|
555
565
|
return n < r.length && t.push({ kind: "plain", value: r.slice(n) }), t;
|
|
556
566
|
}
|
|
557
567
|
function te(r, t) {
|
|
558
|
-
const i =
|
|
568
|
+
const i = Fe(t);
|
|
559
569
|
if (!i) return r;
|
|
560
570
|
let n;
|
|
561
571
|
try {
|
|
562
|
-
if (i === "ts") n =
|
|
563
|
-
else if (i === "json") n =
|
|
572
|
+
if (i === "ts") n = De(r);
|
|
573
|
+
else if (i === "json") n = $e(r);
|
|
564
574
|
else if (i === "css") n = He(r);
|
|
565
|
-
else if (i === "html") n =
|
|
575
|
+
else if (i === "html") n = Pe(r);
|
|
566
576
|
else return r;
|
|
567
577
|
} catch {
|
|
568
578
|
return r;
|
|
@@ -571,60 +581,68 @@ function te(r, t) {
|
|
|
571
581
|
(e, s) => e.kind === "plain" ? /* @__PURE__ */ a("span", { children: e.value }, s) : /* @__PURE__ */ a("span", { className: ze(e.kind), children: e.value }, s)
|
|
572
582
|
);
|
|
573
583
|
}
|
|
574
|
-
const
|
|
575
|
-
minHeight: "100vh",
|
|
584
|
+
const ae = {
|
|
576
585
|
display: "flex",
|
|
586
|
+
maxWidth: "100%",
|
|
577
587
|
alignItems: "center",
|
|
578
588
|
justifyContent: "center",
|
|
579
589
|
fontFamily: m.fontFamily
|
|
580
590
|
};
|
|
581
591
|
function tt({
|
|
582
592
|
displayText: r = "Oops",
|
|
583
|
-
message: t = "Something went wrong"
|
|
593
|
+
message: t = "Something went wrong",
|
|
594
|
+
fullPage: i = !1
|
|
584
595
|
}) {
|
|
585
|
-
const
|
|
586
|
-
return /* @__PURE__ */ a(
|
|
587
|
-
|
|
596
|
+
const n = re("spatial");
|
|
597
|
+
return /* @__PURE__ */ a(
|
|
598
|
+
"div",
|
|
588
599
|
{
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
{
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
600
|
+
style: i ? { ...ae, minHeight: "100vh" } : ae,
|
|
601
|
+
"data-role": "error-recovery",
|
|
602
|
+
children: /* @__PURE__ */ a(M, { padding: "component", className: "min-w-0 max-w-full", children: /* @__PURE__ */ a(
|
|
603
|
+
se.div,
|
|
604
|
+
{
|
|
605
|
+
initial: { opacity: 0, y: 2 },
|
|
606
|
+
animate: { opacity: 1, y: 0 },
|
|
607
|
+
transition: { duration: n.duration, ease: n.easing },
|
|
608
|
+
children: /* @__PURE__ */ l(h, { gap: "normal", style: { alignItems: "center", textAlign: "center" }, children: [
|
|
609
|
+
/* @__PURE__ */ a(
|
|
610
|
+
V,
|
|
611
|
+
{
|
|
612
|
+
variant: "display",
|
|
613
|
+
as: "h1",
|
|
614
|
+
className: "text-primary",
|
|
615
|
+
style: { overflowWrap: "anywhere" },
|
|
616
|
+
children: r
|
|
617
|
+
}
|
|
618
|
+
),
|
|
619
|
+
/* @__PURE__ */ a(
|
|
620
|
+
V,
|
|
621
|
+
{
|
|
622
|
+
variant: "title",
|
|
623
|
+
as: "p",
|
|
624
|
+
className: "text-secondary",
|
|
625
|
+
style: { overflowWrap: "anywhere" },
|
|
626
|
+
children: t
|
|
627
|
+
}
|
|
628
|
+
),
|
|
629
|
+
/* @__PURE__ */ a(
|
|
630
|
+
P,
|
|
631
|
+
{
|
|
632
|
+
variant: "primary",
|
|
633
|
+
onClick: () => {
|
|
634
|
+
typeof window < "u" && window.history.back();
|
|
635
|
+
},
|
|
636
|
+
children: "Back"
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
] })
|
|
640
|
+
}
|
|
641
|
+
) })
|
|
624
642
|
}
|
|
625
|
-
)
|
|
643
|
+
);
|
|
626
644
|
}
|
|
627
|
-
const at = /* @__PURE__ */
|
|
645
|
+
const at = /* @__PURE__ */ be.forwardRef(function({ children: t, animation: i = "fade-up", className: n, style: e, as: s = "div" }, u) {
|
|
628
646
|
return /* @__PURE__ */ a(
|
|
629
647
|
s,
|
|
630
648
|
{
|
|
@@ -637,7 +655,7 @@ const at = /* @__PURE__ */ ye.forwardRef(function({ children: t, animation: i =
|
|
|
637
655
|
children: t
|
|
638
656
|
}
|
|
639
657
|
);
|
|
640
|
-
}), nt = /* @__PURE__ */
|
|
658
|
+
}), nt = /* @__PURE__ */ f.forwardRef(
|
|
641
659
|
function({ breadcrumb: t, title: i, status: n, actions: e, level: s = 1, className: u, ...d }, p) {
|
|
642
660
|
const o = `h${s}`;
|
|
643
661
|
return /* @__PURE__ */ a(
|
|
@@ -655,7 +673,7 @@ const at = /* @__PURE__ */ ye.forwardRef(function({ children: t, animation: i =
|
|
|
655
673
|
o,
|
|
656
674
|
{
|
|
657
675
|
style: {
|
|
658
|
-
...m.typeStyles.
|
|
676
|
+
...m.typeStyles.title,
|
|
659
677
|
margin: 0,
|
|
660
678
|
color: "var(--semantic-color-content-primary)"
|
|
661
679
|
},
|
|
@@ -670,23 +688,23 @@ const at = /* @__PURE__ */ ye.forwardRef(function({ children: t, animation: i =
|
|
|
670
688
|
}
|
|
671
689
|
);
|
|
672
690
|
}
|
|
673
|
-
),
|
|
691
|
+
), Ve = 4, Be = "var(--semantic-size-tile)", We = " ", rt = /* @__PURE__ */ f.forwardRef(
|
|
674
692
|
function({ label: t, value: i, sub: n, tone: e = "neutral", style: s, ...u }, d) {
|
|
675
693
|
return /* @__PURE__ */ a(
|
|
676
|
-
|
|
694
|
+
M,
|
|
677
695
|
{
|
|
678
696
|
ref: d,
|
|
679
697
|
padding: "item",
|
|
680
698
|
"data-hds-component": "MetricTile",
|
|
681
699
|
"data-tone": e,
|
|
682
|
-
style: { minHeight:
|
|
700
|
+
style: { minHeight: Be, ...s },
|
|
683
701
|
...u,
|
|
684
702
|
children: /* @__PURE__ */ a(
|
|
685
|
-
|
|
703
|
+
ie.Metric,
|
|
686
704
|
{
|
|
687
705
|
label: t,
|
|
688
706
|
value: i,
|
|
689
|
-
sub: n ??
|
|
707
|
+
sub: n ?? We,
|
|
690
708
|
tone: e,
|
|
691
709
|
className: "px-0"
|
|
692
710
|
}
|
|
@@ -695,16 +713,17 @@ const at = /* @__PURE__ */ ye.forwardRef(function({ children: t, animation: i =
|
|
|
695
713
|
);
|
|
696
714
|
}
|
|
697
715
|
);
|
|
698
|
-
function
|
|
699
|
-
return
|
|
716
|
+
function oe(r) {
|
|
717
|
+
return f.Children.toArray(r).reduce((t, i) => f.isValidElement(i) ? i.type === f.Fragment ? t + oe(i.props.children) : t + 1 : t, 0);
|
|
700
718
|
}
|
|
701
|
-
const it = /* @__PURE__ */
|
|
719
|
+
const it = /* @__PURE__ */ f.forwardRef(
|
|
702
720
|
function({ children: t, ...i }, n) {
|
|
703
|
-
const e = Math.min(Math.max(
|
|
704
|
-
return /* @__PURE__ */ a("div", { ref: n, "data-hds-component": "MetricTiles", ...i, children: /* @__PURE__ */ a(
|
|
721
|
+
const e = Math.min(Math.max(oe(t), 1), Ve);
|
|
722
|
+
return /* @__PURE__ */ a("div", { ref: n, "data-hds-component": "MetricTiles", ...i, children: /* @__PURE__ */ a(ne, { columns: e, gap: "tight", align: "stretch", children: t }) });
|
|
705
723
|
}
|
|
706
|
-
), st = /* @__PURE__ */
|
|
724
|
+
), st = /* @__PURE__ */ f.forwardRef(
|
|
707
725
|
function({ primary: t, secondary: i, destructive: n, sticky: e = !1, className: s, style: u, ...d }, p) {
|
|
726
|
+
const o = f.isValidElement(t) && t.type === P && t.props.variant === void 0 ? f.cloneElement(t, { variant: "primary" }) : t;
|
|
708
727
|
return /* @__PURE__ */ a(
|
|
709
728
|
"div",
|
|
710
729
|
{
|
|
@@ -726,7 +745,7 @@ const it = /* @__PURE__ */ y.forwardRef(
|
|
|
726
745
|
n ? /* @__PURE__ */ a("div", { "data-slot": "destructive", children: n }) : null,
|
|
727
746
|
/* @__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
747
|
i,
|
|
729
|
-
|
|
748
|
+
o
|
|
730
749
|
] }) })
|
|
731
750
|
]
|
|
732
751
|
}
|
|
@@ -734,7 +753,7 @@ const it = /* @__PURE__ */ y.forwardRef(
|
|
|
734
753
|
}
|
|
735
754
|
);
|
|
736
755
|
}
|
|
737
|
-
), ot = /* @__PURE__ */
|
|
756
|
+
), ot = /* @__PURE__ */ f.forwardRef(function({
|
|
738
757
|
title: t,
|
|
739
758
|
description: i,
|
|
740
759
|
actionLabel: n,
|
|
@@ -744,37 +763,37 @@ const it = /* @__PURE__ */ y.forwardRef(
|
|
|
744
763
|
cancelLabel: d = "Cancel",
|
|
745
764
|
level: p = 2,
|
|
746
765
|
...o
|
|
747
|
-
},
|
|
748
|
-
const
|
|
766
|
+
}, y) {
|
|
767
|
+
const v = f.useId();
|
|
749
768
|
return /* @__PURE__ */ a(
|
|
750
769
|
"section",
|
|
751
770
|
{
|
|
752
|
-
ref:
|
|
771
|
+
ref: y,
|
|
753
772
|
"data-hds-component": "DestructiveSection",
|
|
754
|
-
"aria-labelledby":
|
|
773
|
+
"aria-labelledby": v,
|
|
755
774
|
...o,
|
|
756
|
-
children: /* @__PURE__ */ a(
|
|
775
|
+
children: /* @__PURE__ */ a(ie, { tone: "danger", children: /* @__PURE__ */ l(h, { direction: "row", wrap: "wrap", gap: "normal", align: "center", justify: "space-between", children: [
|
|
757
776
|
/* @__PURE__ */ l("div", { "data-slot": "copy", className: "min-w-0 grow basis-64", children: [
|
|
758
|
-
/* @__PURE__ */ a(
|
|
759
|
-
/* @__PURE__ */ a(
|
|
777
|
+
/* @__PURE__ */ a(V, { id: v, as: `h${p}`, variant: "title", children: t }),
|
|
778
|
+
/* @__PURE__ */ a(V, { as: "p", variant: "caption", className: "text-muted-foreground", children: i })
|
|
760
779
|
] }),
|
|
761
780
|
/* @__PURE__ */ a("div", { "data-slot": "action", className: "shrink-0", children: /* @__PURE__ */ l(S, { children: [
|
|
762
|
-
/* @__PURE__ */ a(S.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
|
|
781
|
+
/* @__PURE__ */ a(S.Trigger, { asChild: !0, children: /* @__PURE__ */ a(P, { variant: "secondary", tone: "danger", children: n ?? e }) }),
|
|
763
782
|
/* @__PURE__ */ l(S.Content, { children: [
|
|
764
783
|
/* @__PURE__ */ l(S.Header, { children: [
|
|
765
784
|
/* @__PURE__ */ a(S.Title, { children: t }),
|
|
766
785
|
/* @__PURE__ */ a(S.Description, { children: s })
|
|
767
786
|
] }),
|
|
768
787
|
/* @__PURE__ */ l(S.Footer, { children: [
|
|
769
|
-
/* @__PURE__ */ a(S.Cancel, { asChild: !0, children: /* @__PURE__ */ a(
|
|
770
|
-
/* @__PURE__ */ a(S.Action, { asChild: !0, children: /* @__PURE__ */ a(
|
|
788
|
+
/* @__PURE__ */ a(S.Cancel, { asChild: !0, children: /* @__PURE__ */ a(P, { variant: "secondary", children: d }) }),
|
|
789
|
+
/* @__PURE__ */ a(S.Action, { asChild: !0, children: /* @__PURE__ */ a(P, { variant: "primary", tone: "danger", onClick: u, children: e }) })
|
|
771
790
|
] })
|
|
772
791
|
] })
|
|
773
792
|
] }) })
|
|
774
793
|
] }) })
|
|
775
794
|
}
|
|
776
795
|
);
|
|
777
|
-
}),
|
|
796
|
+
}), Me = "8rem", Le = "6rem", ct = /* @__PURE__ */ f.forwardRef(function({
|
|
778
797
|
title: t,
|
|
779
798
|
toolbar: i,
|
|
780
799
|
columns: n,
|
|
@@ -784,11 +803,11 @@ const it = /* @__PURE__ */ y.forwardRef(
|
|
|
784
803
|
emptyDescription: d,
|
|
785
804
|
level: p = 2,
|
|
786
805
|
...o
|
|
787
|
-
},
|
|
788
|
-
const
|
|
789
|
-
key:
|
|
806
|
+
}, y) {
|
|
807
|
+
const v = f.useId(), w = e.some((g) => g.actions != null), k = w ? [...n, { key: "__actions", label: s, align: "right", width: "max-content" }] : n, T = e.map((g) => ({
|
|
808
|
+
key: g.key,
|
|
790
809
|
cells: [
|
|
791
|
-
...
|
|
810
|
+
...g.cells.map((A, _) => {
|
|
792
811
|
var C;
|
|
793
812
|
return {
|
|
794
813
|
slot: "custom",
|
|
@@ -800,27 +819,27 @@ const it = /* @__PURE__ */ y.forwardRef(
|
|
|
800
819
|
{
|
|
801
820
|
slot: "action",
|
|
802
821
|
align: "right",
|
|
803
|
-
content: /* @__PURE__ */ a(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "end", children:
|
|
822
|
+
content: /* @__PURE__ */ a(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "end", children: g.actions })
|
|
804
823
|
}
|
|
805
824
|
] : []
|
|
806
825
|
]
|
|
807
|
-
})), E = `calc(${n.length} * ${
|
|
808
|
-
return /* @__PURE__ */ a("section", { ref:
|
|
826
|
+
})), E = `calc(${n.length} * ${Me}${w ? ` + ${Le}` : ""})`;
|
|
827
|
+
return /* @__PURE__ */ a("section", { ref: y, "data-hds-component": "DataTableSection", "aria-labelledby": v, ...o, children: /* @__PURE__ */ l(h, { gap: "tight", children: [
|
|
809
828
|
/* @__PURE__ */ l(h, { direction: "row", wrap: "wrap", gap: "normal", align: "center", justify: "space-between", children: [
|
|
810
|
-
/* @__PURE__ */ a(
|
|
829
|
+
/* @__PURE__ */ a(V, { id: v, as: `h${p}`, variant: "title", children: t }),
|
|
811
830
|
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
|
|
812
831
|
] }),
|
|
813
|
-
e.length === 0 ? /* @__PURE__ */ a(
|
|
814
|
-
|
|
832
|
+
e.length === 0 ? /* @__PURE__ */ a(ge, { title: u, description: d }) : /* @__PURE__ */ a(
|
|
833
|
+
ye,
|
|
815
834
|
{
|
|
816
835
|
columns: k,
|
|
817
836
|
rows: T,
|
|
818
837
|
minWidth: E,
|
|
819
|
-
labelledBy:
|
|
838
|
+
labelledBy: v
|
|
820
839
|
}
|
|
821
840
|
)
|
|
822
841
|
] }) });
|
|
823
|
-
}), lt = /* @__PURE__ */
|
|
842
|
+
}), lt = /* @__PURE__ */ f.forwardRef(
|
|
824
843
|
function({ tone: t = "neutral", title: i, notes: n, trailing: e, className: s, ...u }, d) {
|
|
825
844
|
return /* @__PURE__ */ l(
|
|
826
845
|
"div",
|
|
@@ -829,14 +848,14 @@ const it = /* @__PURE__ */ y.forwardRef(
|
|
|
829
848
|
"data-hds-component": "StatusTile",
|
|
830
849
|
"data-hds-metrics": `tone:${t}`,
|
|
831
850
|
className: b(
|
|
832
|
-
"flex
|
|
851
|
+
"flex items-start gap-3 rounded-lg bg-[var(--semantic-color-surface-raised)] p-4",
|
|
833
852
|
s
|
|
834
853
|
),
|
|
835
854
|
...u,
|
|
836
855
|
children: [
|
|
837
856
|
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1", children: [
|
|
838
|
-
/* @__PURE__ */ a("p", { className: "m-0
|
|
839
|
-
n == null ? void 0 : n.map((p, o) => /* @__PURE__ */ a("p", { className: "m-0 mt-1
|
|
857
|
+
/* @__PURE__ */ a("p", { className: "m-0 hds-type-ui text-foreground", children: i }),
|
|
858
|
+
n == null ? void 0 : n.map((p, o) => /* @__PURE__ */ a("p", { className: "m-0 mt-1 hds-type-caption text-muted-foreground", children: p }, o))
|
|
840
859
|
] }),
|
|
841
860
|
e && /* @__PURE__ */ a("div", { className: "shrink-0", children: e })
|
|
842
861
|
]
|
|
@@ -862,12 +881,12 @@ export {
|
|
|
862
881
|
lt as StatusTile,
|
|
863
882
|
Q as blockCodeTextVariants,
|
|
864
883
|
U as blockContainerVariants,
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
884
|
+
Ie as blockHeaderVariants,
|
|
885
|
+
Ae as chevronVariants,
|
|
886
|
+
Te as collapsibleToggleVariants,
|
|
868
887
|
q as copyButtonVariants,
|
|
869
|
-
|
|
870
|
-
|
|
888
|
+
_e as inlineCodeTextVariants,
|
|
889
|
+
Ce as inlineWrapperVariants,
|
|
871
890
|
ee as prePanelVariants,
|
|
872
891
|
ft as useFieldWiring
|
|
873
892
|
};
|