@siyahi/ui 0.1.9-next.31 → 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.
Files changed (80) hide show
  1. package/DESIGN.md +4 -3
  2. package/agents/examples/data-table.tsx +4 -1
  3. package/agents/examples/metric-strip.tsx +2 -0
  4. package/dist/components/registry/charts/area-chart-card.d.ts +2 -2
  5. package/dist/components/registry/charts/bar-chart-card.d.ts +4 -4
  6. package/dist/components/registry/charts/line-chart-card.d.ts +1 -1
  7. package/dist/components/registry/dashboard-01/section-cards.d.ts +4 -4
  8. package/dist/components/registry/dashboardcn/bar-list.d.ts +8 -8
  9. package/dist/components/registry/dashboardcn/distribution-bar.d.ts +11 -11
  10. package/dist/components/registry/dashboardcn/kpi-row-card.d.ts +5 -3
  11. package/dist/components/registry/dashboardcn/kpi-row-card.js +1 -0
  12. package/dist/components/registry/dashboardcn/sparkline.d.ts +6 -6
  13. package/dist/components/registry/heatmap/calendar-heatmap.d.ts +50 -50
  14. package/dist/components/registry/heatmap/status-heatmap.d.ts +44 -44
  15. package/dist/components/registry/heatmap/weekday-heatmap.d.ts +53 -53
  16. package/dist/components/registry/minidev/copy-button.d.ts +2 -2
  17. package/dist/components/registry/niko-table/components/data-table-column-actions.d.ts +1 -1
  18. package/dist/components/registry/niko-table/components/data-table-column-filter.d.ts +1 -1
  19. package/dist/components/registry/niko-table/components/data-table-empty-state.d.ts +7 -7
  20. package/dist/components/registry/niko-table/components/data-table-faceted-filter.d.ts +5 -5
  21. package/dist/components/registry/niko-table/components/data-table-grouped-rows.d.ts +1 -1
  22. package/dist/components/registry/niko-table/components/data-table-row-context-menu-slot.d.ts +1 -1
  23. package/dist/components/registry/niko-table/components/data-table-row-context-menu.d.ts +1 -1
  24. package/dist/components/registry/niko-table/config/feature-detection.d.ts +13 -13
  25. package/dist/components/registry/niko-table/core/data-table-context.d.ts +5 -5
  26. package/dist/components/registry/niko-table/core/data-table-error-boundary.d.ts +3 -3
  27. package/dist/components/registry/niko-table/core/data-table-grouped-row.d.ts +2 -2
  28. package/dist/components/registry/niko-table/core/data-table-root.d.ts +36 -35
  29. package/dist/components/registry/niko-table/core/data-table-structure.d.ts +29 -22
  30. package/dist/components/registry/niko-table/core/data-table-structure.js +9 -5
  31. package/dist/components/registry/niko-table/core/data-table.d.ts +3 -3
  32. package/dist/components/registry/niko-table/filters/table-column-actions.d.ts +5 -5
  33. package/dist/components/registry/niko-table/filters/table-column-sort.d.ts +6 -6
  34. package/dist/components/registry/niko-table/filters/table-column-title.d.ts +2 -2
  35. package/dist/components/registry/niko-table/filters/table-faceted-filter.d.ts +9 -9
  36. package/dist/components/registry/niko-table/filters/table-search-filter.d.ts +7 -7
  37. package/dist/components/registry/niko-table/hooks/use-generated-options.d.ts +7 -7
  38. package/dist/components/registry/niko-table/lib/build-faceted-options.d.ts +2 -2
  39. package/dist/components/registry/niko-table/lib/column-resize-handle.d.ts +3 -3
  40. package/dist/components/registry/niko-table/lib/create-scroll-handler.d.ts +4 -4
  41. package/dist/components/registry/niko-table/lib/styles.js +1 -1
  42. package/dist/components/registry/niko-table/types/index.d.ts +29 -29
  43. package/dist/components/registry/sidebar-07/app-sidebar.d.ts +6 -5
  44. package/dist/components/registry/sidebar-07/nav-main.d.ts +4 -4
  45. package/dist/components/siyahi/callout.d.ts +1 -1
  46. package/dist/components/siyahi/change-bar.d.ts +3 -3
  47. package/dist/components/siyahi/change-grid.d.ts +6 -6
  48. package/dist/components/siyahi/data-bar.d.ts +2 -2
  49. package/dist/components/siyahi/data-list.d.ts +1 -1
  50. package/dist/components/siyahi/data-table-row-count.d.ts +1 -1
  51. package/dist/components/siyahi/data-table-sort-header.d.ts +1 -1
  52. package/dist/components/siyahi/delta.d.ts +2 -2
  53. package/dist/components/siyahi/drawdown-chart.d.ts +2 -2
  54. package/dist/components/siyahi/histogram-chart.d.ts +5 -5
  55. package/dist/components/siyahi/local-time.d.ts +1 -1
  56. package/dist/components/siyahi/page-section.d.ts +1 -1
  57. package/dist/components/siyahi/page-toc.d.ts +2 -2
  58. package/dist/components/siyahi/panel-grid.d.ts +2 -2
  59. package/dist/components/siyahi/price-chart.d.ts +1 -1
  60. package/dist/components/siyahi/range-position.d.ts +5 -5
  61. package/dist/components/siyahi/scale-toggle.d.ts +2 -2
  62. package/dist/components/siyahi/scatter-chart.d.ts +15 -15
  63. package/dist/components/siyahi/siyahi-provider.d.ts +3 -2
  64. package/dist/components/siyahi/siyahi-provider.js +1 -4
  65. package/dist/components/siyahi/slope-chart.d.ts +4 -4
  66. package/dist/components/siyahi/status-alert.d.ts +1 -1
  67. package/dist/components/siyahi/status-badge.d.ts +1 -1
  68. package/dist/components/siyahi/target-rows.d.ts +6 -6
  69. package/dist/components/siyahi/treemap.d.ts +8 -8
  70. package/dist/components/siyahi/waterfall-chart.d.ts +3 -3
  71. package/dist/lib/chart-frame.d.ts +13 -13
  72. package/dist/lib/chart-marks.d.ts +2 -2
  73. package/dist/lib/chart-series.d.ts +22 -22
  74. package/dist/lib/format.d.ts +1 -1
  75. package/dist/lib/optional.d.ts +7 -0
  76. package/dist/lib/optional.js +0 -0
  77. package/dist/lib/scatter.d.ts +7 -7
  78. package/dist/lib/treemap.d.ts +1 -1
  79. package/package.json +2 -2
  80. package/styles/siyahi.css +39 -6
