@mechane-ai/elements 0.24.0 → 0.25.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/dist/charts/cartesian.js +405 -364
- package/dist/elements.css +1 -1
- package/dist/layout.js +6 -9
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
- package/dist/packages/charts/src/cartesian/time-series.d.ts +6 -2
- package/dist/packages/charts/src/chart-frame.d.ts +1 -1
- package/dist/packages/charts/src/chart-input.d.ts +1 -1
- package/package.json +1 -1
package/dist/elements.css
CHANGED
|
@@ -1834,7 +1834,7 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1834
1834
|
background-color: var(--x1umbgym);
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
|
-
.x13rtz23[data-dragging]:not([data-disabled]), .xf2ykmf[data-highlighted], .xgm7wsc[data-checked], .xhtu79c[data-pressed], .xyg3wme:active:not([data-disabled]) {
|
|
1837
|
+
.x13rtz23[data-dragging]:not([data-disabled]), .x1yk04ar[aria-current="location"], .xf2ykmf[data-highlighted], .xgm7wsc[data-checked], .xhtu79c[data-pressed], .xyg3wme:active:not([data-disabled]) {
|
|
1838
1838
|
background-color: var(--x7wqmh8);
|
|
1839
1839
|
}
|
|
1840
1840
|
|
package/dist/layout.js
CHANGED
|
@@ -248,8 +248,8 @@ function V() {
|
|
|
248
248
|
}
|
|
249
249
|
// packages/layout/src/navigation-rail.tsx
|
|
250
250
|
var H = g("rail"), U = {
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
selected: {
|
|
252
|
+
kHjaVl: "x1yk04ar",
|
|
253
253
|
$$css: !0
|
|
254
254
|
},
|
|
255
255
|
mobileLink: {
|
|
@@ -293,7 +293,7 @@ function W({ label: e, links: t, action: o }) {
|
|
|
293
293
|
"aria-label": e,
|
|
294
294
|
className: "xrvj5dj x1mt1orb x1rnidkh xunmzkg x1s01oa9",
|
|
295
295
|
children: t.map(({ label: e, icon: t, isCurrent: n = !1, ...r }) => /* @__PURE__ */ w("a", {
|
|
296
|
-
...p(m.props(i.base, i.button, U.mobileLink, U.rounded,
|
|
296
|
+
...p(m.props(i.base, i.button, U.mobileLink, U.rounded, U.selected), r),
|
|
297
297
|
"aria-current": n ? "location" : void 0,
|
|
298
298
|
onClick: (e) => u(r.onClick, e),
|
|
299
299
|
children: [/* @__PURE__ */ C("span", {
|
|
@@ -323,13 +323,10 @@ function W({ label: e, links: t, action: o }) {
|
|
|
323
323
|
"aria-label": e,
|
|
324
324
|
className: "x78zum5 xdt5ytf x1qjc9v5",
|
|
325
325
|
children: t.map(({ label: e, icon: t, isCurrent: r = !1, ...i }) => /* @__PURE__ */ C("div", {
|
|
326
|
-
|
|
327
|
-
0: { className: "x1n2onr6 x78zum5 x6s0dn4 xl56j7k x1oec0jp" },
|
|
328
|
-
1: { className: "x1n2onr6 x78zum5 x6s0dn4 xl56j7k x1oec0jp x1r7kqkb xh3r7i3" }
|
|
329
|
-
}[!!r | 0],
|
|
326
|
+
className: "x1n2onr6 x78zum5 x6s0dn4 xl56j7k x1oec0jp",
|
|
330
327
|
children: /* @__PURE__ */ w(n.Root, { children: [/* @__PURE__ */ C(n.Trigger, {
|
|
331
328
|
render: /* @__PURE__ */ C(a, {
|
|
332
|
-
...i,
|
|
329
|
+
...p({ className: "x1yk04ar" }, i),
|
|
333
330
|
"aria-label": e,
|
|
334
331
|
"aria-current": r ? "location" : void 0,
|
|
335
332
|
onClick: (e) => u(i.onClick, e)
|
|
@@ -628,7 +625,7 @@ function Q({ title: e, actions: t, showBreadcrumb: n = !1, showNavigation: r = !
|
|
|
628
625
|
tabIndex: n ? void 0 : -1,
|
|
629
626
|
"aria-label": n ? "Breadcrumb" : void 0,
|
|
630
627
|
className: "x78zum5 x6s0dn4 x1hnptsi x1dc62k6 xeuugli xs83m0k x1ghz6dp x1qlqyl8 xj57cvi x1t137rt",
|
|
631
|
-
children: /* @__PURE__ */ C("span", {
|
|
628
|
+
children: /* @__PURE__ */ C(n ? "div" : "span", {
|
|
632
629
|
className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
633
630
|
children: e
|
|
634
631
|
})
|
|
@@ -4,7 +4,7 @@ import type { BarComposition, BarSeries } from './bar-data.ts';
|
|
|
4
4
|
export type { BarSeries, BarBucket, BarComposition } from './bar-data.ts';
|
|
5
5
|
export type BarChartProps = {
|
|
6
6
|
readonly title: string;
|
|
7
|
-
readonly description?:
|
|
7
|
+
readonly description?: ReactNode;
|
|
8
8
|
readonly categories: ReadonlyArray<{
|
|
9
9
|
readonly id: string;
|
|
10
10
|
readonly label: string;
|
|
@@ -8,5 +8,5 @@ export type { SparklineProps } from './sparkline.tsx';
|
|
|
8
8
|
export { Sparkline } from './sparkline.tsx';
|
|
9
9
|
export type { TimeSeriesPoint, TimeSeries, TimeSeriesMarker } from './time-series-data.ts';
|
|
10
10
|
export { timeSeriesLimits } from './time-series-data.ts';
|
|
11
|
-
export type { TimeSeriesChartProps, AreaChartProps, SmallMultiplesProps } from './time-series.tsx';
|
|
12
|
-
export { LineChart, AreaChart, SmallMultiples } from './time-series.tsx';
|
|
11
|
+
export type { TimeSeriesChartProps, TimeSeriesChartPlaceholderProps, AreaChartProps, SmallMultiplesProps, } from './time-series.tsx';
|
|
12
|
+
export { LineChart, AreaChart, SmallMultiples, TimeSeriesChartPlaceholder } from './time-series.tsx';
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { TimeSeries, TimeSeriesMarker } from './time-series-data.ts';
|
|
3
3
|
export type TimeSeriesChartProps = {
|
|
4
4
|
readonly title: string;
|
|
5
|
-
readonly description?:
|
|
5
|
+
readonly description?: ReactNode;
|
|
6
6
|
readonly series: ReadonlyArray<TimeSeries>;
|
|
7
7
|
readonly timestampUnit: 'seconds' | 'milliseconds';
|
|
8
8
|
readonly formatTimestamp: (timestamp: number) => string;
|
|
@@ -15,12 +15,15 @@ export type TimeSeriesChartProps = {
|
|
|
15
15
|
export type AreaChartProps = TimeSeriesChartProps & {
|
|
16
16
|
readonly isStacked?: boolean | undefined;
|
|
17
17
|
};
|
|
18
|
+
export type TimeSeriesChartPlaceholderProps = Pick<TimeSeriesChartProps, 'title' | 'description' | 'height' | 'actions'> & {
|
|
19
|
+
readonly series: ReadonlyArray<Pick<TimeSeries, 'id' | 'label' | 'tone'>>;
|
|
20
|
+
};
|
|
18
21
|
export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title' | 'description' | 'actions' | 'formatValue' | 'formatTick' | 'markers'> & {
|
|
19
22
|
readonly charts: ReadonlyArray<{
|
|
20
23
|
readonly id: string;
|
|
21
24
|
readonly title: string;
|
|
22
25
|
readonly series: ReadonlyArray<TimeSeries>;
|
|
23
|
-
readonly description?:
|
|
26
|
+
readonly description?: ReactNode;
|
|
24
27
|
readonly formatValue: (value: number) => string;
|
|
25
28
|
readonly formatTick?: ((value: number) => string) | undefined;
|
|
26
29
|
readonly markers?: ReadonlyArray<TimeSeriesMarker> | undefined;
|
|
@@ -28,4 +31,5 @@ export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title'
|
|
|
28
31
|
};
|
|
29
32
|
export declare function LineChart(props: TimeSeriesChartProps): ReactNode;
|
|
30
33
|
export declare function AreaChart({ isStacked, ...props }: AreaChartProps): ReactNode;
|
|
34
|
+
export declare function TimeSeriesChartPlaceholder({ title, description, series, actions, height, }: TimeSeriesChartPlaceholderProps): ReactNode;
|
|
31
35
|
export declare function SmallMultiples({ charts, ...props }: SmallMultiplesProps): ReactNode;
|
|
@@ -6,7 +6,7 @@ export type ChartSelection = {
|
|
|
6
6
|
};
|
|
7
7
|
export type ChartFrameProps = {
|
|
8
8
|
readonly title: ReactNode;
|
|
9
|
-
readonly description?:
|
|
9
|
+
readonly description?: ReactNode;
|
|
10
10
|
readonly children: ReactNode;
|
|
11
11
|
readonly actions?: ReactNode;
|
|
12
12
|
readonly footer?: ReactNode;
|
|
@@ -5,6 +5,6 @@ export declare function hasUniqueIds(records: ReadonlyArray<{
|
|
|
5
5
|
}>): boolean;
|
|
6
6
|
export declare function ChartInputError({ title, description, message, }: {
|
|
7
7
|
readonly title: string;
|
|
8
|
-
readonly description?:
|
|
8
|
+
readonly description?: ReactNode;
|
|
9
9
|
readonly message: string;
|
|
10
10
|
}): ReactNode;
|
package/package.json
CHANGED