@mechane-ai/elements 0.32.0 → 0.33.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 +20 -14
- package/dist/ai.js +43 -43
- package/dist/{categorical-values-BXPE0Cjs.js → categorical-values-bWZBzMpX.js} +2 -2
- package/dist/{chart-frame-Degqwy_z.js → chart-frame-Cr4P6MF5.js} +77 -76
- package/dist/{chart-input-B12En69_.js → chart-input-3wX0JoPE.js} +2 -2
- package/dist/charts/cartesian.js +6 -6
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +3 -3
- package/dist/charts.js +1 -1
- package/dist/{code-block-B_qJ1JJ3.js → code-block-DT1TCkTC.js} +1 -1
- package/dist/collections.js +47 -46
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +2 -2
- 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-BtaiSKk8.js → content-link-B3ObdyZY.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/elements.css +6 -10
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/header-styles-COxCYFZx.js +90 -0
- package/dist/index.js +1 -1
- package/dist/layout.js +126 -124
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation.js +171 -76
- package/dist/packages/navigation/src/page-navigation.d.ts +4 -2
- package/dist/packages/navigation/src/tab-styles.d.ts +89 -0
- package/dist/{pierre-tree-CPhT5CUP.js → pierre-tree-Dd5Vd79M.js} +2 -2
- package/dist/{src-BjmKVOb2.js → src-BOZsJ8td.js} +18 -18
- package/dist/{src-CALHXF-U.js → src-C-Sx37kz.js} +373 -458
- package/dist/{src-BPIIuMeE.js → src-CD6veX7n.js} +133 -133
- package/dist/{src-DfPfFOu1.js → src-D9DktxEq.js} +17 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,6 +111,11 @@ initials or photo trigger. Applications supply selection, URLs, native link hand
|
|
|
111
111
|
rail for a sidebar that collapses to page icons. `SidebarFooter layout="navigation"` holds persistent controls in the
|
|
112
112
|
contextual sidebar and reserves their intrinsic height while its pages scroll independently.
|
|
113
113
|
|
|
114
|
+
`PageNavigation` uses real destination links; `Tabs` switches associated local panels with keyboard tab semantics. Both
|
|
115
|
+
share the same typography, height, inset and selected indicator. Supply view controls through `PageNavigation.actions`
|
|
116
|
+
so the links keep their own scroll region. Do not wrap page navigation in another padded collection toolbar. A
|
|
117
|
+
collection's title and controls belong in one named header; applied filter chips may follow it.
|
|
118
|
+
|
|
114
119
|
Navigation closes the mobile drawer and preserves focus set by the destination. Use
|
|
115
120
|
`NavigationItem shouldCloseOnActivate={false}` for menu triggers.
|
|
116
121
|
|
|
@@ -157,20 +162,21 @@ record and store named choices rather than catalog indexes. Identity palettes re
|
|
|
157
162
|
|
|
158
163
|
`MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
|
|
159
164
|
record summaries. `Metric` offers `statistic` and `headline` variants, a concise `detail`, and a passive `trend` slot.
|
|
160
|
-
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
outside `PageContent` so their cell insets remain the only gutter. `ReportContent` owns the inset
|
|
168
|
-
`summary` and leaves its `breakdown` full width. Pass summary content directly; omit it when a section
|
|
169
|
-
rows. Absent, `null` and `false` summaries reserve no empty space. `ContentTabs` uses `defaultSelectedId`
|
|
170
|
-
local choice or `navigation` for application-controlled links; the two modes are mutually exclusive.
|
|
171
|
-
keeps wide tables inside their scroll region, and `SettingsRow` aligns labels and controls. Use
|
|
172
|
-
decorative row without a control ID; ready rows require a real `controlId` for their label.
|
|
173
|
-
submission rows and their internal spacing. The enclosing section owns the gap before and after the
|
|
165
|
+
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data.
|
|
166
|
+
|
|
167
|
+
Use a chart's `report` input for a self-contained analytical report with a compact caption, period summary and plot. The
|
|
168
|
+
[chart guide](https://github.com/mechane-ai/mechane/blob/main/workspaces/core/docs/ui-charts.md#composition) explains
|
|
169
|
+
summary choices, scoped actions and matching placeholders, with links to the maintained examples. Embedded charts use
|
|
170
|
+
their ordinary frame within the containing region. The application owns periods, aggregates, coverage and read state.
|
|
171
|
+
|
|
172
|
+
Keep full-width tables outside `PageContent` so their cell insets remain the only gutter. `ReportContent` owns the inset
|
|
173
|
+
for its optional `summary` and leaves its `breakdown` full width. Pass summary content directly; omit it when a section
|
|
174
|
+
contains only rows. Absent, `null` and `false` summaries reserve no empty space. `ContentTabs` uses `defaultSelectedId`
|
|
175
|
+
for an initial local choice or `navigation` for application-controlled links; the two modes are mutually exclusive.
|
|
176
|
+
`SettingsSection` keeps wide tables inside their scroll region, and `SettingsRow` aligns labels and controls. Use
|
|
177
|
+
`isPlaceholder` on a decorative row without a control ID; ready rows require a real `controlId` for their label.
|
|
178
|
+
`FormActions` owns submission rows and their internal spacing. The enclosing section owns the gap before and after the
|
|
179
|
+
actions.
|
|
174
180
|
|
|
175
181
|
Elements 0.29 removes `ReportSection`. Move its metric summary into the explanatory chart's `report.summary` or
|
|
176
182
|
`report.seriesValues`. Use ordinary `Stack` composition when content already belongs to an existing region.
|
package/dist/ai.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as e, E as t,
|
|
2
|
-
import { t as u } from "./code-block-
|
|
3
|
-
import { a as d } from "./src-
|
|
4
|
-
import { t as f } from "./content-link-
|
|
1
|
+
import { D as e, E as t, T as n, _ as r, i, j as a, m as o, p as s, t as c, w as l } from "./src-C-Sx37kz.js";
|
|
2
|
+
import { t as u } from "./code-block-DT1TCkTC.js";
|
|
3
|
+
import { a as d } from "./src-D9DktxEq.js";
|
|
4
|
+
import { t as f } from "./content-link-B3ObdyZY.js";
|
|
5
5
|
import { r as p, t as m } from "./src-d7EAi61b.js";
|
|
6
|
-
import { c as h, d as g } from "./src-
|
|
7
|
-
import { c as _, u as ee } from "./src-
|
|
6
|
+
import { c as h, d as g } from "./src-BOZsJ8td.js";
|
|
7
|
+
import { c as _, u as ee } from "./src-CD6veX7n.js";
|
|
8
8
|
import { t as v } from "./accessibility-C-aIZ1Yx.js";
|
|
9
9
|
import { t as y } from "./visible-motion-1GcUaEi4.js";
|
|
10
10
|
import * as b from "@stylexjs/stylex";
|
|
@@ -28,14 +28,14 @@ function R(e) {
|
|
|
28
28
|
children: e.description
|
|
29
29
|
}),
|
|
30
30
|
e.children,
|
|
31
|
-
e.status === "pending" ? /* @__PURE__ */ k(s, { children: [/* @__PURE__ */ O(
|
|
31
|
+
e.status === "pending" ? /* @__PURE__ */ k(s, { children: [/* @__PURE__ */ O(l, {
|
|
32
32
|
variant: "solid",
|
|
33
33
|
onClick: e.onApprove,
|
|
34
34
|
disabled: e.isDisabled === !0 || e.busy !== void 0,
|
|
35
35
|
isPending: e.busy === "approve",
|
|
36
36
|
pendingLabel: "Approving…",
|
|
37
37
|
children: e.approveLabel ?? "Approve"
|
|
38
|
-
}), /* @__PURE__ */ O(
|
|
38
|
+
}), /* @__PURE__ */ O(l, {
|
|
39
39
|
onClick: e.onDeny,
|
|
40
40
|
disabled: e.isDisabled === !0 || e.busy !== void 0,
|
|
41
41
|
isPending: e.busy === "deny",
|
|
@@ -46,11 +46,11 @@ function R(e) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
// packages/ai/src/command-details.tsx
|
|
49
|
-
function z({ command: e, output: t, commandNotice: n, outputNotice: r, outputLanguage:
|
|
50
|
-
return /* @__PURE__ */ k(
|
|
49
|
+
function z({ command: e, output: t, commandNotice: n, outputNotice: r, outputLanguage: a, isRunning: s = !1 }) {
|
|
50
|
+
return /* @__PURE__ */ k(o, {
|
|
51
51
|
isCompact: !0,
|
|
52
52
|
children: [
|
|
53
|
-
e === "" && n !== void 0 ? /* @__PURE__ */ O(
|
|
53
|
+
e === "" && n !== void 0 ? /* @__PURE__ */ O(i, { children: "Command omitted from this preview." }) : e === void 0 ? /* @__PURE__ */ O(i, { children: s ? "Preparing command…" : "Command unavailable." }) : /* @__PURE__ */ O(u, {
|
|
54
54
|
code: e,
|
|
55
55
|
language: "bash",
|
|
56
56
|
filename: "Command",
|
|
@@ -59,15 +59,15 @@ function z({ command: e, output: t, commandNotice: n, outputNotice: r, outputLan
|
|
|
59
59
|
shouldWrap: !0,
|
|
60
60
|
maxHeight: 240
|
|
61
61
|
}),
|
|
62
|
-
n !== void 0 && /* @__PURE__ */ O(
|
|
63
|
-
t === void 0 || t.length === 0 ? /* @__PURE__ */ O(
|
|
62
|
+
n !== void 0 && /* @__PURE__ */ O(i, { children: n }),
|
|
63
|
+
t === void 0 || t.length === 0 ? /* @__PURE__ */ O(i, { children: s ? "Waiting for output…" : t === void 0 ? "Output unavailable." : r === void 0 ? "No output." : "Output omitted from this preview." }) : a === void 0 ? /* @__PURE__ */ O(d, {
|
|
64
64
|
output: t,
|
|
65
65
|
label: "Output",
|
|
66
66
|
variant: "embedded",
|
|
67
67
|
isRunning: s
|
|
68
68
|
}) : /* @__PURE__ */ O(u, {
|
|
69
69
|
code: t,
|
|
70
|
-
language:
|
|
70
|
+
language: a,
|
|
71
71
|
filename: "Output",
|
|
72
72
|
variant: "embedded",
|
|
73
73
|
showLineNumbers: !1,
|
|
@@ -75,7 +75,7 @@ function z({ command: e, output: t, commandNotice: n, outputNotice: r, outputLan
|
|
|
75
75
|
isStreaming: s,
|
|
76
76
|
maxHeight: 320
|
|
77
77
|
}),
|
|
78
|
-
r !== void 0 && /* @__PURE__ */ O(
|
|
78
|
+
r !== void 0 && /* @__PURE__ */ O(i, { children: r })
|
|
79
79
|
]
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -89,10 +89,10 @@ var B = {
|
|
|
89
89
|
unknown: "Outcome unknown"
|
|
90
90
|
}, V = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
91
91
|
function H({ status: e, ...t }) {
|
|
92
|
-
let n = t.command?.trim().split(/\r\n|\n|\r/u)[0],
|
|
93
|
-
return /* @__PURE__ */ k(
|
|
92
|
+
let n = t.command?.trim().split(/\r\n|\n|\r/u)[0], i = n === void 0 || n.length === 0 ? "Command" : n;
|
|
93
|
+
return /* @__PURE__ */ k(r.Root, {
|
|
94
94
|
defaultOpen: !1,
|
|
95
|
-
children: [/* @__PURE__ */ O(
|
|
95
|
+
children: [/* @__PURE__ */ O(r.Trigger, {
|
|
96
96
|
variant: "inline",
|
|
97
97
|
children: /* @__PURE__ */ k("span", {
|
|
98
98
|
className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli",
|
|
@@ -104,7 +104,7 @@ function H({ status: e, ...t }) {
|
|
|
104
104
|
}),
|
|
105
105
|
/* @__PURE__ */ O("span", {
|
|
106
106
|
className: "xiard35 xy8obcc xeuugli xb3r6kr xlyipyv x1sdyfia",
|
|
107
|
-
children:
|
|
107
|
+
children: i
|
|
108
108
|
}),
|
|
109
109
|
B[e].length > 0 && /* @__PURE__ */ O("span", {
|
|
110
110
|
className: "x2lah0s xy8obcc x153jb6y",
|
|
@@ -112,7 +112,7 @@ function H({ status: e, ...t }) {
|
|
|
112
112
|
})
|
|
113
113
|
]
|
|
114
114
|
})
|
|
115
|
-
}), /* @__PURE__ */ O(
|
|
115
|
+
}), /* @__PURE__ */ O(r.Panel, { children: /* @__PURE__ */ O(z, {
|
|
116
116
|
...t,
|
|
117
117
|
isRunning: V.has(e)
|
|
118
118
|
}) })]
|
|
@@ -188,7 +188,7 @@ function Y({ label: e = "Jump to latest" }) {
|
|
|
188
188
|
}
|
|
189
189
|
function X({ label: e, onActivate: t }) {
|
|
190
190
|
let { scrollToEnd: n } = I(), r = S(U);
|
|
191
|
-
return /* @__PURE__ */ k(
|
|
191
|
+
return /* @__PURE__ */ k(l, {
|
|
192
192
|
onClick: () => {
|
|
193
193
|
t?.(), requestAnimationFrame(() => {
|
|
194
194
|
let e = r?.current;
|
|
@@ -327,16 +327,16 @@ function oe({ name: e, description: t, href: n, actions: r }) {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
// packages/ai/src/message-action.tsx
|
|
330
|
-
function se(
|
|
331
|
-
if (
|
|
332
|
-
let { kind:
|
|
333
|
-
return /* @__PURE__ */ O(
|
|
330
|
+
function se(e) {
|
|
331
|
+
if (e.kind === "link") {
|
|
332
|
+
let { kind: n, label: r, ...i } = e;
|
|
333
|
+
return /* @__PURE__ */ O(t, {
|
|
334
334
|
...i,
|
|
335
335
|
"aria-label": r
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
|
-
let { kind: r, label: i, ...a } =
|
|
339
|
-
return /* @__PURE__ */ O(
|
|
338
|
+
let { kind: r, label: i, ...a } = e;
|
|
339
|
+
return /* @__PURE__ */ O(n, {
|
|
340
340
|
...a,
|
|
341
341
|
variant: "ghost",
|
|
342
342
|
"aria-label": i
|
|
@@ -347,9 +347,9 @@ function ce(e) {
|
|
|
347
347
|
}
|
|
348
348
|
// packages/ai/src/message-boundary.tsx
|
|
349
349
|
function le({ label: e, children: t }) {
|
|
350
|
-
return /* @__PURE__ */ k(
|
|
350
|
+
return /* @__PURE__ */ k(r.Root, {
|
|
351
351
|
className: "xeuugli x1kbiq1m xykt701 xpu655y",
|
|
352
|
-
children: [/* @__PURE__ */ k(
|
|
352
|
+
children: [/* @__PURE__ */ k(r.Trigger, {
|
|
353
353
|
className: "xlqzeqv x1hnptsi x153jb6y xy8obcc xas2l8k xj57cvi",
|
|
354
354
|
children: [/* @__PURE__ */ O(N, {
|
|
355
355
|
size: 14,
|
|
@@ -359,7 +359,7 @@ function le({ label: e, children: t }) {
|
|
|
359
359
|
className: "xeuugli xj0a0fe",
|
|
360
360
|
children: e
|
|
361
361
|
})]
|
|
362
|
-
}), /* @__PURE__ */ O(
|
|
362
|
+
}), /* @__PURE__ */ O(r.Panel, {
|
|
363
363
|
className: "x153jb6y xy8obcc xas2l8k",
|
|
364
364
|
children: t
|
|
365
365
|
})]
|
|
@@ -385,7 +385,7 @@ function ue({ isCompact: e = !1 }) {
|
|
|
385
385
|
children: /* @__PURE__ */ k("div", {
|
|
386
386
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j x1r7kqkb x1gd1hh4 x1u8w8hx x14xc8xn x1nvizq4 xgzwmep",
|
|
387
387
|
children: [/* @__PURE__ */ O("div", {
|
|
388
|
-
...b.props(
|
|
388
|
+
...b.props(a.base, a.field, a.textarea, a.plainTextarea),
|
|
389
389
|
children: /* @__PURE__ */ O(g, {
|
|
390
390
|
lines: e ? 1 : 2,
|
|
391
391
|
width: "22ch"
|
|
@@ -403,7 +403,7 @@ function ue({ isCompact: e = !1 }) {
|
|
|
403
403
|
})
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
|
-
function de({ label: e, value:
|
|
406
|
+
function de({ 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: d = !1, submitLabel: f = "Send message", pendingLabel: p = "Sending…", enterBehavior: h = "newline", isCompact: g = !1, description: y, error: x, controls: S, attachments: C, onStop: T, isStopPending: E = !1, stopLabel: D = "Stop response" }) {
|
|
407
407
|
let A = w(), M = u, N = g && C === void 0 && S === void 0, P = !M && !l && !d, F = f;
|
|
408
408
|
T === void 0 ? l ? F = p : h === "submit" && (F = `${f} · Enter`) : F = E ? "Stopping…" : D;
|
|
409
409
|
function I(e) {
|
|
@@ -439,7 +439,7 @@ function de({ label: e, value: n, onValueChange: r, onSubmit: i, name: a = "prom
|
|
|
439
439
|
shouldGrow: N,
|
|
440
440
|
xstyle: N ? $.inlineInput : void 0,
|
|
441
441
|
name: a,
|
|
442
|
-
value:
|
|
442
|
+
value: t,
|
|
443
443
|
onChange: (e) => r(e.currentTarget.value),
|
|
444
444
|
onKeyDown: I,
|
|
445
445
|
placeholder: o ?? e,
|
|
@@ -457,7 +457,7 @@ function de({ label: e, value: n, onValueChange: r, onSubmit: i, name: a = "prom
|
|
|
457
457
|
children: [S !== void 0 && /* @__PURE__ */ O("div", {
|
|
458
458
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli x12lumcd",
|
|
459
459
|
children: S
|
|
460
|
-
}), /* @__PURE__ */ k(m.Root, { children: [/* @__PURE__ */ O(m.Trigger, { render: T === void 0 ? /* @__PURE__ */ O(
|
|
460
|
+
}), /* @__PURE__ */ k(m.Root, { children: [/* @__PURE__ */ O(m.Trigger, { render: T === void 0 ? /* @__PURE__ */ O(n, {
|
|
461
461
|
xstyle: $.action,
|
|
462
462
|
type: "submit",
|
|
463
463
|
variant: "solid",
|
|
@@ -468,7 +468,7 @@ function de({ label: e, value: n, onValueChange: r, onSubmit: i, name: a = "prom
|
|
|
468
468
|
size: 16,
|
|
469
469
|
"aria-hidden": !0
|
|
470
470
|
})
|
|
471
|
-
}) : /* @__PURE__ */ O(
|
|
471
|
+
}) : /* @__PURE__ */ O(n, {
|
|
472
472
|
xstyle: $.action,
|
|
473
473
|
type: "button",
|
|
474
474
|
"aria-label": E ? "Stopping…" : D,
|
|
@@ -547,22 +547,22 @@ function pe({ sources: e, label: t = "Sources" }) {
|
|
|
547
547
|
]
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
|
-
function me({ source:
|
|
550
|
+
function me({ source: t, label: n }) {
|
|
551
551
|
return /* @__PURE__ */ O("span", {
|
|
552
552
|
className: "xt0psk2 x11njtxf xss6m8b",
|
|
553
553
|
children: /* @__PURE__ */ k(p.Root, { children: [/* @__PURE__ */ O(p.Trigger, {
|
|
554
|
-
render: /* @__PURE__ */ O(
|
|
555
|
-
"aria-label": `Source ${
|
|
556
|
-
children:
|
|
554
|
+
render: /* @__PURE__ */ O(e, {}),
|
|
555
|
+
"aria-label": `Source ${n}: ${t.title}`,
|
|
556
|
+
children: n
|
|
557
557
|
}), /* @__PURE__ */ O(p.Portal, { children: /* @__PURE__ */ O(p.Positioner, {
|
|
558
558
|
side: "top",
|
|
559
|
-
children: /* @__PURE__ */ O(p.Popup, { children: /* @__PURE__ */ k(
|
|
559
|
+
children: /* @__PURE__ */ O(p.Popup, { children: /* @__PURE__ */ k(o, {
|
|
560
560
|
isCompact: !0,
|
|
561
561
|
children: [
|
|
562
|
-
/* @__PURE__ */ O(p.Title, { children:
|
|
563
|
-
|
|
562
|
+
/* @__PURE__ */ O(p.Title, { children: t.title }),
|
|
563
|
+
t.description !== void 0 && /* @__PURE__ */ O(p.Description, { children: t.description }),
|
|
564
564
|
/* @__PURE__ */ O(f, {
|
|
565
|
-
href:
|
|
565
|
+
href: t.href,
|
|
566
566
|
children: "Open source"
|
|
567
567
|
})
|
|
568
568
|
]
|
|
@@ -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-Cr4P6MF5.js";
|
|
2
|
+
import { n } from "./chart-input-3wX0JoPE.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
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as e } from "./src-C-Sx37kz.js";
|
|
2
|
+
import { t } from "./header-styles-COxCYFZx.js";
|
|
2
3
|
import { t as n } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
3
|
-
import { d as r, m as i } from "./src-
|
|
4
|
+
import { d as r, m as i } from "./src-BOZsJ8td.js";
|
|
4
5
|
import { n as a, r as o } from "./tokens.stylex-CJbIDPB9.js";
|
|
5
6
|
import * as s from "@stylexjs/stylex";
|
|
6
7
|
import { Children as c, useId as l } from "react";
|
|
7
|
-
import {
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
9
|
// packages/charts/src/chart-heading.tsx
|
|
9
|
-
var
|
|
10
|
+
var p = { root: {
|
|
10
11
|
k1C7PZ: "x8zbtdt",
|
|
11
12
|
khm7nJ: "x1gkm1c7",
|
|
12
13
|
kMwMTN: "xbixft",
|
|
@@ -15,28 +16,28 @@ var f = { root: {
|
|
|
15
16
|
kLWn49: "x1778rvt",
|
|
16
17
|
$$css: !0
|
|
17
18
|
} };
|
|
18
|
-
function
|
|
19
|
-
let a = c.toArray(r).length > 0, o = c.toArray(i).length > 0, l = a || o,
|
|
20
|
-
...s.props(
|
|
19
|
+
function m({ title: e, id: n, meta: r, actions: i }) {
|
|
20
|
+
let a = c.toArray(r).length > 0, o = c.toArray(i).length > 0, l = a || o, u = a && /* @__PURE__ */ d("div", {
|
|
21
|
+
...s.props(t.meta),
|
|
21
22
|
children: r
|
|
22
|
-
}), m = o && /* @__PURE__ */
|
|
23
|
-
...s.props(
|
|
23
|
+
}), m = o && /* @__PURE__ */ d("div", {
|
|
24
|
+
...s.props(t.actions),
|
|
24
25
|
children: i
|
|
25
26
|
});
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
...s.props(
|
|
28
|
-
children: [/* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ f("div", {
|
|
28
|
+
...s.props(t.row, t.reportRow, p.root),
|
|
29
|
+
children: [/* @__PURE__ */ d("p", {
|
|
29
30
|
id: n,
|
|
30
|
-
...s.props(
|
|
31
|
-
children:
|
|
32
|
-
}), l && /* @__PURE__ */
|
|
33
|
-
...s.props(
|
|
34
|
-
children: [
|
|
31
|
+
...s.props(t.title),
|
|
32
|
+
children: e
|
|
33
|
+
}), l && /* @__PURE__ */ f("div", {
|
|
34
|
+
...s.props(t.trailing),
|
|
35
|
+
children: [u, m]
|
|
35
36
|
})]
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
// packages/charts/src/chart-theme.ts
|
|
39
|
-
var
|
|
40
|
+
var h = {
|
|
40
41
|
series1: a.series1,
|
|
41
42
|
series2: a.series2,
|
|
42
43
|
series3: a.series3,
|
|
@@ -46,7 +47,7 @@ var m = {
|
|
|
46
47
|
positive: a.positive,
|
|
47
48
|
negative: a.negative,
|
|
48
49
|
neutral: o.muted
|
|
49
|
-
},
|
|
50
|
+
}, g = {
|
|
50
51
|
plot: {
|
|
51
52
|
k7Eaqz: "xeuugli",
|
|
52
53
|
kVQacm: "xb3r6kr",
|
|
@@ -94,86 +95,86 @@ var m = {
|
|
|
94
95
|
k3XXqK: "x1t137rt",
|
|
95
96
|
$$css: !0
|
|
96
97
|
}
|
|
97
|
-
},
|
|
98
|
+
}, _ = {
|
|
98
99
|
kzqmXN: "x1xc55vz",
|
|
99
100
|
kZKoxP: "xdk7pt",
|
|
100
101
|
kmuXW: "x2lah0s",
|
|
101
102
|
$$css: !0
|
|
102
|
-
},
|
|
103
|
-
|
|
103
|
+
}, v = { swatch: (e) => [
|
|
104
|
+
_,
|
|
104
105
|
{
|
|
105
106
|
kWkggS: e == null ? e : "xl8spv7",
|
|
106
107
|
$$css: !0
|
|
107
108
|
},
|
|
108
109
|
{ "--x-backgroundColor": e ?? void 0 }
|
|
109
110
|
] };
|
|
110
|
-
function
|
|
111
|
-
return Object.keys(t).length === e.length && e.every((e) => Object.hasOwn(t, e.id)) ? /* @__PURE__ */
|
|
111
|
+
function y({ series: e, values: t }) {
|
|
112
|
+
return Object.keys(t).length === e.length && e.every((e) => Object.hasOwn(t, e.id)) ? /* @__PURE__ */ d("dl", {
|
|
112
113
|
"aria-label": "Period summary",
|
|
113
114
|
className: "x78zum5 x1a02dak xaml1ju x1ghz6dp xeuugli",
|
|
114
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
115
|
+
children: e.map((e, n) => /* @__PURE__ */ f("div", {
|
|
115
116
|
...{
|
|
116
117
|
0: { className: "xeuugli" },
|
|
117
118
|
1: { className: "xeuugli xo02m6d xpilrb4 x1t7ytsu x97x49r" }
|
|
118
119
|
}[n > 0 | 0],
|
|
119
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
120
121
|
className: "x78zum5 x6s0dn4 xunmzkg x153jb6y xy8obcc",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ d("span", {
|
|
122
123
|
"aria-hidden": !0,
|
|
123
|
-
...s.props(
|
|
124
|
+
...s.props(v.swatch(h[e.tone]))
|
|
124
125
|
}), e.label]
|
|
125
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ d("dd", {
|
|
126
127
|
className: "x1ghz6dp xbixft x71lla1 xgkpprq xk4h15q x1wjjqco xss6m8b xj0a0fe",
|
|
127
|
-
children: t[e.id] === void 0 ? /* @__PURE__ */
|
|
128
|
+
children: t[e.id] === void 0 ? /* @__PURE__ */ d(r, { width: "6ch" }) : t[e.id]
|
|
128
129
|
})]
|
|
129
130
|
}, e.id))
|
|
130
|
-
}) : /* @__PURE__ */
|
|
131
|
+
}) : /* @__PURE__ */ d(i, {
|
|
131
132
|
hasError: !0,
|
|
132
133
|
children: "Period values must match the chart series identifiers."
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
// packages/charts/src/chart-frame.tsx
|
|
136
|
-
var
|
|
137
|
+
var b = {
|
|
137
138
|
kzqmXN: "x1xc55vz",
|
|
138
139
|
kZKoxP: "xdk7pt",
|
|
139
140
|
kmuXW: "x2lah0s",
|
|
140
141
|
$$css: !0
|
|
141
|
-
},
|
|
142
|
-
|
|
142
|
+
}, x = { swatch: (e) => [
|
|
143
|
+
b,
|
|
143
144
|
{
|
|
144
145
|
kWkggS: e == null ? e : "xl8spv7",
|
|
145
146
|
$$css: !0
|
|
146
147
|
},
|
|
147
148
|
{ "--x-backgroundColor": e ?? void 0 }
|
|
148
149
|
] };
|
|
149
|
-
function
|
|
150
|
-
let
|
|
150
|
+
function S({ title: e, description: n, children: r, actions: i, footer: a, report: o, series: p = [] }) {
|
|
151
|
+
let h = l();
|
|
151
152
|
if (o !== void 0) {
|
|
152
|
-
let
|
|
153
|
-
series:
|
|
153
|
+
let t = o.seriesValues === void 0 ? o.summary : /* @__PURE__ */ d(y, {
|
|
154
|
+
series: p,
|
|
154
155
|
values: o.seriesValues
|
|
155
|
-
}), s =
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
"aria-labelledby":
|
|
156
|
+
}), s = t != null && t !== !1, l = c.toArray([o.actions, i]).length > 0, g = /* @__PURE__ */ f(u, { children: [o.actions, i] });
|
|
157
|
+
return /* @__PURE__ */ f("figure", {
|
|
158
|
+
"aria-labelledby": h,
|
|
158
159
|
className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt xmkeg23 x1y0btm7 x1ey3b81",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
160
|
-
id:
|
|
161
|
-
title:
|
|
160
|
+
children: [/* @__PURE__ */ d("figcaption", { children: /* @__PURE__ */ d(m, {
|
|
161
|
+
id: h,
|
|
162
|
+
title: e,
|
|
162
163
|
meta: o.meta,
|
|
163
|
-
actions:
|
|
164
|
-
}) }), /* @__PURE__ */
|
|
164
|
+
actions: l && g
|
|
165
|
+
}) }), /* @__PURE__ */ f("div", {
|
|
165
166
|
className: "xeuugli xg7ukam",
|
|
166
167
|
children: [
|
|
167
|
-
s && /* @__PURE__ */
|
|
168
|
+
s && /* @__PURE__ */ d("div", {
|
|
168
169
|
className: "x1xxlxpq xeuugli",
|
|
169
|
-
children:
|
|
170
|
+
children: t
|
|
170
171
|
}),
|
|
171
|
-
n !== void 0 && /* @__PURE__ */
|
|
172
|
+
n !== void 0 && /* @__PURE__ */ d("p", {
|
|
172
173
|
className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
|
|
173
174
|
children: n
|
|
174
175
|
}),
|
|
175
176
|
r,
|
|
176
|
-
a !== void 0 && /* @__PURE__ */
|
|
177
|
+
a !== void 0 && /* @__PURE__ */ d("div", {
|
|
177
178
|
className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
178
179
|
children: a
|
|
179
180
|
})
|
|
@@ -181,59 +182,59 @@ function x({ title: t, description: n, children: r, actions: i, footer: a, repor
|
|
|
181
182
|
})]
|
|
182
183
|
});
|
|
183
184
|
}
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
-
"aria-labelledby":
|
|
185
|
+
return /* @__PURE__ */ f("figure", {
|
|
186
|
+
"aria-labelledby": h,
|
|
186
187
|
className: "xeuugli x1ghz6dp xbixft xpvm0e4 x1hz01jw xtqrqnz xj57cvi x1778rvt",
|
|
187
188
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ f("figcaption", {
|
|
189
190
|
className: "x78zum5 x1a02dak x1qughib x7a106z x1n8ia3y x1wv5www",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ f("div", {
|
|
191
192
|
className: "x1cqoux5 xeuugli xj0a0fe",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
193
|
-
id:
|
|
193
|
+
children: [/* @__PURE__ */ d("p", {
|
|
194
|
+
id: h,
|
|
194
195
|
className: "x1ghz6dp x12myhf4 x1778rvt xk4h15q",
|
|
195
|
-
children:
|
|
196
|
-
}), n !== void 0 && /* @__PURE__ */
|
|
196
|
+
children: e
|
|
197
|
+
}), n !== void 0 && /* @__PURE__ */ d("p", {
|
|
197
198
|
className: "x1ghz6dp x1c87qhr x153jb6y xy8obcc xas2l8k",
|
|
198
199
|
children: n
|
|
199
200
|
})]
|
|
200
|
-
}), i !== void 0 && /* @__PURE__ */
|
|
201
|
-
...s.props(
|
|
201
|
+
}), i !== void 0 && /* @__PURE__ */ d("div", {
|
|
202
|
+
...s.props(t.actions),
|
|
202
203
|
children: i
|
|
203
204
|
})]
|
|
204
205
|
}),
|
|
205
206
|
r,
|
|
206
|
-
a !== void 0 && /* @__PURE__ */
|
|
207
|
+
a !== void 0 && /* @__PURE__ */ d("div", {
|
|
207
208
|
className: "x1xxf3xd xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
208
209
|
children: a
|
|
209
210
|
})
|
|
210
211
|
]
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
-
return /* @__PURE__ */
|
|
214
|
+
function C({ items: e, label: t = "Legend", isScrollable: n = !1 }) {
|
|
215
|
+
return /* @__PURE__ */ d("ul", {
|
|
215
216
|
"aria-label": t,
|
|
216
217
|
...{
|
|
217
218
|
0: { className: "x78zum5 x1a02dak x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k" },
|
|
218
219
|
1: { className: "x78zum5 x8zbtdt x1gkm1c7 xe8uvvx x1ghz6dp x1717udv x153jb6y x1hz01jw xy8obcc xas2l8k xozqiw3 xw2csxc x1mqbd49" }
|
|
219
220
|
}[!!n | 0],
|
|
220
|
-
children: e.map((e) => /* @__PURE__ */
|
|
221
|
+
children: e.map((e) => /* @__PURE__ */ f("li", {
|
|
221
222
|
...{
|
|
222
223
|
0: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli x193iq5w xj0a0fe" },
|
|
223
224
|
1: { className: "x3nfvp2 x6s0dn4 xunmzkg xeuugli xj0a0fe x2lah0s x1x1rfll xuxw1ft" }
|
|
224
225
|
}[!!n | 0],
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ d("span", {
|
|
226
227
|
"aria-hidden": !0,
|
|
227
|
-
...s.props(
|
|
228
|
+
...s.props(x.swatch(h[e.tone]))
|
|
228
229
|
}), e.label]
|
|
229
230
|
}, e.id))
|
|
230
231
|
});
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
-
return n === void 0 ? /* @__PURE__ */
|
|
233
|
+
function w({ label: e, isSelected: t = !1, onSelect: n, children: r }) {
|
|
234
|
+
return n === void 0 ? /* @__PURE__ */ d("div", {
|
|
234
235
|
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x8zbtdt x1gkm1c7 xeuugli x17tes2r x17oiadl x9f619 xh8yej3 xc342km x1hmw7ec x5g2kb4 x1hz01jw xtqrqnz xj57cvi x1778rvt x1yc453h xj0a0fe xbixft xpvm0e4 xss6m8b",
|
|
235
236
|
children: r
|
|
236
|
-
}) : /* @__PURE__ */
|
|
237
|
+
}) : /* @__PURE__ */ d("button", {
|
|
237
238
|
type: "button",
|
|
238
239
|
"aria-label": e,
|
|
239
240
|
"aria-pressed": t,
|
|
@@ -245,25 +246,25 @@ function C({ label: e, isSelected: t = !1, onSelect: n, children: r }) {
|
|
|
245
246
|
children: r
|
|
246
247
|
});
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
-
return /* @__PURE__ */
|
|
249
|
+
function T({ children: e }) {
|
|
250
|
+
return /* @__PURE__ */ d("p", {
|
|
250
251
|
"aria-live": "polite",
|
|
251
252
|
className: "x1ghz6dp xeuugli x1mqbd49 xbixft xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
252
253
|
children: e
|
|
253
254
|
});
|
|
254
255
|
}
|
|
255
|
-
function
|
|
256
|
+
function E({ children: t, label: r = "View data" }) {
|
|
256
257
|
let i = n();
|
|
257
|
-
return /* @__PURE__ */
|
|
258
|
+
return /* @__PURE__ */ d("div", {
|
|
258
259
|
className: "x1xxf3xd x178xt8z x13fuv20 xhjagg4",
|
|
259
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ f(e.Root, { children: [/* @__PURE__ */ d(e.Trigger, { children: r }), /* @__PURE__ */ d(e.Panel, { children: /* @__PURE__ */ d("div", {
|
|
260
261
|
ref: i.ref,
|
|
261
262
|
role: "region",
|
|
262
263
|
"aria-label": r,
|
|
263
264
|
tabIndex: i.tabIndex,
|
|
264
265
|
className: "xeuugli x1sslpiy xysyzu8 x1t137rt x19rmrnh x9v5kkp x13qnu6 x1bqaal",
|
|
265
|
-
children:
|
|
266
|
+
children: t
|
|
266
267
|
}) })] })
|
|
267
268
|
});
|
|
268
269
|
}
|
|
269
|
-
export {
|
|
270
|
+
export { T as a, C as i, w as n, g as o, S as r, h as s, E 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-BOZsJ8td.js";
|
|
2
|
+
import { r as t } from "./chart-frame-Cr4P6MF5.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
// packages/charts/src/chart-input.tsx
|
|
5
5
|
function r(e) {
|
package/dist/charts/cartesian.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as e, u as t } from "../src-
|
|
2
|
-
import { i as n, n as r, r as i, t as a } from "../categorical-values-
|
|
3
|
-
import {
|
|
1
|
+
import { d as e, u as t } from "../src-BOZsJ8td.js";
|
|
2
|
+
import { i as n, n as r, r as i, t as a } from "../categorical-values-bWZBzMpX.js";
|
|
3
|
+
import { D as o } from "../src-C-Sx37kz.js";
|
|
4
4
|
import { t as s } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
5
5
|
import { s as c } from "../src-d7EAi61b.js";
|
|
6
|
-
import { a as l, n as u, o as d, r as f, s as p, t as m } from "../chart-frame-
|
|
7
|
-
import { n as h, r as g, t as _ } from "../chart-input-
|
|
6
|
+
import { a as l, n as u, o as d, r as f, s as p, t as m } from "../chart-frame-Cr4P6MF5.js";
|
|
7
|
+
import { n as h, r as g, t as _ } from "../chart-input-3wX0JoPE.js";
|
|
8
8
|
import { r as v } from "../tokens.stylex-CJbIDPB9.js";
|
|
9
9
|
import { t as y } from "../plot-width--OgdohB5.js";
|
|
10
|
-
import { g as b } from "../src-
|
|
10
|
+
import { g as b } from "../src-CD6veX7n.js";
|
|
11
11
|
import * as x from "@stylexjs/stylex";
|
|
12
12
|
import { useEffect as ee, useId as S, useMemo as te, useRef as ne, useState as C } from "react";
|
|
13
13
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-
|
|
2
|
-
import { n as a, r as o, t as s } from "../chart-input-
|
|
1
|
+
import { a as e, n as t, r as n, s as r, t as i } from "../chart-frame-Cr4P6MF5.js";
|
|
2
|
+
import { n as a, r as o, t as s } from "../chart-input-3wX0JoPE.js";
|
|
3
3
|
import { t as c } from "../plot-width--OgdohB5.js";
|
|
4
4
|
import * as l from "@stylexjs/stylex";
|
|
5
5
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
package/dist/charts/graph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
-
import { a as t, n, r, s as i, t as a } from "../chart-frame-
|
|
3
|
-
import { n as o, t as s } from "../chart-input-
|
|
2
|
+
import { a as t, n, r, s as i, t as a } from "../chart-frame-Cr4P6MF5.js";
|
|
3
|
+
import { n as o, t as s } from "../chart-input-3wX0JoPE.js";
|
|
4
4
|
import * as c from "@stylexjs/stylex";
|
|
5
5
|
import { useId as l } from "react";
|
|
6
6
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|