@siyahi/ui 0.1.9-next.32 → 0.1.9-next.33
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/components/registry/charts/area-chart-card.d.ts +2 -2
- package/dist/components/registry/charts/bar-chart-card.d.ts +4 -4
- package/dist/components/registry/charts/line-chart-card.d.ts +1 -1
- package/dist/components/registry/dashboard-01/section-cards.d.ts +4 -4
- package/dist/components/registry/dashboardcn/bar-list.d.ts +8 -8
- package/dist/components/registry/dashboardcn/distribution-bar.d.ts +11 -11
- package/dist/components/registry/dashboardcn/kpi-row-card.d.ts +4 -4
- package/dist/components/registry/dashboardcn/sparkline.d.ts +6 -6
- package/dist/components/registry/heatmap/calendar-heatmap.d.ts +50 -50
- package/dist/components/registry/heatmap/status-heatmap.d.ts +44 -44
- package/dist/components/registry/heatmap/weekday-heatmap.d.ts +53 -53
- package/dist/components/registry/minidev/copy-button.d.ts +2 -2
- package/dist/components/registry/niko-table/components/data-table-column-actions.d.ts +1 -1
- package/dist/components/registry/niko-table/components/data-table-column-filter.d.ts +1 -1
- package/dist/components/registry/niko-table/components/data-table-empty-state.d.ts +7 -7
- package/dist/components/registry/niko-table/components/data-table-faceted-filter.d.ts +5 -5
- package/dist/components/registry/niko-table/components/data-table-grouped-rows.d.ts +1 -1
- package/dist/components/registry/niko-table/components/data-table-row-context-menu-slot.d.ts +1 -1
- package/dist/components/registry/niko-table/components/data-table-row-context-menu.d.ts +1 -1
- package/dist/components/registry/niko-table/config/feature-detection.d.ts +13 -13
- package/dist/components/registry/niko-table/core/data-table-context.d.ts +5 -5
- package/dist/components/registry/niko-table/core/data-table-error-boundary.d.ts +3 -3
- package/dist/components/registry/niko-table/core/data-table-grouped-row.d.ts +2 -2
- package/dist/components/registry/niko-table/core/data-table-root.d.ts +36 -35
- package/dist/components/registry/niko-table/core/data-table-structure.d.ts +22 -22
- package/dist/components/registry/niko-table/core/data-table.d.ts +3 -3
- package/dist/components/registry/niko-table/filters/table-column-actions.d.ts +5 -5
- package/dist/components/registry/niko-table/filters/table-column-sort.d.ts +6 -6
- package/dist/components/registry/niko-table/filters/table-column-title.d.ts +2 -2
- package/dist/components/registry/niko-table/filters/table-faceted-filter.d.ts +9 -9
- package/dist/components/registry/niko-table/filters/table-search-filter.d.ts +7 -7
- package/dist/components/registry/niko-table/hooks/use-generated-options.d.ts +7 -7
- package/dist/components/registry/niko-table/lib/build-faceted-options.d.ts +2 -2
- package/dist/components/registry/niko-table/lib/column-resize-handle.d.ts +3 -3
- package/dist/components/registry/niko-table/lib/create-scroll-handler.d.ts +4 -4
- package/dist/components/registry/niko-table/types/index.d.ts +29 -29
- package/dist/components/registry/sidebar-07/app-sidebar.d.ts +6 -5
- package/dist/components/registry/sidebar-07/nav-main.d.ts +4 -4
- package/dist/components/siyahi/callout.d.ts +1 -1
- package/dist/components/siyahi/change-bar.d.ts +3 -3
- package/dist/components/siyahi/change-grid.d.ts +6 -6
- package/dist/components/siyahi/data-bar.d.ts +2 -2
- package/dist/components/siyahi/data-list.d.ts +1 -1
- package/dist/components/siyahi/data-table-row-count.d.ts +1 -1
- package/dist/components/siyahi/data-table-sort-header.d.ts +1 -1
- package/dist/components/siyahi/delta.d.ts +2 -2
- package/dist/components/siyahi/drawdown-chart.d.ts +2 -2
- package/dist/components/siyahi/histogram-chart.d.ts +5 -5
- package/dist/components/siyahi/local-time.d.ts +1 -1
- package/dist/components/siyahi/page-section.d.ts +1 -1
- package/dist/components/siyahi/page-toc.d.ts +2 -2
- package/dist/components/siyahi/panel-grid.d.ts +2 -2
- package/dist/components/siyahi/price-chart.d.ts +1 -1
- package/dist/components/siyahi/range-position.d.ts +5 -5
- package/dist/components/siyahi/scale-toggle.d.ts +2 -2
- package/dist/components/siyahi/scatter-chart.d.ts +15 -15
- package/dist/components/siyahi/siyahi-provider.d.ts +3 -2
- package/dist/components/siyahi/siyahi-provider.js +1 -4
- package/dist/components/siyahi/slope-chart.d.ts +4 -4
- package/dist/components/siyahi/status-alert.d.ts +1 -1
- package/dist/components/siyahi/status-badge.d.ts +1 -1
- package/dist/components/siyahi/target-rows.d.ts +6 -6
- package/dist/components/siyahi/treemap.d.ts +8 -8
- package/dist/components/siyahi/waterfall-chart.d.ts +3 -3
- package/dist/lib/chart-frame.d.ts +13 -13
- package/dist/lib/chart-marks.d.ts +2 -2
- package/dist/lib/chart-series.d.ts +22 -22
- package/dist/lib/format.d.ts +1 -1
- package/dist/lib/optional.d.ts +7 -0
- package/dist/lib/optional.js +0 -0
- package/dist/lib/scatter.d.ts +7 -7
- package/dist/lib/treemap.d.ts +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { ComponentProps } from "react";
|
|
|
4
4
|
//#region src/components/siyahi/status-badge.d.ts
|
|
5
5
|
export interface StatusBadgeProps extends Omit<ComponentProps<typeof Badge>, "variant"> {
|
|
6
6
|
/** positive for done or paid, warning for pending, negative for failed, accent for new, neutral for a draft. */
|
|
7
|
-
tone?: Tone;
|
|
7
|
+
tone?: Tone | undefined;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* A state, such as Paid, Pending or Failed: the badge takes its tone's wash and border, and a dot in the tone's
|
|
@@ -13,18 +13,18 @@ export interface TargetRow {
|
|
|
13
13
|
value: number;
|
|
14
14
|
target: number;
|
|
15
15
|
/** Qualitative ranges behind the bar as [from, to]; each later band draws a grey step darker, so nest them. */
|
|
16
|
-
bands?: [number, number][];
|
|
17
|
-
status?: TargetStatus;
|
|
16
|
+
bands?: [number, number][] | undefined;
|
|
17
|
+
status?: TargetStatus | undefined;
|
|
18
18
|
/** Tells rows apart when labels are not plain unique text. */
|
|
19
|
-
key?: string;
|
|
19
|
+
key?: string | undefined;
|
|
20
20
|
}
|
|
21
21
|
export interface TargetRowsProps {
|
|
22
22
|
rows: TargetRow[];
|
|
23
23
|
/** The scale every row shares; by default 0 to the largest value, target or band edge. */
|
|
24
|
-
domain?: [number, number];
|
|
24
|
+
domain?: [number, number] | undefined;
|
|
25
25
|
/** Writes the value and the target; useFormat().count by default. */
|
|
26
|
-
valueFormatter?: (value: number) => string;
|
|
27
|
-
className?: string;
|
|
26
|
+
valueFormatter?: ((value: number) => string) | undefined;
|
|
27
|
+
className?: string | undefined;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Bullet rows: each row's label, value and status beside a track where the value is a solid bar, the target a tall
|
|
@@ -6,35 +6,35 @@ export interface TreemapItem {
|
|
|
6
6
|
/** Signed change as a fraction; sets the heat. `null` when unknown: a muted tile marked "—". */
|
|
7
7
|
change: number | null;
|
|
8
8
|
/** Unique key when names repeat, such as one city sold to online and in stores. Defaults to `name`. */
|
|
9
|
-
key?: string;
|
|
9
|
+
key?: string | undefined;
|
|
10
10
|
/** Tiles of one group, such as a region, sit together under the group's name, even a group of one. */
|
|
11
|
-
group?: string;
|
|
11
|
+
group?: string | undefined;
|
|
12
12
|
}
|
|
13
13
|
export interface TreemapProps<T extends TreemapItem> {
|
|
14
14
|
items: T[];
|
|
15
15
|
height: number;
|
|
16
16
|
/** ±range: the change, as a fraction, that takes the deepest heat step. Default 0.05 (±5%); a range that is not a positive number uses the default. */
|
|
17
|
-
range?: number;
|
|
17
|
+
range?: number | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Gets the item under a mouse, and null when it moves onto a group's name or leaves the map. A tap fires no hover:
|
|
20
20
|
* on a touch screen it selects, so the page shows the tile in place rather than in a card at the finger.
|
|
21
21
|
*/
|
|
22
|
-
onHover?: (item: T | null) => void;
|
|
22
|
+
onHover?: ((item: T | null) => void) | undefined;
|
|
23
23
|
/** The selected item, matched by key, whose tile carries a ring. Pass back what onSelect gave. */
|
|
24
|
-
selected?: T | null;
|
|
24
|
+
selected?: T | null | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* Gets the item whose tile is tapped or clicked, and null when the selected
|
|
27
27
|
* tile is tapped again or a tap lands anywhere else. On a touch screen, which
|
|
28
28
|
* has no hover, this is how a reader gets a tile's figures.
|
|
29
29
|
*/
|
|
30
|
-
onSelect?: (item: T | null) => void;
|
|
30
|
+
onSelect?: ((item: T | null) => void) | undefined;
|
|
31
31
|
}
|
|
32
32
|
/** Heat map of parts of a whole: area by weight, colour by signed change, optionally grouped; hand-drawn SVG. */
|
|
33
33
|
export declare function Treemap<T extends TreemapItem>({ items, height, range, onHover, selected, onSelect }: TreemapProps<T>): import("react").JSX.Element;
|
|
34
34
|
export interface TreemapLegendProps {
|
|
35
35
|
/** The Treemap's own range, so each swatch matches its tiles. */
|
|
36
|
-
range?: number;
|
|
37
|
-
className?: string;
|
|
36
|
+
range?: number | undefined;
|
|
37
|
+
className?: string | undefined;
|
|
38
38
|
}
|
|
39
39
|
/** The Treemap's colour scale under the map: five steps of loss, no change, five steps of gain, deepest at the ends. */
|
|
40
40
|
export declare function TreemapLegend({ range, className }: TreemapLegendProps): import("react").JSX.Element;
|
|
@@ -12,7 +12,7 @@ export type WaterfallStep = {
|
|
|
12
12
|
} | {
|
|
13
13
|
kind: "total";
|
|
14
14
|
label: string;
|
|
15
|
-
value?: number;
|
|
15
|
+
value?: number | undefined;
|
|
16
16
|
};
|
|
17
17
|
/** A step as drawn: the running total after it, and the span its bar covers. */
|
|
18
18
|
export interface WaterfallBar {
|
|
@@ -35,13 +35,13 @@ export interface WaterfallChartCardProps extends Pick<SeriesChartProps<Waterfall
|
|
|
35
35
|
/** The bars in order: usually a total to start from, the changes, and a total to end on. */
|
|
36
36
|
steps: readonly WaterfallStep[];
|
|
37
37
|
/** Bars run sideways with the labels down the left, for long names such as product categories. */
|
|
38
|
-
horizontal?: boolean;
|
|
38
|
+
horizontal?: boolean | undefined;
|
|
39
39
|
/** What the legend calls each kind of bar. */
|
|
40
40
|
labels?: {
|
|
41
41
|
rise: string;
|
|
42
42
|
fall: string;
|
|
43
43
|
total: string;
|
|
44
|
-
};
|
|
44
|
+
} | undefined;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* A running total bridged step by step: where it starts, each change that moved it, and where it ends, such as a
|
|
@@ -24,7 +24,7 @@ export declare function QuietLegend<T>({ series, raisable, raised, onRaise }: Qu
|
|
|
24
24
|
interface ChartFrameProps<T extends object, K extends keyof T> extends Omit<SeriesChartProps<T, K>, "yDomain">, NumericXProps, ValueScaleProps, LineMarksProps<T, K> {
|
|
25
25
|
chart: typeof AreaChart | typeof BarChart | typeof LineChart;
|
|
26
26
|
/** The value axis' range: a page's fixed one, or a card's rule such as bars reaching zero. */
|
|
27
|
-
yDomain?: YAxisProps["domain"];
|
|
27
|
+
yDomain?: YAxisProps["domain"] | undefined;
|
|
28
28
|
/** One Bar, Area or Line per series. */
|
|
29
29
|
children: ReactNode;
|
|
30
30
|
/**
|
|
@@ -32,22 +32,22 @@ interface ChartFrameProps<T extends object, K extends keyof T> extends Omit<Seri
|
|
|
32
32
|
* chart-bar-horizontal. The value axis runs along the bottom when yTickFormatter is given, and is hidden
|
|
33
33
|
* otherwise. x and y keep their meaning: x is the category, y the value.
|
|
34
34
|
*/
|
|
35
|
-
horizontal?: boolean;
|
|
35
|
+
horizontal?: boolean | undefined;
|
|
36
36
|
/** "sign" stacks negative values below zero and positive ones above, rather than on one running total. */
|
|
37
|
-
stackOffset?: "sign";
|
|
38
|
-
onClick?: ComponentProps<typeof BarChart>["onClick"];
|
|
37
|
+
stackOffset?: "sign" | undefined;
|
|
38
|
+
onClick?: ComponentProps<typeof BarChart>["onClick"] | undefined;
|
|
39
39
|
/** A tooltip row per hovered mark; by default each series' colour, label and formatted value (seriesRow). */
|
|
40
|
-
tooltipRow?: ComponentProps<typeof ChartTooltipContent>["formatter"];
|
|
40
|
+
tooltipRow?: ComponentProps<typeof ChartTooltipContent>["formatter"] | undefined;
|
|
41
41
|
/** The legend under the plot; by default one chip per series. */
|
|
42
|
-
legend?: ReactElement;
|
|
42
|
+
legend?: ReactElement | undefined;
|
|
43
43
|
/** Why this chart cannot go on a log scale whatever its values, such as stacked areas adding up from zero. */
|
|
44
|
-
logBlocked?: string;
|
|
44
|
+
logBlocked?: string | undefined;
|
|
45
45
|
/** The marks are lines (a line chart, unstacked areas): name each series at its line's end, where there is room. */
|
|
46
|
-
endLabels?: boolean;
|
|
46
|
+
endLabels?: boolean | undefined;
|
|
47
47
|
/** Hatch a forecast stretch, behind lines that sit on card halos; a stack's fills cover it already. */
|
|
48
|
-
forecastHatch?: boolean;
|
|
48
|
+
forecastHatch?: boolean | undefined;
|
|
49
49
|
/** The lines' curve, which a grey line raised from the legend is drawn with too. */
|
|
50
|
-
curve?: ChartCurve;
|
|
50
|
+
curve?: ChartCurve | undefined;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* The colour a series' Bar takes, which its legend chip shows: the negative colour when every value drawn is below
|
|
@@ -59,9 +59,9 @@ export declare function seriesFill<T>(item: ChartSeriesItem<T>, data: readonly T
|
|
|
59
59
|
* grid, and none elsewhere. The eye lands on now, where a reader starts.
|
|
60
60
|
*/
|
|
61
61
|
export declare function endDot(color: ChartColor, count: number, hollow?: boolean): ({ cx, cy, index }: {
|
|
62
|
-
cx?: number;
|
|
63
|
-
cy?: number;
|
|
64
|
-
index?: number;
|
|
62
|
+
cx?: number | undefined;
|
|
63
|
+
cy?: number | undefined;
|
|
64
|
+
index?: number | undefined;
|
|
65
65
|
}) => import("react").JSX.Element;
|
|
66
66
|
/** A tooltip row: the series' colour and label, then its value as the page formats it, or — when the row has none. */
|
|
67
67
|
export declare function seriesRow<T>(series: ChartSeries<T>, formatValue: (value: number) => string): (value: unknown, _name: unknown, item: {
|
|
@@ -65,9 +65,9 @@ interface TimeMarksProps<T extends object, K extends keyof T> {
|
|
|
65
65
|
data: readonly T[];
|
|
66
66
|
xKey: K;
|
|
67
67
|
/** The x value from which the data is a forecast. */
|
|
68
|
-
forecastFrom?: T[K];
|
|
68
|
+
forecastFrom?: T[K] | undefined;
|
|
69
69
|
/** The x value of today. */
|
|
70
|
-
today?: T[K];
|
|
70
|
+
today?: T[K] | undefined;
|
|
71
71
|
/** Prefix of the clip paths the series' actual and forecast copies use (`<id>-actual`, `<id>-forecast`). */
|
|
72
72
|
clipId: string;
|
|
73
73
|
/** Hatch the forecast stretch; a stack's fills already cover it, so a stacked chart only labels it. */
|
|
@@ -14,7 +14,7 @@ export interface ChartSeriesItem<T> {
|
|
|
14
14
|
label: string;
|
|
15
15
|
color: ChartColor;
|
|
16
16
|
/** A bar below zero takes this colour instead, such as var(--negative) for a loss beside var(--positive). */
|
|
17
|
-
negativeColor?: ChartColor;
|
|
17
|
+
negativeColor?: ChartColor | undefined;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* The series in draw, stack and legend order; give the slots in order from
|
|
@@ -28,16 +28,16 @@ export type ChartSeries<T> = readonly ChartSeriesItem<T>[];
|
|
|
28
28
|
*/
|
|
29
29
|
export type ChartReferenceLine = ({
|
|
30
30
|
y: number;
|
|
31
|
-
x?: never;
|
|
31
|
+
x?: never | undefined;
|
|
32
32
|
} | {
|
|
33
33
|
x: number | string;
|
|
34
|
-
y?: never;
|
|
34
|
+
y?: never | undefined;
|
|
35
35
|
}) & {
|
|
36
|
-
label?: string;
|
|
36
|
+
label?: string | undefined;
|
|
37
37
|
/** "strong" draws it in the text colour, for the line that matters most; "muted" by default. */
|
|
38
|
-
emphasis?: "muted" | "strong";
|
|
38
|
+
emphasis?: "muted" | "strong" | undefined;
|
|
39
39
|
/** Where the label sits against the line. Defaults to insideTopLeft. */
|
|
40
|
-
labelPosition?: "insideTopLeft" | "insideTopRight" | "insideBottomLeft" | "insideBottomRight";
|
|
40
|
+
labelPosition?: "insideTopLeft" | "insideTopRight" | "insideBottomLeft" | "insideBottomRight" | undefined;
|
|
41
41
|
};
|
|
42
42
|
/** What BarChartCard, AreaChartCard and LineChartCard all take. */
|
|
43
43
|
export interface SeriesChartProps<T extends object, K extends keyof T> {
|
|
@@ -51,35 +51,35 @@ export interface SeriesChartProps<T extends object, K extends keyof T> {
|
|
|
51
51
|
xKey: K;
|
|
52
52
|
series: ChartSeries<NoInfer<T>>;
|
|
53
53
|
/** Categories to label, or tick positions with xDomain. Every named tick is drawn; other rows keep their marks and tooltips. */
|
|
54
|
-
xTicks?: readonly T[K][];
|
|
54
|
+
xTicks?: readonly T[K][] | undefined;
|
|
55
55
|
/** The x axis ticks, and the tooltip's heading unless xTooltipFormatter is set. Defaults to the value as text. */
|
|
56
|
-
xFormatter?: (value: T[K]) => string;
|
|
56
|
+
xFormatter?: ((value: T[K]) => string) | undefined;
|
|
57
57
|
/** The tooltip's heading, when it should say more than a tick: "19:34:13 IST, 10 s average" against "19:34". */
|
|
58
|
-
xTooltipFormatter?: (value: T[K]) => string;
|
|
58
|
+
xTooltipFormatter?: ((value: T[K]) => string) | undefined;
|
|
59
59
|
/** A series' value in the tooltip, and the y axis unless yTickFormatter is set. Defaults to the locale's numbers. */
|
|
60
|
-
valueFormatter?: (value: number) => string;
|
|
60
|
+
valueFormatter?: ((value: number) => string) | undefined;
|
|
61
61
|
/**
|
|
62
62
|
* The y axis, when its ticks should be shorter than the tooltip's figures: moneyCompact against money. It gets the
|
|
63
63
|
* axis' largest tick as `scale`, so moneyCompact writes every tick in one unit.
|
|
64
64
|
*/
|
|
65
|
-
yTickFormatter?: (value: number, scale: number) => string;
|
|
65
|
+
yTickFormatter?: ((value: number, scale: number) => string) | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* A fixed range for the value axis, such as [0, 100] for a percentage. By default it fits the data; a bar
|
|
68
68
|
* chart's always reaches zero.
|
|
69
69
|
*/
|
|
70
|
-
yDomain?: [number, number];
|
|
70
|
+
yDomain?: [number, number] | undefined;
|
|
71
71
|
/** Where the value axis puts its ticks, such as [0, 25, 50, 75, 100]. */
|
|
72
|
-
yTicks?: readonly number[];
|
|
72
|
+
yTicks?: readonly number[] | undefined;
|
|
73
73
|
/** Height of the plot and legend, in pixels. Sideways bars grow when wrapped tick details need more room. */
|
|
74
74
|
height: number;
|
|
75
75
|
/** A second line under each x tick, so a row's figure reads without a hover: "FY24" then "+₹1.2L". */
|
|
76
|
-
xTickDetail?: (row: T) => string;
|
|
76
|
+
xTickDetail?: ((row: T) => string) | undefined;
|
|
77
77
|
/** A title under the x axis, such as "Hour of day (IST)". Not drawn on sideways bars. */
|
|
78
|
-
xLabel?: string;
|
|
78
|
+
xLabel?: string | undefined;
|
|
79
79
|
/** A title beside the value axis, read bottom to top, such as "Orders". Not drawn on sideways bars. */
|
|
80
|
-
yLabel?: string;
|
|
80
|
+
yLabel?: string | undefined;
|
|
81
81
|
/** Limits and events to mark on the plot. A zero line draws by itself when a value goes below zero. */
|
|
82
|
-
referenceLines?: readonly ChartReferenceLine[];
|
|
82
|
+
referenceLines?: readonly ChartReferenceLine[] | undefined;
|
|
83
83
|
/** Shown in the plot's place, at its height, while the data loads or after it failed to. */
|
|
84
84
|
placeholder?: ReactNode;
|
|
85
85
|
/** Lines under the chart, such as a caption or a takeaway, in the card's footer. */
|
|
@@ -96,14 +96,14 @@ export interface LineMarksProps<T extends object, K extends keyof T> {
|
|
|
96
96
|
* The x value from which the data is a forecast, such as the last month-end: each line goes dashed from it, a faint
|
|
97
97
|
* hatched band labelled FORECAST covers the stretch, and the end dots are hollow.
|
|
98
98
|
*/
|
|
99
|
-
forecastFrom?: NoInfer<T[K]
|
|
99
|
+
forecastFrom?: NoInfer<T[K]> | undefined;
|
|
100
100
|
/** The x value of today: a 1px rule in the link colour with a small TODAY label. */
|
|
101
|
-
today?: NoInfer<T[K]
|
|
101
|
+
today?: NoInfer<T[K]> | undefined;
|
|
102
102
|
}
|
|
103
103
|
/** A numeric x axis, for samples in time or any measure where a mark can sit between two rows. */
|
|
104
104
|
export interface NumericXProps {
|
|
105
105
|
/** The x axis runs over this range of the xKey field, which must hold numbers; without it the axis is one slot per row. */
|
|
106
|
-
xDomain?: [number, number];
|
|
106
|
+
xDomain?: [number, number] | undefined;
|
|
107
107
|
}
|
|
108
108
|
/** A value axis that may run on a log scale: lines and areas, which need not start at zero as bars must. */
|
|
109
109
|
export interface ValueScaleProps {
|
|
@@ -112,9 +112,9 @@ export interface ValueScaleProps {
|
|
|
112
112
|
* yScaleToggle is set. Log draws only when every value, and yDomain, is above zero; otherwise the axis is linear.
|
|
113
113
|
* On log the axis ticks at 1, 2 and 5 inside yDomain, if given, and yTicks is not used.
|
|
114
114
|
*/
|
|
115
|
-
yScale?: AxisScale;
|
|
115
|
+
yScale?: AxisScale | undefined;
|
|
116
116
|
/** Linear and Log buttons for the value axis in the header, after the action, so a reader can switch. */
|
|
117
|
-
yScaleToggle?: boolean;
|
|
117
|
+
yScaleToggle?: boolean | undefined;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
120
|
* How a line or an area's edge joins its points: "linear" draws straight segments, as measured samples should
|
package/dist/lib/format.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function count(value: number, locale?: SiyahiLocale): string;
|
|
|
19
19
|
export declare function pct(value: number, locale?: SiyahiLocale, fractionDigits?: number): string;
|
|
20
20
|
export interface TimeOptions {
|
|
21
21
|
/** Write the date, in the same zone, before the time: 20 Oct 2026, 14:30 IST. */
|
|
22
|
-
withDate?: boolean;
|
|
22
|
+
withDate?: boolean | undefined;
|
|
23
23
|
}
|
|
24
24
|
/** A 24-hour time in the locale's zone, with the zone written: 14:30 IST. */
|
|
25
25
|
export declare function time(value: Date | number | string, locale?: SiyahiLocale, { withDate }?: TimeOptions): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/lib/optional.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Every prop of T optional and taking undefined too, where `Partial<T>` under exactOptionalPropertyTypes takes only
|
|
4
|
+
* a missing prop: for settings a page passes some of, such as `locale={{ currency: usd ? "USD" : undefined }}`.
|
|
5
|
+
*/
|
|
6
|
+
export type Optional<T> = { [K in keyof T]?: T[K] | undefined; };
|
|
7
|
+
//#endregion
|
|
File without changes
|
package/dist/lib/scatter.d.ts
CHANGED
|
@@ -42,11 +42,11 @@ export interface ScatterQuadrants {
|
|
|
42
42
|
x: number;
|
|
43
43
|
y: number;
|
|
44
44
|
labels?: {
|
|
45
|
-
topLeft?: string;
|
|
46
|
-
topRight?: string;
|
|
47
|
-
bottomLeft?: string;
|
|
48
|
-
bottomRight?: string;
|
|
49
|
-
};
|
|
45
|
+
topLeft?: string | undefined;
|
|
46
|
+
topRight?: string | undefined;
|
|
47
|
+
bottomLeft?: string | undefined;
|
|
48
|
+
bottomRight?: string | undefined;
|
|
49
|
+
} | undefined;
|
|
50
50
|
}
|
|
51
51
|
export type QuadrantLabels = ScatterQuadrants["labels"];
|
|
52
52
|
/** A split a log axis cannot place, at or below zero, or one that is not a number, is no split at all. */
|
|
@@ -58,10 +58,10 @@ export declare const MAX_RADIUS = 20;
|
|
|
58
58
|
* nothing draws the smallest dot, so it cannot shrink or hide the others. Points without sizes all take `plain`.
|
|
59
59
|
*/
|
|
60
60
|
export declare function dotSizes(points: readonly {
|
|
61
|
-
size?: number;
|
|
61
|
+
size?: number | undefined;
|
|
62
62
|
}[], plain: number): {
|
|
63
63
|
radiusOf: (p: {
|
|
64
|
-
size?: number;
|
|
64
|
+
size?: number | undefined;
|
|
65
65
|
}) => number;
|
|
66
66
|
sized: boolean;
|
|
67
67
|
};
|
package/dist/lib/treemap.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface Layout<T> {
|
|
|
16
16
|
/** Squarified layout: items without a group are tiles of their own, the rest sit together under their group's label. */
|
|
17
17
|
export declare function layout<T extends {
|
|
18
18
|
weight: number;
|
|
19
|
-
group?: string;
|
|
19
|
+
group?: string | undefined;
|
|
20
20
|
}>(items: T[], width: number, height: number): Layout<T>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siyahi/ui",
|
|
3
|
-
"version": "0.1.9-next.
|
|
3
|
+
"version": "0.1.9-next.33",
|
|
4
4
|
"description": "Stock shadcn/ui on Base UI and Tailwind v4, a finance theme, a few compositions and formatters.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"base-ui",
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "node ../tools/contrast.mjs styles/siyahi.css && vp pack",
|
|
84
|
-
"typecheck": "tsc --noEmit"
|
|
84
|
+
"typecheck": "tsc --noEmit && tsc -p test/types"
|
|
85
85
|
}
|
|
86
86
|
}
|