@mechane-ai/elements 0.27.0 → 0.28.1
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 +7 -3
- package/dist/ai.js +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/collections.js +7 -3
- package/dist/content/tree.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/layout.js +1 -1
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation.js +1 -1
- 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-tree-KSFewJrY.js → pierre-tree-D2kRr4h4.js} +1 -1
- package/dist/{src-DYwAhQHt.js → src-BfPaaDxg.js} +8 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,9 +151,13 @@ time-series charts also accept `report={{ meta, seriesValues }}`, a map of forma
|
|
|
151
151
|
identifier. It reuses their labels and colors as the legend. Undefined values reserve loading space. `SmallMultiples`
|
|
152
152
|
aligns date axes and inspection across panels, with one date axis at the bottom; its placeholder accepts the same report
|
|
153
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. `
|
|
155
|
-
|
|
156
|
-
|
|
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.
|
|
157
161
|
|
|
158
162
|
The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
|
|
159
163
|
`@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
|
package/dist/ai.js
CHANGED
|
@@ -2,7 +2,7 @@ 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
|
|
|
2
2
|
import { t as l } from "./content-link-5oRGjDHa.js";
|
|
3
3
|
import { r as u, t as d } from "./src-d7EAi61b.js";
|
|
4
4
|
import { c as f, d as p } from "./src-eWcNz_oB.js";
|
|
5
|
-
import { c as m, u as h } from "./src-
|
|
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";
|
package/dist/charts/cartesian.js
CHANGED
|
@@ -7,7 +7,7 @@ import { a as l, n as u, o as d, r as f, s as p, t as m } from "../chart-frame-C
|
|
|
7
7
|
import { n as h, r as g, t as _ } from "../chart-input--Q3Jdono.js";
|
|
8
8
|
import { r as v } from "../tokens.stylex-BoRZ3D8s.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-BfPaaDxg.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";
|
package/dist/collections.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as e, _ as t, c as n, p as r, w as i } from "./src-E3Or8tkO.js";
|
|
2
|
-
import { r as a } from "./src-
|
|
2
|
+
import { r as a } from "./src-BfPaaDxg.js";
|
|
3
3
|
import { r as o, t as s } from "./src-d7EAi61b.js";
|
|
4
4
|
import { d as c } from "./src-eWcNz_oB.js";
|
|
5
5
|
import { t as l } from "./accessibility-C-aIZ1Yx.js";
|
|
@@ -155,6 +155,7 @@ var pe = E({}), me = 76, j = d.compactTable.slice(7), he = /* @__PURE__ */ new M
|
|
|
155
155
|
},
|
|
156
156
|
viewport: {
|
|
157
157
|
k7Eaqz: "xeuugli",
|
|
158
|
+
k9g6sI: "x12h1iku",
|
|
158
159
|
kVQacm: "xysyzu8",
|
|
159
160
|
kacamN: "xy5w88m",
|
|
160
161
|
k3XXqK: "x1t137rt",
|
|
@@ -648,8 +649,11 @@ function V({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
|
|
|
648
649
|
}),
|
|
649
650
|
e.length === 0 && /* @__PURE__ */ b("tr", { children: /* @__PURE__ */ b("td", {
|
|
650
651
|
colSpan: $,
|
|
651
|
-
className: "
|
|
652
|
-
children:
|
|
652
|
+
className: "x1717udv",
|
|
653
|
+
children: /* @__PURE__ */ b("div", {
|
|
654
|
+
className: "x9f619 x7wzq59 x1o0tod xzfn7dr x193iq5w x1ttojsm x2b8uid xeaf4i8 xj0a0fe x153jb6y",
|
|
655
|
+
children: i
|
|
656
|
+
})
|
|
653
657
|
}) })
|
|
654
658
|
]
|
|
655
659
|
})
|
package/dist/content/tree.js
CHANGED
package/dist/forms.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { _ as AgentAvatarPicker, r as Checkbox, v as Combobox, c as Field, f as Fieldset, p as FilePicker, d as FormActions, l as Input, m as InputGroup, h as NumberField, i as RadioGroup, s as Select, n as SettingsRow, t as SettingsSection, g as Slider, a as Switch, u as Textarea, o as ToggleGroup } from "./src-
|
|
1
|
+
export { _ as AgentAvatarPicker, r as Checkbox, v as Combobox, c as Field, f as Fieldset, p as FilePicker, d as FormActions, l as Input, m as InputGroup, h as NumberField, i as RadioGroup, s as Select, n as SettingsRow, t as SettingsSection, g as Slider, a as Switch, u as Textarea, o as ToggleGroup } from "./src-BfPaaDxg.js";
|
package/dist/layout.js
CHANGED
|
@@ -679,7 +679,7 @@ function ue({ summary: e, breakdown: t }) {
|
|
|
679
679
|
return /* @__PURE__ */ w("div", {
|
|
680
680
|
"data-page-layout": "report",
|
|
681
681
|
className: "xeuugli",
|
|
682
|
-
children: [/* @__PURE__ */ C(Q, { children: e }), t]
|
|
682
|
+
children: [e != null && e !== !1 && /* @__PURE__ */ C(Q, { children: e }), t]
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
// packages/layout/src/collection-layout.tsx
|
package/dist/navigation.js
CHANGED
|
@@ -96,7 +96,7 @@ var h = {
|
|
|
96
96
|
};
|
|
97
97
|
// packages/navigation/src/content-tabs.tsx
|
|
98
98
|
function g(e) {
|
|
99
|
-
let [t, n] = i(e.items[0]?.id), r = e.navigation, s = r?.selectedId ?? t, c = e.items.find((e) => e.id === s) ?? e.items[0];
|
|
99
|
+
let [t, n] = i(e.defaultSelectedId ?? e.items[0]?.id), r = e.navigation, s = r?.selectedId ?? t, c = e.items.find((e) => e.id === s) ?? e.items[0];
|
|
100
100
|
return r === void 0 ? /* @__PURE__ */ o(h.Root, {
|
|
101
101
|
value: c?.id,
|
|
102
102
|
onValueChange: (e) => n(String(e)),
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
type SettingsRowContent = {
|
|
3
3
|
readonly label: string;
|
|
4
4
|
readonly description?: string;
|
|
5
|
-
readonly controlId: string;
|
|
6
5
|
readonly children: ReactNode;
|
|
7
6
|
};
|
|
8
|
-
export
|
|
7
|
+
export type SettingsRowProps = SettingsRowContent & ({
|
|
8
|
+
readonly isPlaceholder: true;
|
|
9
|
+
readonly controlId?: never;
|
|
10
|
+
} | {
|
|
11
|
+
readonly isPlaceholder?: false;
|
|
12
|
+
readonly controlId: string;
|
|
13
|
+
});
|
|
14
|
+
export declare function SettingsRow({ label, description, controlId, isPlaceholder, children, }: SettingsRowProps): ReactNode;
|
|
15
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export type ReportContentProps = {
|
|
3
|
-
readonly summary
|
|
3
|
+
readonly summary?: ReactNode;
|
|
4
4
|
readonly breakdown?: ReactNode;
|
|
5
5
|
};
|
|
6
6
|
export declare function ReportContent({ summary, breakdown }: ReportContentProps): ReactNode;
|
|
@@ -9,9 +9,16 @@ export type ContentTabNavigation = {
|
|
|
9
9
|
readonly onNavigate: (id: string) => void;
|
|
10
10
|
readonly href: (id: string) => string;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type ContentTabsContent = {
|
|
13
13
|
readonly label: string;
|
|
14
14
|
readonly items: ReadonlyArray<ContentTab>;
|
|
15
|
-
readonly navigation?: ContentTabNavigation;
|
|
16
15
|
};
|
|
16
|
+
export type ContentTabsProps = ContentTabsContent & ({
|
|
17
|
+
readonly navigation: ContentTabNavigation;
|
|
18
|
+
readonly defaultSelectedId?: never;
|
|
19
|
+
} | {
|
|
20
|
+
readonly navigation?: undefined;
|
|
21
|
+
readonly defaultSelectedId?: string;
|
|
22
|
+
});
|
|
17
23
|
export declare function ContentTabs(props: ContentTabsProps): ReactNode;
|
|
24
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as e } from "./src-E3Or8tkO.js";
|
|
2
|
-
import { l as t } from "./src-
|
|
2
|
+
import { l as t } from "./src-BfPaaDxg.js";
|
|
3
3
|
import { f as n } from "./tokens.stylex-BoRZ3D8s.js";
|
|
4
4
|
import { r } from "./pierre-theme-DsrSwl5m.js";
|
|
5
5
|
import * as i from "@stylexjs/stylex";
|
|
@@ -1149,27 +1149,29 @@ var Qe = {
|
|
|
1149
1149
|
Item: Ze
|
|
1150
1150
|
};
|
|
1151
1151
|
// packages/forms/src/settings-row.tsx
|
|
1152
|
-
function nt({ label: e, description: t, controlId: n,
|
|
1153
|
-
let
|
|
1152
|
+
function nt({ label: e, description: t, controlId: n, isPlaceholder: r = !1, children: i }) {
|
|
1153
|
+
let a = l(), o = `${n ?? a}-description`;
|
|
1154
1154
|
return /* @__PURE__ */ d("div", {
|
|
1155
1155
|
role: "group",
|
|
1156
|
-
"aria-labelledby":
|
|
1156
|
+
"aria-labelledby": a,
|
|
1157
|
+
"aria-hidden": r || void 0,
|
|
1158
|
+
inert: r || void 0,
|
|
1157
1159
|
className: "x12h1iku x180ayaa x78zum5 x1a02dak x6s0dn4 x1qughib xaml1ju x1ydxw8w xso031l x1q0q8m5 x1qndepd x1hz01jw xj57cvi xtqrqnz x1778rvt xbixft",
|
|
1158
1160
|
children: [/* @__PURE__ */ d("div", {
|
|
1159
1161
|
className: "x78zum5 xdt5ytf xunmzkg xeuugli xk30mkq",
|
|
1160
1162
|
children: [/* @__PURE__ */ u("label", {
|
|
1161
|
-
id:
|
|
1163
|
+
id: a,
|
|
1162
1164
|
htmlFor: n,
|
|
1163
1165
|
className: "xk4h15q xj0a0fe",
|
|
1164
1166
|
children: e
|
|
1165
1167
|
}), t !== void 0 && /* @__PURE__ */ u("p", {
|
|
1166
|
-
id:
|
|
1168
|
+
id: o,
|
|
1167
1169
|
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
1168
1170
|
children: t
|
|
1169
1171
|
})]
|
|
1170
1172
|
}), /* @__PURE__ */ u("div", {
|
|
1171
1173
|
className: "xrvj5dj x6s0dn4 x1mkdm3x x1so1ns2 x2nl74q xeuugli x193iq5w x2lah0s x18ssw31",
|
|
1172
|
-
children:
|
|
1174
|
+
children: i
|
|
1173
1175
|
})]
|
|
1174
1176
|
});
|
|
1175
1177
|
}
|
package/package.json
CHANGED