@mechane-ai/elements 0.26.0 → 0.28.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/README.md +13 -6
- package/dist/ai.js +56 -56
- package/dist/{categorical-values-CPRt9uzI.js → categorical-values-DqoH9l1M.js} +2 -2
- package/dist/chart-frame-CYdrUwvP.js +239 -0
- package/dist/{chart-input-DDAjzy-O.js → chart-input--Q3Jdono.js} +4 -3
- package/dist/charts/cartesian.js +527 -434
- package/dist/charts/distribution.js +134 -126
- package/dist/charts/graph.js +46 -43
- package/dist/charts/hierarchy.js +28 -26
- package/dist/charts/matrix.js +81 -77
- package/dist/charts/timeline.js +87 -80
- package/dist/charts.js +1 -1
- package/dist/{code-block-DENC5fD_.js → code-block-DPeyW4sm.js} +3 -3
- package/dist/collections.js +52 -52
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +10 -10
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-CGIua9If.js → content-link-5oRGjDHa.js} +1 -1
- package/dist/content.js +18 -18
- package/dist/elements.css +14 -0
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +7 -7
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +40 -40
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation.js +1 -1
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -4
- package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +3 -2
- package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +2 -1
- package/dist/packages/charts/src/cartesian/time-series.d.ts +12 -3
- package/dist/packages/charts/src/chart-frame.d.ts +15 -7
- package/dist/packages/charts/src/chart-input.d.ts +3 -1
- package/dist/packages/charts/src/chart-inspection.d.ts +3 -1
- package/dist/packages/charts/src/chart-series-summary.d.ts +6 -0
- package/dist/packages/charts/src/chart-theme.d.ts +5 -0
- package/dist/packages/charts/src/distribution/ecdf.d.ts +3 -2
- package/dist/packages/charts/src/distribution/histogram.d.ts +3 -2
- package/dist/packages/charts/src/distribution/interval-plot.d.ts +3 -2
- package/dist/packages/charts/src/distribution/ranked-bars.d.ts +3 -2
- package/dist/packages/charts/src/graph/relation-graph.d.ts +3 -2
- package/dist/packages/charts/src/hierarchy/treemap.d.ts +3 -2
- package/dist/packages/charts/src/index.d.ts +1 -1
- package/dist/packages/charts/src/matrix/matrix.d.ts +3 -2
- package/dist/packages/charts/src/matrix/token-heatmap.d.ts +3 -2
- package/dist/packages/charts/src/timeline/waterfall.d.ts +4 -1
- package/dist/packages/core/src/index.d.ts +2 -0
- package/dist/packages/core/src/section-heading.d.ts +8 -0
- package/dist/packages/forms/src/settings-row.d.ts +10 -3
- package/dist/packages/layout/src/report-content.d.ts +1 -1
- package/dist/packages/navigation/src/content-tabs.d.ts +9 -2
- package/dist/{pierre-diff-CHQsoQSZ.js → pierre-diff-C3U_qae6.js} +1 -1
- package/dist/{pierre-theme-CLgk9v3e.js → pierre-theme-DsrSwl5m.js} +19 -20
- package/dist/{pierre-tree-C3nKYyoN.js → pierre-tree-D2kRr4h4.js} +4 -4
- package/dist/{src-CQOgWIzP.js → src-BfPaaDxg.js} +106 -104
- package/dist/{src-DLReNPV9.js → src-E3Or8tkO.js} +38 -18
- package/dist/{src-DHYcohZP.js → src-eWcNz_oB.js} +25 -26
- package/dist/tokens.js +1 -3
- package/dist/{tokens.stylex-DTHHFbyl.js → tokens.stylex-BoRZ3D8s.js} +92 -12
- package/package.json +1 -1
- package/dist/chart-frame-CNr8M_b2.js +0 -166
- package/dist/constants.stylex-BILvnwUk.js +0 -84
package/README.md
CHANGED
|
@@ -145,12 +145,19 @@ record and store named choices rather than catalog indexes. Identity palettes re
|
|
|
145
145
|
|
|
146
146
|
`MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
|
|
147
147
|
record summaries. `Metric` offers `statistic` and `headline` variants, a concise `detail`, and a passive `trend` slot.
|
|
148
|
-
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data. Full charts
|
|
149
|
+
accept `report={{ meta, summary }}` to place period metrics between a shared `SectionHeading` and the plot. Bar and
|
|
150
|
+
time-series charts also accept `report={{ meta, seriesValues }}`, a map of formatted period values keyed by series
|
|
151
|
+
identifier. It reuses their labels and colors as the legend. Undefined values reserve loading space. `SmallMultiples`
|
|
152
|
+
aligns date axes and inspection across panels, with one date axis at the bottom; its placeholder accepts the same report
|
|
153
|
+
layout without observations. The application owns periods, aggregates, coverage and read state. Keep full-width tables
|
|
154
|
+
outside `PageContent` so their cell insets remain the only gutter. `ReportContent` owns the inset for its optional
|
|
155
|
+
`summary` and leaves its `breakdown` full width. Pass summary content directly; omit it when a section contains only
|
|
156
|
+
rows. Absent, `null` and `false` summaries reserve no empty space. `ContentTabs` uses `defaultSelectedId` for an initial
|
|
157
|
+
local choice or `navigation` for application-controlled links; the two modes are mutually exclusive. `SettingsSection`
|
|
158
|
+
keeps wide tables inside their scroll region, and `SettingsRow` aligns labels and controls. Use `isPlaceholder` on a
|
|
159
|
+
decorative row without a control ID; ready rows require a real `controlId` for their label. `FormActions` owns
|
|
160
|
+
submission rows and their internal spacing. The enclosing section owns the gap before and after the actions.
|
|
154
161
|
|
|
155
162
|
The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
|
|
156
163
|
`@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
|
package/dist/ai.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as l } from "./content-link-
|
|
1
|
+
import { D as e, E as t, T as n, _ as r, k as i, m as a, p as o, t as s, w as c } from "./src-E3Or8tkO.js";
|
|
2
|
+
import { t as l } from "./content-link-5oRGjDHa.js";
|
|
3
3
|
import { r as u, t as d } from "./src-d7EAi61b.js";
|
|
4
|
-
import { c as f, d as p } from "./src-
|
|
5
|
-
import { c as m, u as h } from "./src-
|
|
4
|
+
import { c as f, d as p } from "./src-eWcNz_oB.js";
|
|
5
|
+
import { c as m, u as h } from "./src-BfPaaDxg.js";
|
|
6
6
|
import { t as g } from "./accessibility-C-aIZ1Yx.js";
|
|
7
7
|
import { t as _ } from "./visible-motion-1GcUaEi4.js";
|
|
8
8
|
import * as v from "@stylexjs/stylex";
|
|
@@ -11,35 +11,35 @@ import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
|
11
11
|
import { ArrowDown as O, ArrowUp as ee, File as k, GitBranch as A, Square as j } from "lucide-react";
|
|
12
12
|
import { MessageScroller as M, useMessageScroller as N, useMessageScrollerScrollable as P } from "@shadcn/react/message-scroller";
|
|
13
13
|
// packages/ai/src/approval.tsx
|
|
14
|
-
function F(
|
|
14
|
+
function F(e) {
|
|
15
15
|
return /* @__PURE__ */ D("section", {
|
|
16
|
-
"aria-label":
|
|
17
|
-
"data-request-id":
|
|
16
|
+
"aria-label": e.title,
|
|
17
|
+
"data-request-id": e.requestId,
|
|
18
18
|
className: "x78zum5 xdt5ytf x1n8ia3y xeuugli x1c8xbx5 xmkeg23 x1y0btm7 x1ey3b81 x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xj57cvi",
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ E("h3", {
|
|
21
21
|
className: "x1ghz6dp xtqrqnz x1778rvt xk4h15q xj0a0fe",
|
|
22
|
-
children:
|
|
22
|
+
children: e.title
|
|
23
23
|
}),
|
|
24
|
-
|
|
24
|
+
e.description !== void 0 && /* @__PURE__ */ E("p", {
|
|
25
25
|
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
26
|
-
children:
|
|
26
|
+
children: e.description
|
|
27
27
|
}),
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
e.children,
|
|
29
|
+
e.status === "pending" ? /* @__PURE__ */ D(o, { children: [/* @__PURE__ */ E(c, {
|
|
30
30
|
variant: "solid",
|
|
31
|
-
onClick:
|
|
32
|
-
disabled:
|
|
33
|
-
isPending:
|
|
31
|
+
onClick: e.onApprove,
|
|
32
|
+
disabled: e.isDisabled === !0 || e.busy !== void 0,
|
|
33
|
+
isPending: e.busy === "approve",
|
|
34
34
|
pendingLabel: "Approving…",
|
|
35
|
-
children:
|
|
36
|
-
}), /* @__PURE__ */ E(
|
|
37
|
-
onClick:
|
|
38
|
-
disabled:
|
|
39
|
-
isPending:
|
|
35
|
+
children: e.approveLabel ?? "Approve"
|
|
36
|
+
}), /* @__PURE__ */ E(c, {
|
|
37
|
+
onClick: e.onDeny,
|
|
38
|
+
disabled: e.isDisabled === !0 || e.busy !== void 0,
|
|
39
|
+
isPending: e.busy === "deny",
|
|
40
40
|
pendingLabel: "Denying…",
|
|
41
|
-
children:
|
|
42
|
-
})] }) : /* @__PURE__ */ E(s, { children:
|
|
41
|
+
children: e.denyLabel ?? "Deny"
|
|
42
|
+
})] }) : /* @__PURE__ */ E(s, { children: e.statusLabel })
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -111,19 +111,19 @@ function H({ label: e = "Jump to latest" }) {
|
|
|
111
111
|
children: /* @__PURE__ */ E(U, { label: e })
|
|
112
112
|
}) : null;
|
|
113
113
|
}
|
|
114
|
-
function U({ label:
|
|
115
|
-
let { scrollToEnd:
|
|
116
|
-
return /* @__PURE__ */ D(
|
|
114
|
+
function U({ label: e, onActivate: t }) {
|
|
115
|
+
let { scrollToEnd: n } = N(), r = b(I);
|
|
116
|
+
return /* @__PURE__ */ D(c, {
|
|
117
117
|
onClick: () => {
|
|
118
|
-
|
|
119
|
-
let e =
|
|
120
|
-
e != null && (
|
|
118
|
+
t?.(), requestAnimationFrame(() => {
|
|
119
|
+
let e = r?.current;
|
|
120
|
+
e != null && (n({ behavior: "instant" }), e.focus({ preventScroll: !0 }));
|
|
121
121
|
});
|
|
122
122
|
},
|
|
123
123
|
children: [/* @__PURE__ */ E(O, {
|
|
124
124
|
size: 14,
|
|
125
125
|
"aria-hidden": !0
|
|
126
|
-
}),
|
|
126
|
+
}), e]
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
var W = {
|
|
@@ -251,17 +251,17 @@ function X({ name: e, description: t, href: n, actions: r }) {
|
|
|
251
251
|
// packages/ai/src/message-action.tsx
|
|
252
252
|
function Z(e) {
|
|
253
253
|
if (e.kind === "link") {
|
|
254
|
-
let { kind:
|
|
255
|
-
return /* @__PURE__ */ E(
|
|
254
|
+
let { kind: n, label: r, ...i } = e;
|
|
255
|
+
return /* @__PURE__ */ E(t, {
|
|
256
256
|
...i,
|
|
257
|
-
"aria-label":
|
|
257
|
+
"aria-label": r
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
|
-
let { kind:
|
|
261
|
-
return /* @__PURE__ */ E(
|
|
262
|
-
...
|
|
260
|
+
let { kind: r, label: i, ...a } = e;
|
|
261
|
+
return /* @__PURE__ */ E(n, {
|
|
262
|
+
...a,
|
|
263
263
|
variant: "ghost",
|
|
264
|
-
"aria-label":
|
|
264
|
+
"aria-label": i
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
function Q(e) {
|
|
@@ -269,9 +269,9 @@ function Q(e) {
|
|
|
269
269
|
}
|
|
270
270
|
// packages/ai/src/message-boundary.tsx
|
|
271
271
|
function te({ label: e, children: t }) {
|
|
272
|
-
return /* @__PURE__ */ D(
|
|
272
|
+
return /* @__PURE__ */ D(r.Root, {
|
|
273
273
|
className: "xeuugli x1kbiq1m xykt701 xpu655y",
|
|
274
|
-
children: [/* @__PURE__ */ D(
|
|
274
|
+
children: [/* @__PURE__ */ D(r.Trigger, {
|
|
275
275
|
className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
|
|
276
276
|
children: [/* @__PURE__ */ E(A, {
|
|
277
277
|
size: 14,
|
|
@@ -281,7 +281,7 @@ function te({ label: e, children: t }) {
|
|
|
281
281
|
className: "xeuugli xj0a0fe",
|
|
282
282
|
children: e
|
|
283
283
|
})]
|
|
284
|
-
}), /* @__PURE__ */ E(
|
|
284
|
+
}), /* @__PURE__ */ E(r.Panel, {
|
|
285
285
|
className: "x153jb6y xy8obcc xas2l8k",
|
|
286
286
|
children: t
|
|
287
287
|
})]
|
|
@@ -307,7 +307,7 @@ function ne({ isCompact: e = !1 }) {
|
|
|
307
307
|
children: /* @__PURE__ */ D("div", {
|
|
308
308
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
|
|
309
309
|
children: [/* @__PURE__ */ E("div", {
|
|
310
|
-
...v.props(
|
|
310
|
+
...v.props(i.base, i.field, i.textarea, i.plainTextarea),
|
|
311
311
|
children: /* @__PURE__ */ E(p, {
|
|
312
312
|
lines: e ? 1 : 2,
|
|
313
313
|
width: "22ch"
|
|
@@ -325,7 +325,7 @@ function ne({ isCompact: e = !1 }) {
|
|
|
325
325
|
})
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
|
-
function re({ label: e, value: t, onValueChange:
|
|
328
|
+
function re({ label: e, value: t, onValueChange: r, onSubmit: i, name: a = "prompt", placeholder: o, maxLength: s, required: c = !0, isPending: l = !1, disabled: u = !1, isSubmitDisabled: f = !1, submitLabel: p = "Send message", pendingLabel: _ = "Sending…", enterBehavior: y = "newline", isCompact: b = !1, description: x, error: C, controls: w, attachments: T, onStop: O, isStopPending: k = !1, stopLabel: A = "Stop response" }) {
|
|
329
329
|
let M = S(), N = u, P = b && T === void 0 && w === void 0, F = !N && !l && !f, I = p;
|
|
330
330
|
O === void 0 ? l ? I = _ : y === "submit" && (I = `${p} · Enter`) : I = k ? "Stopping…" : A;
|
|
331
331
|
function L(e) {
|
|
@@ -334,7 +334,7 @@ function re({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
|
|
|
334
334
|
e.shiftKey || t || e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229 || (e.preventDefault(), F && O === void 0 && e.currentTarget.form?.requestSubmit());
|
|
335
335
|
}
|
|
336
336
|
function R(e) {
|
|
337
|
-
e.preventDefault(), F && O === void 0 &&
|
|
337
|
+
e.preventDefault(), F && O === void 0 && i(e);
|
|
338
338
|
}
|
|
339
339
|
return /* @__PURE__ */ E("form", {
|
|
340
340
|
onSubmit: R,
|
|
@@ -360,13 +360,13 @@ function re({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
|
|
|
360
360
|
isCompact: b,
|
|
361
361
|
shouldGrow: P,
|
|
362
362
|
xstyle: P ? $.inlineInput : void 0,
|
|
363
|
-
name:
|
|
363
|
+
name: a,
|
|
364
364
|
value: t,
|
|
365
|
-
onChange: (e) =>
|
|
365
|
+
onChange: (e) => r(e.currentTarget.value),
|
|
366
366
|
onKeyDown: L,
|
|
367
|
-
placeholder:
|
|
368
|
-
maxLength:
|
|
369
|
-
required:
|
|
367
|
+
placeholder: o ?? e,
|
|
368
|
+
maxLength: s,
|
|
369
|
+
required: c,
|
|
370
370
|
disabled: u,
|
|
371
371
|
"aria-errormessage": C === void 0 ? void 0 : M
|
|
372
372
|
}),
|
|
@@ -379,7 +379,7 @@ function re({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
|
|
|
379
379
|
children: [w !== void 0 && /* @__PURE__ */ E("div", {
|
|
380
380
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
|
|
381
381
|
children: w
|
|
382
|
-
}), /* @__PURE__ */ D(d.Root, { children: [/* @__PURE__ */ E(d.Trigger, { render: O === void 0 ? /* @__PURE__ */ E(
|
|
382
|
+
}), /* @__PURE__ */ D(d.Root, { children: [/* @__PURE__ */ E(d.Trigger, { render: O === void 0 ? /* @__PURE__ */ E(n, {
|
|
383
383
|
xstyle: $.action,
|
|
384
384
|
type: "submit",
|
|
385
385
|
variant: "solid",
|
|
@@ -390,7 +390,7 @@ function re({ label: e, value: t, onValueChange: n, onSubmit: r, name: i = "prom
|
|
|
390
390
|
size: 16,
|
|
391
391
|
"aria-hidden": !0
|
|
392
392
|
})
|
|
393
|
-
}) : /* @__PURE__ */ E(
|
|
393
|
+
}) : /* @__PURE__ */ E(n, {
|
|
394
394
|
xstyle: $.action,
|
|
395
395
|
type: "button",
|
|
396
396
|
"aria-label": k ? "Stopping…" : A,
|
|
@@ -469,22 +469,22 @@ function ae({ sources: e, label: t = "Sources" }) {
|
|
|
469
469
|
]
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
|
-
function oe({ source:
|
|
472
|
+
function oe({ source: t, label: n }) {
|
|
473
473
|
return /* @__PURE__ */ E("span", {
|
|
474
474
|
className: "xt0psk2 x11njtxf xss6m8b",
|
|
475
475
|
children: /* @__PURE__ */ D(u.Root, { children: [/* @__PURE__ */ E(u.Trigger, {
|
|
476
|
-
render: /* @__PURE__ */ E(
|
|
477
|
-
"aria-label": `Source ${n}: ${
|
|
476
|
+
render: /* @__PURE__ */ E(e, {}),
|
|
477
|
+
"aria-label": `Source ${n}: ${t.title}`,
|
|
478
478
|
children: n
|
|
479
479
|
}), /* @__PURE__ */ E(u.Portal, { children: /* @__PURE__ */ E(u.Positioner, {
|
|
480
480
|
side: "top",
|
|
481
|
-
children: /* @__PURE__ */ E(u.Popup, { children: /* @__PURE__ */ D(
|
|
481
|
+
children: /* @__PURE__ */ E(u.Popup, { children: /* @__PURE__ */ D(a, {
|
|
482
482
|
isCompact: !0,
|
|
483
483
|
children: [
|
|
484
|
-
/* @__PURE__ */ E(u.Title, { children:
|
|
485
|
-
|
|
484
|
+
/* @__PURE__ */ E(u.Title, { children: t.title }),
|
|
485
|
+
t.description !== void 0 && /* @__PURE__ */ E(u.Description, { children: t.description }),
|
|
486
486
|
/* @__PURE__ */ E(l, {
|
|
487
|
-
href:
|
|
487
|
+
href: t.href,
|
|
488
488
|
children: "Open source"
|
|
489
489
|
})
|
|
490
490
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e, s as t } from "./chart-frame-
|
|
2
|
-
import { n } from "./chart-input
|
|
1
|
+
import { n as e, s as t } from "./chart-frame-CYdrUwvP.js";
|
|
2
|
+
import { n } from "./chart-input--Q3Jdono.js";
|
|
3
3
|
import * as r from "@stylexjs/stylex";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
// packages/charts/src/categorical-values.tsx
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { _ as e, l as t } from "./src-E3Or8tkO.js";
|
|
2
|
+
import { t as n } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
3
|
+
import { d as r, m as i } from "./src-eWcNz_oB.js";
|
|
4
|
+
import { n as a, r as o } from "./tokens.stylex-BoRZ3D8s.js";
|
|
5
|
+
import * as s from "@stylexjs/stylex";
|
|
6
|
+
import { useId as c } from "react";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
// packages/charts/src/chart-theme.ts
|
|
9
|
+
var d = {
|
|
10
|
+
series1: a.series1,
|
|
11
|
+
series2: a.series2,
|
|
12
|
+
series3: a.series3,
|
|
13
|
+
series4: a.series4,
|
|
14
|
+
series5: a.series5,
|
|
15
|
+
series6: a.series6,
|
|
16
|
+
positive: a.positive,
|
|
17
|
+
negative: a.negative,
|
|
18
|
+
neutral: o.muted
|
|
19
|
+
}, f = {
|
|
20
|
+
plot: {
|
|
21
|
+
k7Eaqz: "xeuugli",
|
|
22
|
+
kVQacm: "xb3r6kr",
|
|
23
|
+
$$css: !0
|
|
24
|
+
},
|
|
25
|
+
svg: {
|
|
26
|
+
k1xSpc: "x1lliihq",
|
|
27
|
+
kzqmXN: "xh8yej3",
|
|
28
|
+
kVQacm: "x1rea2x4",
|
|
29
|
+
$$css: !0
|
|
30
|
+
},
|
|
31
|
+
axis: {
|
|
32
|
+
kjVXCG: "x13hfdr1",
|
|
33
|
+
kfJifR: "xnpr05h",
|
|
34
|
+
kREpy8: "x13efnbd",
|
|
35
|
+
$$css: !0
|
|
36
|
+
},
|
|
37
|
+
grid: {
|
|
38
|
+
kjVXCG: "x13hfdr1",
|
|
39
|
+
kfJifR: "xnpr05h",
|
|
40
|
+
k5rJSQ: "x1ntoi03",
|
|
41
|
+
kREpy8: "x13efnbd",
|
|
42
|
+
$$css: !0
|
|
43
|
+
},
|
|
44
|
+
label: {
|
|
45
|
+
kDwRjp: "x1q7gtio",
|
|
46
|
+
kMv6JI: "x1hz01jw",
|
|
47
|
+
kGuDYH: "xy8obcc",
|
|
48
|
+
k63SB2: "xj57cvi",
|
|
49
|
+
kcqcaj: "xss6m8b",
|
|
50
|
+
$$css: !0
|
|
51
|
+
},
|
|
52
|
+
mark: {
|
|
53
|
+
kfJifR: "xhr4kjn",
|
|
54
|
+
kREpy8: "x13efnbd",
|
|
55
|
+
$$css: !0
|
|
56
|
+
},
|
|
57
|
+
selected: {
|
|
58
|
+
kjVXCG: "x17y187c",
|
|
59
|
+
kfJifR: "xvlca1e",
|
|
60
|
+
kREpy8: "x13efnbd",
|
|
61
|
+
$$css: !0
|
|
62
|
+
},
|
|
63
|
+
inspectable: {
|
|
64
|
+
k3XXqK: "x1t137rt",
|
|
65
|
+
$$css: !0
|
|
66
|
+
}
|
|
67
|
+
}, p = {
|
|
68
|
+
kzqmXN: "x1xc55vz",
|
|
69
|
+
kZKoxP: "xdk7pt",
|
|
70
|
+
kmuXW: "x2lah0s",
|
|
71
|
+
$$css: !0
|
|
72
|
+
}, m = { swatch: (e) => [
|
|
73
|
+
p,
|
|
74
|
+
{
|
|
75
|
+
kWkggS: e == null ? e : "xl8spv7",
|
|
76
|
+
$$css: !0
|
|
77
|
+
},
|
|
78
|
+
{ "--x-backgroundColor": e ?? void 0 }
|
|
79
|
+
] };
|
|
80
|
+
function h({ series: e, values: t }) {
|
|
81
|
+
return Object.keys(t).length === e.length && e.every((e) => Object.hasOwn(t, e.id)) ? /* @__PURE__ */ l("dl", {
|
|
82
|
+
"aria-label": "Period summary",
|
|
83
|
+
className: "x78zum5 x1a02dak xaml1ju x1ghz6dp xeuugli",
|
|
84
|
+
children: e.map((e, n) => /* @__PURE__ */ u("div", {
|
|
85
|
+
...{
|
|
86
|
+
0: { className: "xeuugli" },
|
|
87
|
+
1: { className: "xeuugli xo02m6d xpilrb4 x1t7ytsu x97x49r" }
|
|
88
|
+
}[n > 0 | 0],
|
|
89
|
+
children: [/* @__PURE__ */ u("dt", {
|
|
90
|
+
className: "x78zum5 x6s0dn4 xunmzkg x153jb6y xy8obcc",
|
|
91
|
+
children: [/* @__PURE__ */ l("span", {
|
|
92
|
+
"aria-hidden": !0,
|
|
93
|
+
...s.props(m.swatch(d[e.tone]))
|
|
94
|
+
}), e.label]
|
|
95
|
+
}), /* @__PURE__ */ l("dd", {
|
|
96
|
+
className: "x1ghz6dp xbixft x71lla1 xgkpprq xk4h15q x1wjjqco xss6m8b xj0a0fe",
|
|
97
|
+
children: t[e.id] === void 0 ? /* @__PURE__ */ l(r, { width: "6ch" }) : t[e.id]
|
|
98
|
+
})]
|
|
99
|
+
}, e.id))
|
|
100
|
+
}) : /* @__PURE__ */ l(i, {
|
|
101
|
+
hasError: !0,
|
|
102
|
+
children: "Period values must match the chart series identifiers."
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
// packages/charts/src/chart-frame.tsx
|
|
106
|
+
var g = {
|
|
107
|
+
kzqmXN: "x1xc55vz",
|
|
108
|
+
kZKoxP: "xdk7pt",
|
|
109
|
+
kmuXW: "x2lah0s",
|
|
110
|
+
$$css: !0
|
|
111
|
+
}, _ = { swatch: (e) => [
|
|
112
|
+
g,
|
|
113
|
+
{
|
|
114
|
+
kWkggS: e == null ? e : "xl8spv7",
|
|
115
|
+
$$css: !0
|
|
116
|
+
},
|
|
117
|
+
{ "--x-backgroundColor": e ?? void 0 }
|
|
118
|
+
] };
|
|
119
|
+
function v({ title: e, description: n, children: r, actions: i, footer: a, report: o, series: s = [] }) {
|
|
120
|
+
let d = c();
|
|
121
|
+
if (o !== void 0) {
|
|
122
|
+
let c = o.seriesValues === void 0 ? o.summary : /* @__PURE__ */ l(h, {
|
|
123
|
+
series: s,
|
|
124
|
+
values: o.seriesValues
|
|
125
|
+
});
|
|
126
|
+
return /* @__PURE__ */ u("figure", {
|
|
127
|
+
"aria-labelledby": d,
|
|
128
|
+
className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt xmkeg23 x1y0btm7 x1ey3b81",
|
|
129
|
+
children: [/* @__PURE__ */ l("figcaption", { children: /* @__PURE__ */ l(t, {
|
|
130
|
+
id: d,
|
|
131
|
+
title: e,
|
|
132
|
+
meta: o.meta,
|
|
133
|
+
actions: i
|
|
134
|
+
}) }), /* @__PURE__ */ u("div", {
|
|
135
|
+
className: "xeuugli xg7ukam",
|
|
136
|
+
children: [
|
|
137
|
+
c !== void 0 && /* @__PURE__ */ l("div", {
|
|
138
|
+
className: "x1xxlxpq xeuugli",
|
|
139
|
+
children: c
|
|
140
|
+
}),
|
|
141
|
+
n !== void 0 && /* @__PURE__ */ l("p", {
|
|
142
|
+
className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
|
|
143
|
+
children: n
|
|
144
|
+
}),
|
|
145
|
+
r,
|
|
146
|
+
a !== void 0 && /* @__PURE__ */ l("div", {
|
|
147
|
+
className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
148
|
+
children: a
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
})]
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return /* @__PURE__ */ u("figure", {
|
|
155
|
+
"aria-labelledby": d,
|
|
156
|
+
className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt",
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ u("figcaption", {
|
|
159
|
+
className: "x78zum5 x1a02dak x1qughib x7a106z x1n8ia3y x1wv5www",
|
|
160
|
+
children: [/* @__PURE__ */ u("div", {
|
|
161
|
+
className: "x1cqoux5 xeuugli xj0a0fe",
|
|
162
|
+
children: [/* @__PURE__ */ l("p", {
|
|
163
|
+
id: d,
|
|
164
|
+
className: "x1ghz6dp x12myhf4 x1778rvt xk4h15q",
|
|
165
|
+
children: e
|
|
166
|
+
}), n !== void 0 && /* @__PURE__ */ l("p", {
|
|
167
|
+
className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
|
|
168
|
+
children: n
|
|
169
|
+
})]
|
|
170
|
+
}), i !== void 0 && /* @__PURE__ */ l("div", {
|
|
171
|
+
className: "x78zum5 x1a02dak x1hnptsi x193iq5w",
|
|
172
|
+
children: i
|
|
173
|
+
})]
|
|
174
|
+
}),
|
|
175
|
+
r,
|
|
176
|
+
a !== void 0 && /* @__PURE__ */ l("div", {
|
|
177
|
+
className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
178
|
+
children: a
|
|
179
|
+
})
|
|
180
|
+
]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function y({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
|
|
184
|
+
return /* @__PURE__ */ l("ul", {
|
|
185
|
+
"aria-label": t,
|
|
186
|
+
...{
|
|
187
|
+
0: { className: "x78zum5 x1a02dak x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k" },
|
|
188
|
+
1: { className: "x78zum5 x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k xozqiw3 xw2csxc x1mqbd49" }
|
|
189
|
+
}[!!n | 0],
|
|
190
|
+
children: e.map((e) => /* @__PURE__ */ u("li", {
|
|
191
|
+
...{
|
|
192
|
+
0: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli x193iq5w xj0a0fe" },
|
|
193
|
+
1: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli xj0a0fe x2lah0s x1x1rfll xuxw1ft" }
|
|
194
|
+
}[!!n | 0],
|
|
195
|
+
children: [/* @__PURE__ */ l("span", {
|
|
196
|
+
"aria-hidden": !0,
|
|
197
|
+
...s.props(_.swatch(d[e.tone]))
|
|
198
|
+
}), e.label]
|
|
199
|
+
}, e.id))
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function b({ label: e, isSelected: t = !1, onSelect: n, children: r }) {
|
|
203
|
+
return n === void 0 ? /* @__PURE__ */ l("div", {
|
|
204
|
+
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
|
|
205
|
+
children: r
|
|
206
|
+
}) : /* @__PURE__ */ l("button", {
|
|
207
|
+
type: "button",
|
|
208
|
+
"aria-label": e,
|
|
209
|
+
"aria-pressed": t,
|
|
210
|
+
onClick: n,
|
|
211
|
+
...{
|
|
212
|
+
0: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal" },
|
|
213
|
+
1: { className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xss6m8b x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1r7kqkb xh3r7i3" }
|
|
214
|
+
}[!!t | 0],
|
|
215
|
+
children: r
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function x({ children: e }) {
|
|
219
|
+
return /* @__PURE__ */ l("p", {
|
|
220
|
+
"aria-live": "polite",
|
|
221
|
+
className: "x1ghz6dp xeuugli x1mqbd49 xbixft xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
222
|
+
children: e
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
function S({ children: t, label: r = "View data" }) {
|
|
226
|
+
let i = n();
|
|
227
|
+
return /* @__PURE__ */ l("div", {
|
|
228
|
+
className: "x1xxf3xd x178xt8z x13fuv20 xhjagg4",
|
|
229
|
+
children: /* @__PURE__ */ u(e.Root, { children: [/* @__PURE__ */ l(e.Trigger, { children: r }), /* @__PURE__ */ l(e.Panel, { children: /* @__PURE__ */ l("div", {
|
|
230
|
+
ref: i.ref,
|
|
231
|
+
role: "region",
|
|
232
|
+
"aria-label": r,
|
|
233
|
+
tabIndex: i.tabIndex,
|
|
234
|
+
className: "xeuugli x1sslpiy xysyzu8 x1t137rt x19rmrnh x9v5kkp x13qnu6 x1bqaal",
|
|
235
|
+
children: t
|
|
236
|
+
}) })] })
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
export { x as a, y as i, b as n, f as o, v as r, d as s, S as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e } from "./src-
|
|
2
|
-
import { r as t } from "./chart-frame-
|
|
1
|
+
import { m as e } from "./src-eWcNz_oB.js";
|
|
2
|
+
import { r as t } from "./chart-frame-CYdrUwvP.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
// packages/charts/src/chart-input.tsx
|
|
5
5
|
function r(e) {
|
|
@@ -8,10 +8,11 @@ function r(e) {
|
|
|
8
8
|
function i(e) {
|
|
9
9
|
return new Set(e.map((e) => e.id)).size === e.length;
|
|
10
10
|
}
|
|
11
|
-
function a({ title: r, description: i, message: a }) {
|
|
11
|
+
function a({ title: r, description: i, message: a, report: o }) {
|
|
12
12
|
return /* @__PURE__ */ n(t, {
|
|
13
13
|
title: r,
|
|
14
14
|
description: i,
|
|
15
|
+
report: o,
|
|
15
16
|
children: /* @__PURE__ */ n(e, {
|
|
16
17
|
hasError: !0,
|
|
17
18
|
children: a
|