@hirobius/design-system 0.19.0 → 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.
- package/CONSUMING.md +9 -6
- package/DESIGN.md +7 -5
- package/README.md +14 -11
- package/codemods/hds-prefix.mjs +231 -0
- package/codemods/jsx-fold.mjs +515 -0
- package/codemods/not-found-pattern.mjs +71 -0
- package/codemods/patterns-subpath.mjs +242 -81
- package/codemods/patterns-subpath.names.json +41 -15
- package/codemods/removed-0.20.json +194 -0
- package/codemods/tile-grid.mjs +283 -0
- package/codemods/unrewritable.mjs +291 -0
- package/dist/chunks/DemoStateContext-Cz5TmrYu.js +32 -0
- package/dist/chunks/empty-state-BBqhCx0S.js +1217 -0
- package/dist/chunks/{form-BvNNnJ0t.js → form-COP3vK9_.js} +29 -27
- package/dist/contexts.js +157 -78
- package/dist/form.js +1 -1
- package/dist/hirobius-ui.js +1826 -5503
- package/dist/manifest.js +12 -13
- package/dist/patterns.js +820 -561
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +29 -8
- package/dist/types/src/app/components/avatar-group.d.ts +1 -2
- package/dist/types/src/app/components/badge.d.ts +8 -3
- package/dist/types/src/app/components/blockquote.d.ts +1 -2
- package/dist/types/src/app/components/box-sx.d.ts +110 -13
- package/dist/types/src/app/components/box.d.ts +6 -3
- package/dist/types/src/app/components/breadcrumb.d.ts +0 -5
- package/dist/types/src/app/components/button.d.ts +33 -4
- package/dist/types/src/app/components/card.d.ts +7 -8
- package/dist/types/src/app/components/combobox.d.ts +47 -11
- package/dist/types/src/app/components/container.d.ts +2 -2
- package/dist/types/src/app/components/data-table-section.d.ts +1 -1
- package/dist/types/src/app/components/dialog.d.ts +7 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -5
- package/dist/types/src/app/components/field.d.ts +1 -2
- package/dist/types/src/app/components/grid.d.ts +10 -6
- package/dist/types/src/app/components/hds-tooltip.d.ts +12 -2
- package/dist/types/src/app/components/inline-code.d.ts +1 -2
- package/dist/types/src/app/components/input.d.ts +8 -5
- package/dist/types/src/app/components/kbd.d.ts +1 -2
- package/dist/types/src/app/components/metadata-list.d.ts +1 -2
- package/dist/types/src/app/components/page-header.d.ts +0 -2
- package/dist/types/src/app/components/popover.d.ts +8 -0
- package/dist/types/src/app/components/progress.d.ts +33 -6
- package/dist/types/src/app/components/segmented-control.d.ts +2 -26
- package/dist/types/src/app/components/select.d.ts +10 -1
- package/dist/types/src/app/components/skeleton.d.ts +2 -3
- package/dist/types/src/app/components/spinner.d.ts +1 -2
- package/dist/types/src/app/components/stack.d.ts +4 -1
- package/dist/types/src/app/components/stat.d.ts +1 -2
- package/dist/types/src/app/components/status-dot.d.ts +18 -4
- package/dist/types/src/app/components/status-list-item.d.ts +1 -2
- package/dist/types/src/app/components/surface.d.ts +2 -3
- package/dist/types/src/app/components/switcher.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +1 -15
- package/dist/types/src/app/components/tag.d.ts +0 -6
- package/dist/types/src/app/components/text.d.ts +1 -2
- package/dist/types/src/app/components/textarea.d.ts +1 -2
- package/dist/types/src/app/components/toast.d.ts +1 -2
- package/dist/types/src/app/components/tooltip.d.ts +1 -1
- package/dist/types/src/app/context/DemoStateContext.d.ts +1 -1
- package/dist/types/src/app/context/RouterContext.d.ts +5 -5
- package/dist/types/src/app/data/manifest-types.d.ts +6 -5
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +8 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +1 -0
- package/dist/types/src/app/design-system/tokens.d.ts +22 -3
- package/dist/types/src/icons.d.ts +1 -1
- package/dist/types/src/index.d.ts +33 -124
- package/dist/types/src/patterns.d.ts +20 -25
- package/dist/variables.css +6 -0
- package/docs/CONSUMING.md +21 -13
- package/hirobius.tokens.json +48 -15
- package/llms.txt +19 -20
- package/package.json +18 -22
- package/public/hds-manifest.json +2400 -6488
- package/public/llms/components.txt +41 -423
- package/public/llms/layout.txt +4 -4
- package/public/llms-full.txt +67 -448
- package/public/llms.txt +19 -20
- package/src/app/data/component-api.json +1379 -3271
- package/dist/chunks/LanguageContext-CH_bwzCq.js +0 -83
- package/dist/chunks/TokenDisplayContext-evZi_214.js +0 -18
- package/dist/chunks/activity-feed-DIMeUJpW.js +0 -21950
- package/dist/types/src/app/components/activity-feed.d.ts +0 -73
- package/dist/types/src/app/components/app-shell.d.ts +0 -40
- package/dist/types/src/app/components/aspect-ratio.d.ts +0 -25
- package/dist/types/src/app/components/bleed.d.ts +0 -39
- package/dist/types/src/app/components/button-group.d.ts +0 -22
- package/dist/types/src/app/components/calendar.d.ts +0 -22
- package/dist/types/src/app/components/carousel.d.ts +0 -26
- package/dist/types/src/app/components/center.d.ts +0 -36
- package/dist/types/src/app/components/cinematic-link.d.ts +0 -18
- package/dist/types/src/app/components/circular-progress.d.ts +0 -28
- package/dist/types/src/app/components/cluster.d.ts +0 -39
- package/dist/types/src/app/components/command-palette.d.ts +0 -46
- package/dist/types/src/app/components/component-instance-matrix.d.ts +0 -27
- package/dist/types/src/app/components/context-menu.d.ts +0 -78
- package/dist/types/src/app/components/cover.d.ts +0 -43
- package/dist/types/src/app/components/date-input.d.ts +0 -31
- package/dist/types/src/app/components/date-range-input.d.ts +0 -34
- package/dist/types/src/app/components/date-time-input.d.ts +0 -30
- package/dist/types/src/app/components/doc-link-card.d.ts +0 -32
- package/dist/types/src/app/components/error-boundary.d.ts +0 -25
- package/dist/types/src/app/components/file-input.d.ts +0 -30
- package/dist/types/src/app/components/foundation-swatch.d.ts +0 -45
- package/dist/types/src/app/components/frame.d.ts +0 -38
- package/dist/types/src/app/components/heading-stack.d.ts +0 -52
- package/dist/types/src/app/components/history-card.d.ts +0 -12
- package/dist/types/src/app/components/hover-card.d.ts +0 -46
- package/dist/types/src/app/components/icon-button.d.ts +0 -22
- package/dist/types/src/app/components/image-lightbox.d.ts +0 -14
- package/dist/types/src/app/components/input-group.d.ts +0 -23
- package/dist/types/src/app/components/multi-selector.d.ts +0 -40
- package/dist/types/src/app/components/nav-group.d.ts +0 -29
- package/dist/types/src/app/components/nav-item.d.ts +0 -33
- package/dist/types/src/app/components/not-found-pattern.d.ts +0 -1
- package/dist/types/src/app/components/overflow-list.d.ts +0 -21
- package/dist/types/src/app/components/selectable-card.d.ts +0 -29
- package/dist/types/src/app/components/side-nav.d.ts +0 -23
- package/dist/types/src/app/components/sketch.d.ts +0 -19
- package/dist/types/src/app/components/stacked-card-rail.d.ts +0 -32
- package/dist/types/src/app/components/stepper-field.d.ts +0 -12
- package/dist/types/src/app/components/stepper.d.ts +0 -33
- package/dist/types/src/app/components/text-lockup.d.ts +0 -38
- package/dist/types/src/app/components/tile-grid.d.ts +0 -17
- package/dist/types/src/app/components/time-input.d.ts +0 -24
- package/dist/types/src/app/components/toggle-button.d.ts +0 -32
- package/dist/types/src/app/components/token.d.ts +0 -90
- package/dist/types/src/app/components/tokenUtils.d.ts +0 -38
- package/dist/types/src/app/components/tokenizer.d.ts +0 -24
- package/dist/types/src/app/components/toolbar.d.ts +0 -36
- package/dist/types/src/app/components/top-nav.d.ts +0 -23
- package/dist/types/src/app/components/tree-list.d.ts +0 -30
- package/dist/types/src/app/data/nav-model.d.ts +0 -39
- package/dist/types/src/app/hooks/useFocusVisible.d.ts +0 -9
- package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +0 -20
- package/dist/types/src/app/layouts/DocLayout.d.ts +0 -14
- package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +0 -6
- package/dist/types/src/app/layouts/HdsDocsShell.d.ts +0 -72
- package/dist/types/src/app/layouts/HdsSystemDocLayout.d.ts +0 -14
- package/dist/types/src/app/lib/hds-search.d.ts +0 -45
- package/dist/types/src/app/lib/nav-active.d.ts +0 -16
- package/dist/types/src/app/lib/navLevels.d.ts +0 -4
package/dist/patterns.js
CHANGED
|
@@ -1,614 +1,873 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
32
|
+
}
|
|
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 }) }) })
|
|
61
|
+
}
|
|
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 })
|
|
78
|
+
}
|
|
79
|
+
) }) }) : /* @__PURE__ */ a(Z, { children: r && /* @__PURE__ */ a(
|
|
80
|
+
ae,
|
|
81
|
+
{
|
|
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 })
|
|
93
|
+
}
|
|
94
|
+
) });
|
|
95
|
+
}
|
|
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",
|
|
121
|
+
{
|
|
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
|
+
]
|
|
172
|
+
}
|
|
173
|
+
) : (
|
|
174
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
175
|
+
/* @__PURE__ */ a(
|
|
176
|
+
"img",
|
|
177
|
+
{
|
|
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)
|
|
193
|
+
}
|
|
194
|
+
)
|
|
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 };
|
|
111
232
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
233
|
+
return /* @__PURE__ */ a(
|
|
234
|
+
"div",
|
|
235
|
+
{
|
|
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",
|
|
258
|
+
{
|
|
259
|
+
style: {
|
|
260
|
+
...m.typeStyles.caption,
|
|
261
|
+
color: "var(--semantic-color-content-secondary)",
|
|
262
|
+
textAlign: "center",
|
|
263
|
+
maxWidth: "75%",
|
|
264
|
+
whiteSpace: "normal",
|
|
265
|
+
userSelect: "none"
|
|
266
|
+
},
|
|
267
|
+
children: i
|
|
268
|
+
}
|
|
269
|
+
)
|
|
117
270
|
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
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" }
|
|
118
306
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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 }
|
|
126
317
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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 }
|
|
132
330
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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);
|
|
140
347
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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);
|
|
348
|
+
function v() {
|
|
349
|
+
navigator.clipboard.writeText(r).then(() => {
|
|
350
|
+
o(!0), setTimeout(() => o(!1), 2e3);
|
|
351
|
+
});
|
|
150
352
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
|
168
372
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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()
|
|
172
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)" })
|
|
173
391
|
}
|
|
174
|
-
|
|
175
|
-
/*
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
392
|
+
), C = /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
393
|
+
/* @__PURE__ */ a(
|
|
394
|
+
"pre",
|
|
395
|
+
{
|
|
396
|
+
tabIndex: 0,
|
|
397
|
+
role: "region",
|
|
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)]";
|
|
198
508
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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;
|
|
203
530
|
}
|
|
204
|
-
.
|
|
205
|
-
|
|
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;
|
|
206
569
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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,
|
|
211
588
|
{
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
children: [
|
|
219
|
-
/* @__PURE__ */ e(
|
|
220
|
-
"rect",
|
|
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,
|
|
221
595
|
{
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
stroke: "var(--semantic-color-border-default)",
|
|
228
|
-
strokeWidth: "1.5"
|
|
596
|
+
variant: "display",
|
|
597
|
+
as: "h1",
|
|
598
|
+
className: "text-primary",
|
|
599
|
+
style: { whiteSpace: "nowrap" },
|
|
600
|
+
children: r
|
|
229
601
|
}
|
|
230
602
|
),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
|
|
603
|
+
/* @__PURE__ */ a(
|
|
604
|
+
P,
|
|
233
605
|
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
606
|
+
variant: "heading2",
|
|
607
|
+
as: "p",
|
|
608
|
+
className: "text-secondary",
|
|
609
|
+
style: { whiteSpace: "nowrap" },
|
|
610
|
+
children: t
|
|
239
611
|
}
|
|
240
612
|
),
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
|
|
613
|
+
/* @__PURE__ */ a(
|
|
614
|
+
V,
|
|
243
615
|
{
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
616
|
+
variant: "primary",
|
|
617
|
+
onClick: () => {
|
|
618
|
+
typeof window < "u" && window.history.back();
|
|
619
|
+
},
|
|
620
|
+
children: "Back"
|
|
248
621
|
}
|
|
249
622
|
)
|
|
250
|
-
]
|
|
623
|
+
] })
|
|
251
624
|
}
|
|
252
|
-
) });
|
|
625
|
+
) }) });
|
|
253
626
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
"img",
|
|
258
|
-
{
|
|
259
|
-
src: r.coverImage,
|
|
260
|
-
alt: r.title,
|
|
261
|
-
loading: a < 4 ? "eager" : "lazy",
|
|
262
|
-
decoding: "async"
|
|
263
|
-
}
|
|
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",
|
|
278
|
-
{
|
|
279
|
-
style: {
|
|
280
|
-
...v.typeStyles.heading3,
|
|
281
|
-
color: "var(--semantic-color-content-primary)"
|
|
282
|
-
},
|
|
283
|
-
children: r.title
|
|
284
|
-
}
|
|
285
|
-
)
|
|
286
|
-
] })
|
|
287
|
-
] });
|
|
288
|
-
return /* @__PURE__ */ e(
|
|
289
|
-
"div",
|
|
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,
|
|
290
630
|
{
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
"
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
className: "hds-focus hds-scr-card-inner",
|
|
299
|
-
style: {
|
|
300
|
-
display: "flex",
|
|
301
|
-
flexDirection: "column",
|
|
302
|
-
height: "100%",
|
|
303
|
-
textDecoration: "none",
|
|
304
|
-
color: "inherit"
|
|
305
|
-
},
|
|
306
|
-
children: t
|
|
307
|
-
}
|
|
308
|
-
) : /* @__PURE__ */ e("div", { className: "hds-scr-card-inner", children: t })
|
|
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
|
|
309
638
|
}
|
|
310
639
|
);
|
|
311
|
-
}
|
|
312
|
-
function
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
const i = s.current, l = t.current;
|
|
317
|
-
if (!i || !l) return;
|
|
318
|
-
function h() {
|
|
319
|
-
!i || !l || (l.scrollLeft = i.scrollTop);
|
|
320
|
-
}
|
|
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",
|
|
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(
|
|
644
|
+
"header",
|
|
332
645
|
{
|
|
333
|
-
ref:
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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",
|
|
646
|
+
ref: p,
|
|
647
|
+
"data-hds-component": "PageHeader",
|
|
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,
|
|
352
656
|
{
|
|
353
|
-
className: "hds-scr-spacer",
|
|
354
657
|
style: {
|
|
355
|
-
|
|
356
|
-
|
|
658
|
+
...m.typeStyles.heading2,
|
|
659
|
+
margin: 0,
|
|
660
|
+
color: "var(--semantic-color-content-primary)"
|
|
661
|
+
},
|
|
662
|
+
children: i
|
|
357
663
|
}
|
|
358
664
|
),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
665
|
+
n ? /* @__PURE__ */ a("div", { "data-slot": "status", children: n }) : null
|
|
666
|
+
] }),
|
|
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
|
|
668
|
+
] })
|
|
669
|
+
] })
|
|
670
|
+
}
|
|
671
|
+
);
|
|
672
|
+
}
|
|
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,
|
|
677
|
+
{
|
|
678
|
+
ref: d,
|
|
679
|
+
padding: "item",
|
|
680
|
+
"data-hds-component": "MetricTile",
|
|
681
|
+
"data-tone": e,
|
|
682
|
+
style: { minHeight: Ve, ...s },
|
|
683
|
+
...u,
|
|
684
|
+
children: /* @__PURE__ */ a(
|
|
685
|
+
re.Metric,
|
|
686
|
+
{
|
|
687
|
+
label: t,
|
|
688
|
+
value: i,
|
|
689
|
+
sub: n ?? Me,
|
|
690
|
+
tone: e,
|
|
691
|
+
className: "px-0"
|
|
371
692
|
}
|
|
372
693
|
)
|
|
373
694
|
}
|
|
374
|
-
)
|
|
375
|
-
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
);
|
|
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);
|
|
376
700
|
}
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
"
|
|
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 }) });
|
|
705
|
+
}
|
|
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(
|
|
709
|
+
"div",
|
|
710
|
+
{
|
|
711
|
+
ref: p,
|
|
712
|
+
"data-hds-component": "FormActions",
|
|
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
|
+
)
|
|
734
|
+
}
|
|
735
|
+
);
|
|
736
|
+
}
|
|
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(
|
|
750
|
+
"section",
|
|
381
751
|
{
|
|
382
|
-
ref:
|
|
383
|
-
"data-hds-component": "
|
|
384
|
-
|
|
385
|
-
...
|
|
386
|
-
children: /* @__PURE__ */
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
] })
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
] })
|
|
752
|
+
ref: g,
|
|
753
|
+
"data-hds-component": "DestructiveSection",
|
|
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 })
|
|
760
|
+
] }),
|
|
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 })
|
|
767
|
+
] }),
|
|
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 }) })
|
|
771
|
+
] })
|
|
772
|
+
] })
|
|
773
|
+
] }) })
|
|
774
|
+
] }) })
|
|
406
775
|
}
|
|
407
776
|
);
|
|
408
|
-
}),
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
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,
|
|
790
|
+
cells: [
|
|
791
|
+
...v.cells.map((A, _) => {
|
|
792
|
+
var C;
|
|
793
|
+
return {
|
|
794
|
+
slot: "custom",
|
|
795
|
+
content: A,
|
|
796
|
+
align: (C = n[_]) == null ? void 0 : C.align
|
|
797
|
+
};
|
|
798
|
+
}),
|
|
799
|
+
...w ? [
|
|
420
800
|
{
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
tone: n,
|
|
425
|
-
className: "px-0"
|
|
801
|
+
slot: "action",
|
|
802
|
+
align: "right",
|
|
803
|
+
content: /* @__PURE__ */ a(h, { direction: "row", wrap: "wrap", gap: "tight", align: "center", justify: "end", children: v.actions })
|
|
426
804
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
)
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}), ne = d.forwardRef(function({ primary: a, secondary: s, destructive: t, sticky: n = !1, className: c, style: i, ...l }, h) {
|
|
438
|
-
return /* @__PURE__ */ e(
|
|
439
|
-
"div",
|
|
440
|
-
{
|
|
441
|
-
ref: h,
|
|
442
|
-
"data-hds-component": "FormActions",
|
|
443
|
-
"data-sticky": n ? "true" : void 0,
|
|
444
|
-
className: M(n && "border-t border-border bg-background py-3", c),
|
|
445
|
-
style: n ? { position: "sticky", bottom: 0, ...i } : i,
|
|
446
|
-
...l,
|
|
447
|
-
children: /* @__PURE__ */ o(u, { gap: "tight", align: "center", justify: t ? "space-between" : "end", children: [
|
|
448
|
-
t ? /* @__PURE__ */ e("div", { "data-slot": "destructive", children: t }) : null,
|
|
449
|
-
/* @__PURE__ */ e("div", { "data-slot": "group", className: "ml-auto", children: /* @__PURE__ */ o(u, { gap: "tight", align: "center", justify: "end", children: [
|
|
450
|
-
s,
|
|
451
|
-
a
|
|
452
|
-
] }) })
|
|
453
|
-
] })
|
|
454
|
-
}
|
|
455
|
-
);
|
|
456
|
-
}), oe = d.forwardRef(
|
|
457
|
-
function({
|
|
458
|
-
title: a,
|
|
459
|
-
description: s,
|
|
460
|
-
actionLabel: t,
|
|
461
|
-
confirmLabel: n,
|
|
462
|
-
confirmBody: c,
|
|
463
|
-
onConfirm: i,
|
|
464
|
-
cancelLabel: l = "Cancel",
|
|
465
|
-
level: h = 2,
|
|
466
|
-
...g
|
|
467
|
-
}, y) {
|
|
468
|
-
const m = d.useId();
|
|
469
|
-
return /* @__PURE__ */ e(
|
|
470
|
-
"section",
|
|
805
|
+
] : []
|
|
806
|
+
]
|
|
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
|
|
812
|
+
] }),
|
|
813
|
+
e.length === 0 ? /* @__PURE__ */ a(ve, { title: u, description: d }) : /* @__PURE__ */ a(
|
|
814
|
+
ge,
|
|
471
815
|
{
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
children: /* @__PURE__ */ e(V, { tone: "danger", children: /* @__PURE__ */ o(u, { gap: "normal", align: "center", justify: "space-between", children: [
|
|
477
|
-
/* @__PURE__ */ o("div", { "data-slot": "copy", className: "min-w-0 grow basis-64", children: [
|
|
478
|
-
/* @__PURE__ */ e(S, { id: m, as: `h${h}`, variant: "heading3", children: a }),
|
|
479
|
-
/* @__PURE__ */ e(S, { as: "p", variant: "caption", className: "text-muted-foreground", children: s })
|
|
480
|
-
] }),
|
|
481
|
-
/* @__PURE__ */ e("div", { "data-slot": "action", className: "shrink-0", children: /* @__PURE__ */ o(p, { children: [
|
|
482
|
-
/* @__PURE__ */ e(p.Trigger, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "secondary", tone: "danger", children: t ?? n }) }),
|
|
483
|
-
/* @__PURE__ */ o(p.Content, { children: [
|
|
484
|
-
/* @__PURE__ */ o(p.Header, { children: [
|
|
485
|
-
/* @__PURE__ */ e(p.Title, { children: a }),
|
|
486
|
-
/* @__PURE__ */ e(p.Description, { children: c })
|
|
487
|
-
] }),
|
|
488
|
-
/* @__PURE__ */ o(p.Footer, { children: [
|
|
489
|
-
/* @__PURE__ */ e(p.Cancel, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "secondary", children: l }) }),
|
|
490
|
-
/* @__PURE__ */ e(p.Action, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "primary", tone: "danger", onClick: i, children: n }) })
|
|
491
|
-
] })
|
|
492
|
-
] })
|
|
493
|
-
] }) })
|
|
494
|
-
] }) })
|
|
816
|
+
columns: k,
|
|
817
|
+
rows: T,
|
|
818
|
+
minWidth: E,
|
|
819
|
+
labelledBy: f
|
|
495
820
|
}
|
|
496
|
-
)
|
|
497
|
-
}
|
|
498
|
-
),
|
|
499
|
-
function({
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
columns: t,
|
|
503
|
-
rows: n,
|
|
504
|
-
actionsLabel: c = "Actions",
|
|
505
|
-
emptyTitle: i = "Nothing here yet",
|
|
506
|
-
emptyDescription: l,
|
|
507
|
-
level: h = 2,
|
|
508
|
-
...g
|
|
509
|
-
}, y) {
|
|
510
|
-
const m = d.useId(), b = n.some((f) => f.actions != null), F = b ? [
|
|
511
|
-
...t,
|
|
512
|
-
{ key: "__actions", label: c, align: "right", width: "max-content" }
|
|
513
|
-
] : t, j = n.map((f) => ({
|
|
514
|
-
key: f.key,
|
|
515
|
-
cells: [
|
|
516
|
-
...f.cells.map((H, L) => {
|
|
517
|
-
var T;
|
|
518
|
-
return {
|
|
519
|
-
slot: "custom",
|
|
520
|
-
content: H,
|
|
521
|
-
align: (T = t[L]) == null ? void 0 : T.align
|
|
522
|
-
};
|
|
523
|
-
}),
|
|
524
|
-
...b ? [
|
|
525
|
-
{
|
|
526
|
-
slot: "action",
|
|
527
|
-
align: "right",
|
|
528
|
-
content: /* @__PURE__ */ e(u, { gap: "tight", align: "center", justify: "end", children: f.actions })
|
|
529
|
-
}
|
|
530
|
-
] : []
|
|
531
|
-
]
|
|
532
|
-
})), D = `calc(${t.length} * ${q}${b ? ` + ${K}` : ""})`;
|
|
533
|
-
return /* @__PURE__ */ e(
|
|
534
|
-
"section",
|
|
821
|
+
)
|
|
822
|
+
] }) });
|
|
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",
|
|
535
827
|
{
|
|
536
|
-
ref:
|
|
537
|
-
"data-hds-component": "
|
|
538
|
-
"
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
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))
|
|
544
840
|
] }),
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
{
|
|
548
|
-
columns: F,
|
|
549
|
-
rows: j,
|
|
550
|
-
minWidth: D,
|
|
551
|
-
labelledBy: m
|
|
552
|
-
}
|
|
553
|
-
)
|
|
554
|
-
] })
|
|
841
|
+
e && /* @__PURE__ */ a("div", { className: "shrink-0", children: e })
|
|
842
|
+
]
|
|
555
843
|
}
|
|
556
844
|
);
|
|
557
845
|
}
|
|
558
846
|
);
|
|
559
847
|
export {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
te as StackedCardRail,
|
|
586
|
-
Ie as Stepper,
|
|
587
|
-
Ve as Toolbar,
|
|
588
|
-
Ae as TopNav,
|
|
589
|
-
Me as TreeList,
|
|
590
|
-
Re as activityAvatarVariants,
|
|
591
|
-
$e as activityToneVariants,
|
|
592
|
-
Fe as appShellVariants,
|
|
593
|
-
je as blockCodeTextVariants,
|
|
594
|
-
De as blockContainerVariants,
|
|
595
|
-
He as blockHeaderVariants,
|
|
596
|
-
Le as carouselControlVariants,
|
|
597
|
-
_e as chevronVariants,
|
|
598
|
-
Ee as cmdkDescriptionVariants,
|
|
599
|
-
Pe as cmdkKindBadgeVariants,
|
|
600
|
-
ze as cmdkRowVariants,
|
|
601
|
-
Be as collapsibleToggleVariants,
|
|
602
|
-
We as copyButtonVariants,
|
|
603
|
-
Oe as defaultActivityEvents,
|
|
604
|
-
Ge as docLinkCardVariants,
|
|
605
|
-
Ue as fileInputVariants,
|
|
606
|
-
Xe as inlineCodeTextVariants,
|
|
607
|
-
Ye as inlineWrapperVariants,
|
|
608
|
-
qe as navIndicatorVariants,
|
|
609
|
-
Ke as navItemVariants,
|
|
610
|
-
Je as prePanelVariants,
|
|
611
|
-
Qe as sideNavVariants,
|
|
612
|
-
Ze as stepMarkerVariants,
|
|
613
|
-
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
|
|
614
873
|
};
|