package/DESIGN.md CHANGED
@@ -51,9 +51,10 @@ a meaning:
51
51
  colour, not separate hues.
52
52
  - **Colour marks exceptions.** The one stat tile or table row that needs a look
53
53
  is marked by the page: `tone: "negative"` or `"warning"` on a `SectionCards`
54
- item, `data-tone="negative"` or `"warning"` on a `TableRow`. It takes a faint
55
- wash of the colour over the card (7% in light, 12% in dark), and a tile an
56
- outline of it. The page decides, never the sign: a falling cost is good news.
54
+ or `MetricStrip` item, `data-tone="negative"` or `"warning"` on a `TableRow`,
55
+ and `getRowTone` on a `DataTableBody`, returning the tone for the row. It
56
+ takes a faint wash of the colour over the card (7% in light, 12% in dark),
57
+ and a tile or figure an outline of it. The page decides, never the sign: a falling cost is good news.
57
58
  Mark one or two; a page where every row is washed marks nothing.
58
59
 
59
60
  ## Surfaces
@@ -36,6 +36,9 @@ const products: Product[] = [
36
36
  { product: "Desk lamp", category: "Lighting", units: 900, revenue: 255600, change: 0.009 },
37
37
  ];
38
38
 
39
+ // The page's own rule for a product that needs a look; a falling figure alone would not be one.
40
+ const tone = (product: Product): "warning" | undefined => (product.units < 50 ? "warning" : undefined);
41
+
39
42
  // One click sorts largest (or Z) first; the title comes from meta.label.
40
43
  const header = () => <DataTableSortHeader />;
41
44
 
@@ -87,7 +90,7 @@ export default function DataTableExample() {
87
90
  </DataTableToolbarSection>
88
91
  <DataTable aria-label="Products">
89
92
  <DataTableHeader />
90
- <DataTableBody />
93
+ <DataTableBody getRowTone={tone} />
91
94
  </DataTable>
92
95
  </DataTableRoot>
93
96
  </CardContent>
@@ -25,6 +25,8 @@ export default function MetricStripExample() {
25
25
  change: -61200,
26
26
  changeFormat: "money",
27
27
  trend: [14200, -3800, 9100, 2600, -18400, -61200],
28
+ // The one figure on the strip that needs a look, marked by the page: a falling margin alone would not be.
29
+ tone: "negative",
28
30
  },
29
31
  { label: "Gift cards", value: moneyCompact(38400), change: 0.18, trend: [4100, 0, 12800, 3300, 9900, 8300] },
30
32
  { label: "Products", value: count(42), note: "3 added in Oct", trend: [38, 39, 39, 40, 39, 42] },
@@ -2,8 +2,8 @@ import { ChartCurve, LineMarksProps, NumericXProps, SeriesChartProps, ValueScale
2
2
  //#region src/components/registry/charts/area-chart-card.d.ts
3
3
  export interface AreaChartCardProps<T extends object, K extends keyof T> extends SeriesChartProps<T, K>, NumericXProps, ValueScaleProps, LineMarksProps<T, K> {
4
4
  /** Stack the series into a total instead of overlapping them. */
5
- stacked?: boolean;
6
- curve?: ChartCurve;
5
+ stacked?: boolean | undefined;
6
+ curve?: ChartCurve | undefined;
7
7
  }
8
8
  /**
9
9
  * Values over an ordered axis: overlapping series drawn as lines, or stacked into a total as tinted bands. A
@@ -2,13 +2,13 @@ import { SeriesChartProps } from "../../../lib/chart-series.js";
2
2
  //#region src/components/registry/charts/bar-chart-card.d.ts
3
3
  export interface BarChartCardProps<T extends object, K extends keyof T> extends SeriesChartProps<T, K> {
4
4
  /** Stack the series in one bar per point instead of side by side. */
5
- stacked?: boolean;
5
+ stacked?: boolean | undefined;
6
6
  /** Bars run sideways, categories down the left: for long names, such as product categories. */
7
- horizontal?: boolean;
7
+ horizontal?: boolean | undefined;
8
8
  /** The picked category's x value: its bars stay solid and the rest fade. */
9
- selected?: T[K] | null;
9
+ selected?: T[K] | null | undefined;
10
10
  /** Called with a clicked category's x value, or null when the picked one is clicked again. */
11
- onSelect?: (value: T[K] | null) => void;
11
+ onSelect?: ((value: T[K] | null) => void) | undefined;
12
12
  }
13
13
  /** Values over an ordered axis as bars: one series, or several grouped or stacked. */
14
14
  export declare function BarChartCard<T extends object, K extends keyof T>({ stacked, selected, onSelect, ...props }: BarChartCardProps<T, K>): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { ChartCurve, LineMarksProps, NumericXProps, SeriesChartProps, ValueScaleProps } from "../../../lib/chart-series.js";
2
2
  //#region src/components/registry/charts/line-chart-card.d.ts
3
3
  export interface LineChartCardProps<T extends object, K extends keyof T> extends SeriesChartProps<T, K>, NumericXProps, ValueScaleProps, LineMarksProps<T, K> {
4
- curve?: ChartCurve;
4
+ curve?: ChartCurve | undefined;
5
5
  }
6
6
  /** Values over an ordered axis as lines: one series, or several to compare, such as sales against a target. */
7
7
  export declare function LineChartCard<T extends object, K extends keyof T>({ curve, ...props }: LineChartCardProps<T, K>): import("react").JSX.Element;
@@ -13,18 +13,18 @@ export interface SectionCard {
13
13
  /** Muted second footer line. */
14
14
  detail?: React$1.ReactNode;
15
15
  /** In a picker, a tile that cannot be picked, such as one with nothing in it: faded, and its button disabled. */
16
- disabled?: boolean;
16
+ disabled?: boolean | undefined;
17
17
  /** Marks the tile as the exception on the page: a faint wash of the colour and an outline of it. */
18
- tone?: "negative" | "warning";
18
+ tone?: "negative" | "warning" | undefined;
19
19
  /** Marks the tile's data as old, with since when, such as "3 Nov": the tile greys out and says so. */
20
20
  stale?: React$1.ReactNode;
21
21
  }
22
22
  export interface SectionCardsProps {
23
23
  items: SectionCard[];
24
24
  /** The label of the picked tile. */
25
- selected?: string;
25
+ selected?: string | undefined;
26
26
  /** Makes each tile one button, so keep tile content non-interactive; gets the label of the tile picked. */
27
- onSelect?: (label: string) => void;
27
+ onSelect?: ((label: string) => void) | undefined;
28
28
  }
29
29
  export declare function SectionCards({ items, selected, onSelect }: SectionCardsProps): React$1.JSX.Element;
30
30
  //#endregion
@@ -4,24 +4,24 @@ export interface BarListItem {
4
4
  name: string;
5
5
  value: number;
6
6
  /** Renders the label as a link. */
7
- href?: string;
7
+ href?: string | undefined;
8
8
  icon?: React$1.ReactNode;
9
9
  /** Secondary figure after the label, such as a `Delta`. */
10
10
  detail?: React$1.ReactNode;
11
11
  /** Stable key when names can repeat. */
12
- key?: string;
12
+ key?: string | undefined;
13
13
  }
14
14
  export interface BarListProps extends React$1.ComponentProps<"div"> {
15
15
  data: BarListItem[];
16
- valueFormatter?: (value: number) => string;
17
- sortOrder?: "descending" | "ascending" | "none";
16
+ valueFormatter?: ((value: number) => string) | undefined;
17
+ sortOrder?: "descending" | "ascending" | "none" | undefined;
18
18
  /** Any CSS color. Defaults to chart-1. */
19
- color?: string;
19
+ color?: string | undefined;
20
20
  /** Show each row's share of the total next to its value. */
21
- showPercentage?: boolean;
21
+ showPercentage?: boolean | undefined;
22
22
  /** The value a full-width bar stands for. Give two lists the same max to draw them on one scale. Defaults to the largest value. */
23
- max?: number;
24
- onItemClick?: (item: BarListItem) => void;
23
+ max?: number | undefined;
24
+ onItemClick?: ((item: BarListItem) => void) | undefined;
25
25
  }
26
26
  declare function BarList({ data, valueFormatter, sortOrder, color, showPercentage, max: scale, onItemClick, className, ...props }: BarListProps): React$1.JSX.Element;
27
27
  //#endregion
@@ -5,33 +5,33 @@ export interface DistributionSegment {
5
5
  name: string;
6
6
  value: number;
7
7
  /** Defaults to chart-1 through chart-5 in order; var(--muted) for space that is free. */
8
- color?: ChartColor | "var(--muted)";
8
+ color?: ChartColor | "var(--muted)" | undefined;
9
9
  /** Stable key when names can repeat. */
10
- key?: string;
10
+ key?: string | undefined;
11
11
  }
12
12
  export interface DistributionMarker {
13
13
  /** The value the line marks, on the bar's scale. */
14
14
  at: number;
15
- label?: string;
15
+ label?: string | undefined;
16
16
  }
17
17
  export interface DistributionBarProps extends Omit<React$1.ComponentProps<"div">, "onMouseLeave"> {
18
18
  segments: DistributionSegment[];
19
- valueFormatter?: (value: number) => string;
20
- showLegend?: boolean;
19
+ valueFormatter?: ((value: number) => string) | undefined;
20
+ showLegend?: boolean | undefined;
21
21
  /** Show absolute values in the legend in addition to the share. */
22
- showValues?: boolean;
22
+ showValues?: boolean | undefined;
23
23
  /** The value the bar's right end stands for. Defaults to the positive segments' total. */
24
- max?: number;
24
+ max?: number | undefined;
25
25
  /**
26
26
  * The value the bar's left end stands for. Defaults to the negative segments' total, or 0 when there are none.
27
27
  * Above zero, segments (which start at zero) fall off the bar.
28
28
  */
29
- min?: number;
30
- markers?: DistributionMarker[];
29
+ min?: number | undefined;
30
+ markers?: DistributionMarker[] | undefined;
31
31
  /** The key (or name) of the one segment to keep solid; the rest fade. */
32
- highlighted?: string | null;
32
+ highlighted?: string | null | undefined;
33
33
  /** Called with the segment under the pointer, and null when it leaves the bar. */
34
- onHover?: (segment: DistributionSegment | null) => void;
34
+ onHover?: ((segment: DistributionSegment | null) => void) | undefined;
35
35
  }
36
36
  declare function DistributionBar({ segments, valueFormatter, showLegend, showValues, max, min, markers, highlighted, onHover, className, "aria-label": ariaLabel, ...props }: DistributionBarProps): React$1.JSX.Element;
37
37
  //#endregion
@@ -7,12 +7,14 @@ export interface MetricStripItem {
7
7
  /** The figure, formatted by the page: money(4512300). */
8
8
  value: React$1.ReactNode;
9
9
  /** The signed change, drawn as a Delta under the figure; its sign colours the trend. For "pct", a fraction. */
10
- change?: number;
11
- changeFormat?: "pct" | "money";
10
+ change?: number | undefined;
11
+ changeFormat?: "pct" | "money" | undefined;
12
12
  /** Muted words after the change, such as "vs last month". */
13
13
  note?: React$1.ReactNode;
14
14
  /** Recent values, oldest first, drawn as a sparkline beside the figure. */
15
- trend?: number[];
15
+ trend?: number[] | undefined;
16
+ /** Marks the figure as the exception on the page: a faint wash of the colour and an outline of it. */
17
+ tone?: "negative" | "warning" | undefined;
16
18
  }
17
19
  export interface MetricStripProps extends Omit<React$1.ComponentProps<typeof Card>, "title"> {
18
20
  title?: React$1.ReactNode;
@@ -39,6 +39,7 @@ function MetricStrip({ title, description, action, items, footer, className, ...
39
39
  className: "-me-px -mb-px flex flex-wrap",
40
40
  children: items.map((item) => /* @__PURE__ */ jsxs("div", {
41
41
  "data-slot": "metric-strip-item",
42
+ "data-tone": item.tone,
42
43
  className: cn("flex min-w-0 flex-col gap-1.5 border-e border-b px-4 py-4", columns),
43
44
  children: [/* @__PURE__ */ jsx("div", {
44
45
  className: "truncate font-mono text-2xs tracking-wider text-muted-foreground uppercase",
@@ -4,18 +4,18 @@ import * as React$1 from "react";
4
4
  export interface SparklineProps extends React$1.ComponentProps<"div"> {
5
5
  /** Series to plot, oldest first. */
6
6
  data: number[];
7
- variant?: "area" | "line";
7
+ variant?: "area" | "line" | undefined;
8
8
  /**
9
9
  * The last step and the dot on the latest value: a chart slot, or var(--positive) or var(--negative) for a gain or
10
10
  * a loss. Defaults to var(--chart-1). The run before it is muted.
11
11
  */
12
- color?: ChartColor;
13
- curve?: "monotone" | "linear" | "step";
12
+ color?: ChartColor | undefined;
13
+ curve?: "monotone" | "linear" | "step" | undefined;
14
14
  /** The run's line; the last step is 2px. */
15
- strokeWidth?: number;
15
+ strokeWidth?: number | undefined;
16
16
  /** Animate after hydration and when data changes. Respects reduced motion. */
17
- animate?: boolean;
18
- animationDuration?: number;
17
+ animate?: boolean | undefined;
18
+ animationDuration?: number | undefined;
19
19
  }
20
20
  declare function Sparkline({ data, variant, color, curve, strokeWidth, animate, animationDuration, className, ...props }: SparklineProps): React$1.JSX.Element;
21
21
  //#endregion
@@ -9,41 +9,41 @@ type ActivityWithLevel = Activity & {
9
9
  level: number;
10
10
  };
11
11
  export type Labels = {
12
- months?: string[];
13
- weekdays?: string[];
14
- stat?: string;
15
- cellLabel?: string;
16
- heatmapLabel?: string;
17
- legendLabel?: string;
18
- legendLevelLabel?: string;
12
+ months?: string[] | undefined;
13
+ weekdays?: string[] | undefined;
14
+ stat?: string | undefined;
15
+ cellLabel?: string | undefined;
16
+ heatmapLabel?: string | undefined;
17
+ legendLabel?: string | undefined;
18
+ legendLevelLabel?: string | undefined;
19
19
  };
20
20
  export type ColorConfig = {
21
- empty?: string;
22
- scale?: string;
21
+ empty?: string | undefined;
22
+ scale?: string | undefined;
23
23
  };
24
24
  export type CalendarHeatmapProps = HTMLAttributes<HTMLDivElement> & {
25
25
  data: Activity[];
26
- weekStart?: Day;
27
- continuousMonths?: boolean;
28
- hasEmptyColumn?: boolean;
29
- blockSize?: number;
30
- blockMargin?: number;
31
- blockRadius?: number;
32
- blockAspectRatio?: number;
33
- levels?: number;
34
- isNormalized?: boolean;
26
+ weekStart?: Day | undefined;
27
+ continuousMonths?: boolean | undefined;
28
+ hasEmptyColumn?: boolean | undefined;
29
+ blockSize?: number | undefined;
30
+ blockMargin?: number | undefined;
31
+ blockRadius?: number | undefined;
32
+ blockAspectRatio?: number | undefined;
33
+ levels?: number | undefined;
34
+ isNormalized?: boolean | undefined;
35
35
  /** Colour each day green or red by its sign, deeper the larger it is, for a daily gain or loss. */
36
- signed?: boolean;
36
+ signed?: boolean | undefined;
37
37
  /** With signed: the size that takes the deepest step. Defaults to the largest day's. */
38
- range?: number;
39
- colors?: ColorConfig;
40
- locale?: Locale;
41
- labels?: Labels;
42
- fontSize?: number;
38
+ range?: number | undefined;
39
+ colors?: ColorConfig | undefined;
40
+ locale?: Locale | undefined;
41
+ labels?: Labels | undefined;
42
+ fontSize?: number | undefined;
43
43
  emptyState?: ReactNode;
44
- totalCount?: number;
45
- style?: CSSProperties;
46
- className?: string;
44
+ totalCount?: number | undefined;
45
+ style?: CSSProperties | undefined;
46
+ className?: string | undefined;
47
47
  children: ReactNode;
48
48
  };
49
49
  /**
@@ -82,60 +82,60 @@ export type CalendarHeatmapProps = HTMLAttributes<HTMLDivElement> & {
82
82
  export declare const CalendarHeatmap: ({ data, weekStart, continuousMonths, hasEmptyColumn, blockSize: blockSizeProp, blockMargin, blockRadius, blockAspectRatio, levels: levelsProp, isNormalized, signed, range, colors, locale, labels: labelsProp, fontSize, emptyState, totalCount: totalCountProp, style, className, children, ...props }: CalendarHeatmapProps) => string | number | bigint | true | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
83
83
  export type CalendarHeatmapBlockProps = HTMLAttributes<SVGRectElement> & {
84
84
  /** The cell the page has picked: drawn with a ring and announced as pressed. */
85
- selected?: boolean;
85
+ selected?: boolean | undefined;
86
86
  activity: ActivityWithLevel;
87
87
  dayIndex: number;
88
88
  weekIndex: number;
89
- highlighted?: boolean;
90
- onCellClick?: (activity: ActivityWithLevel) => void;
91
- onCellHover?: (activity: ActivityWithLevel | null) => void;
89
+ highlighted?: boolean | undefined;
90
+ onCellClick?: ((activity: ActivityWithLevel) => void) | undefined;
91
+ onCellHover?: ((activity: ActivityWithLevel | null) => void) | undefined;
92
92
  };
93
93
  export declare function CalendarHeatmapBlock({ ref, activity, dayIndex, weekIndex, highlighted, selected, onCellClick, onCellHover, onClick, onKeyDown, onMouseEnter, onMouseLeave, className, style: styleProp, ...props }: CalendarHeatmapBlockProps & {
94
- ref?: React.RefObject<SVGRectElement | null>;
94
+ ref?: React.RefObject<SVGRectElement | null> | undefined;
95
95
  }): import("react").JSX.Element;
96
96
  export declare namespace CalendarHeatmapBlock {
97
97
  var displayName: string;
98
98
  }
99
99
  export type CalendarHeatmapBodyProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
100
- hideMonthLabels?: boolean;
101
- hideWeekdayLabels?: boolean;
102
- hideYearLabels?: boolean;
103
- className?: string;
104
- labelClassName?: string;
105
- yearClassName?: string;
100
+ hideMonthLabels?: boolean | undefined;
101
+ hideWeekdayLabels?: boolean | undefined;
102
+ hideYearLabels?: boolean | undefined;
103
+ className?: string | undefined;
104
+ labelClassName?: string | undefined;
105
+ yearClassName?: string | undefined;
106
106
  children: (props: {
107
107
  activity: ActivityWithLevel;
108
108
  dayIndex: number;
109
109
  weekIndex: number;
110
110
  }) => ReactNode;
111
- renderYearFooter?: (props: {
111
+ renderYearFooter?: ((props: {
112
112
  year: number;
113
113
  totalCount: number;
114
- }) => ReactNode;
114
+ }) => ReactNode) | undefined;
115
115
  };
116
116
  export declare const CalendarHeatmapBody: ({ hideMonthLabels, hideWeekdayLabels, hideYearLabels, className, labelClassName, yearClassName, children, renderYearFooter, ...props }: CalendarHeatmapBodyProps) => import("react").JSX.Element;
117
117
  export type CalendarHeatmapFooterProps = HTMLAttributes<HTMLDivElement>;
118
118
  export declare const CalendarHeatmapFooter: ({ className, ...props }: CalendarHeatmapFooterProps) => import("react").JSX.Element;
119
119
  export type CalendarHeatmapStatProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
120
- compute?: (data: ActivityWithLevel[]) => number | string;
121
- label?: string;
122
- children?: (result: {
120
+ compute?: ((data: ActivityWithLevel[]) => number | string) | undefined;
121
+ label?: string | undefined;
122
+ children?: ((result: {
123
123
  value: number | string;
124
124
  data: ActivityWithLevel[];
125
125
  year: number;
126
- }) => ReactNode;
126
+ }) => ReactNode) | undefined;
127
127
  };
128
128
  export declare const CalendarHeatmapStat: ({ compute, label, className, children, ...props }: CalendarHeatmapStatProps) => import("react").JSX.Element;
129
129
  export type CalendarHeatmapLegendProps = Omit<HTMLAttributes<HTMLFieldSetElement>, "children"> & {
130
130
  labels?: {
131
- less?: string;
132
- more?: string;
133
- };
131
+ less?: string | undefined;
132
+ more?: string | undefined;
133
+ } | undefined;
134
134
  /** A signed heatmap's figures in the legend's scale line, such as useFormat().money. */
135
- valueFormatter?: (value: number) => string;
136
- children?: (props: {
135
+ valueFormatter?: ((value: number) => string) | undefined;
136
+ children?: ((props: {
137
137
  level: number;
138
- }) => ReactNode;
138
+ }) => ReactNode) | undefined;
139
139
  };
140
140
  export declare const CalendarHeatmapLegend: ({ labels: labelsProp, valueFormatter, className, children, ...props }: CalendarHeatmapLegendProps) => import("react").JSX.Element;
141
141
  //#endregion
@@ -7,39 +7,39 @@ export type StatusActivity = {
7
7
  value: StatusValue;
8
8
  };
9
9
  export type StatusHeatmapLabels = {
10
- statuses?: Record<number, string> & {
11
- noData?: string;
12
- critical?: string;
13
- degraded?: string;
14
- healthy?: string;
15
- };
16
- stat?: string;
17
- cellLabel?: string;
18
- heatmapLabel?: string;
19
- legendLabel?: string;
10
+ statuses?: (Record<number, string> & {
11
+ noData?: string | undefined;
12
+ critical?: string | undefined;
13
+ degraded?: string | undefined;
14
+ healthy?: string | undefined;
15
+ }) | undefined;
16
+ stat?: string | undefined;
17
+ cellLabel?: string | undefined;
18
+ heatmapLabel?: string | undefined;
19
+ legendLabel?: string | undefined;
20
20
  };
21
21
  export type StatusColorConfig = Record<number, string> & {
22
- noData?: string;
23
- critical?: string;
24
- degraded?: string;
25
- healthy?: string;
22
+ noData?: string | undefined;
23
+ critical?: string | undefined;
24
+ degraded?: string | undefined;
25
+ healthy?: string | undefined;
26
26
  };
27
27
  export type StatusHeatmapProps = HTMLAttributes<HTMLDivElement> & {
28
28
  data: StatusActivity[];
29
- dateFormat?: string;
30
- blockSize?: number;
31
- blockMargin?: number;
32
- blockRadius?: number;
33
- blockAspectRatio?: number;
34
- colors?: StatusColorConfig;
35
- locale?: Locale;
36
- labels?: StatusHeatmapLabels;
37
- fontSize?: number;
29
+ dateFormat?: string | undefined;
30
+ blockSize?: number | undefined;
31
+ blockMargin?: number | undefined;
32
+ blockRadius?: number | undefined;
33
+ blockAspectRatio?: number | undefined;
34
+ colors?: StatusColorConfig | undefined;
35
+ locale?: Locale | undefined;
36
+ labels?: StatusHeatmapLabels | undefined;
37
+ fontSize?: number | undefined;
38
38
  emptyState?: ReactNode;
39
- statusValues?: StatusValue[];
40
- healthyValue?: StatusValue;
41
- style?: CSSProperties;
42
- className?: string;
39
+ statusValues?: StatusValue[] | undefined;
40
+ healthyValue?: StatusValue | undefined;
41
+ style?: CSSProperties | undefined;
42
+ className?: string | undefined;
43
43
  children: ReactNode;
44
44
  };
45
45
  /**
@@ -75,25 +75,25 @@ export type StatusHeatmapProps = HTMLAttributes<HTMLDivElement> & {
75
75
  export declare const StatusHeatmap: ({ data, dateFormat, blockSize, blockMargin, blockRadius, blockAspectRatio: blockAspectRatioProp, colors, locale, labels: labelsProp, fontSize, emptyState, statusValues, healthyValue, style, className, children, ...props }: StatusHeatmapProps) => string | number | bigint | true | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
76
76
  export type StatusHeatmapBlockProps = HTMLAttributes<SVGRectElement> & {
77
77
  /** The cell the page has picked: drawn with a ring and announced as pressed. */
78
- selected?: boolean;
78
+ selected?: boolean | undefined;
79
79
  activity: StatusActivity;
80
80
  dayIndex: number;
81
- highlighted?: boolean;
82
- onCellClick?: (activity: StatusActivity) => void;
83
- onCellHover?: (activity: StatusActivity | null) => void;
84
- className?: string;
81
+ highlighted?: boolean | undefined;
82
+ onCellClick?: ((activity: StatusActivity) => void) | undefined;
83
+ onCellHover?: ((activity: StatusActivity | null) => void) | undefined;
84
+ className?: string | undefined;
85
85
  };
86
86
  export declare function StatusHeatmapBlock({ ref, activity, dayIndex, highlighted, selected, onCellClick, onCellHover, onClick, onKeyDown, onMouseEnter, onMouseLeave, className, style: styleProp, ...props }: StatusHeatmapBlockProps & {
87
- ref?: React.RefObject<SVGRectElement | null>;
87
+ ref?: React.RefObject<SVGRectElement | null> | undefined;
88
88
  }): import("react").JSX.Element;
89
89
  export declare namespace StatusHeatmapBlock {
90
90
  var displayName: string;
91
91
  }
92
92
  export type StatusHeatmapBodyProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
93
- hideDateLabels?: boolean;
94
- labelInterval?: number;
95
- className?: string;
96
- labelClassName?: string;
93
+ hideDateLabels?: boolean | undefined;
94
+ labelInterval?: number | undefined;
95
+ className?: string | undefined;
96
+ labelClassName?: string | undefined;
97
97
  children: (props: {
98
98
  activity: StatusActivity;
99
99
  dayIndex: number;
@@ -103,20 +103,20 @@ export declare const StatusHeatmapBody: ({ hideDateLabels, labelInterval, classN
103
103
  export type StatusHeatmapFooterProps = HTMLAttributes<HTMLDivElement>;
104
104
  export declare const StatusHeatmapFooter: ({ className, ...props }: StatusHeatmapFooterProps) => import("react").JSX.Element;
105
105
  export type StatusHeatmapStatProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
106
- compute?: (data: StatusActivity[]) => number | string;
107
- label?: string;
108
- children?: (result: {
106
+ compute?: ((data: StatusActivity[]) => number | string) | undefined;
107
+ label?: string | undefined;
108
+ children?: ((result: {
109
109
  value: number | string;
110
110
  data: StatusActivity[];
111
- }) => ReactNode;
111
+ }) => ReactNode) | undefined;
112
112
  };
113
113
  export declare const StatusHeatmapStat: ({ compute, label, className, children, ...props }: StatusHeatmapStatProps) => import("react").JSX.Element;
114
114
  export type StatusHeatmapLegendProps = Omit<HTMLAttributes<HTMLFieldSetElement>, "children"> & {
115
- labels?: StatusHeatmapLabels["statuses"];
116
- children?: (props: {
115
+ labels?: StatusHeatmapLabels["statuses"] | undefined;
116
+ children?: ((props: {
117
117
  value: StatusValue;
118
118
  label: string;
119
- }) => ReactNode;
119
+ }) => ReactNode) | undefined;
120
120
  };
121
121
  export declare const StatusHeatmapLegend: ({ labels: labelsProp, className, children, ...props }: StatusHeatmapLegendProps) => import("react").JSX.Element;
122
122
  //#endregion