@factorialco/f0-react 4.58.0 → 4.59.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.
@@ -79,6 +79,7 @@ import { PieChartProps as PieChartProps_2 } from './experimental';
79
79
  import { PopoverProps } from '@radix-ui/react-popover';
80
80
  import { ProgressBarCellValue } from './types/progressBar';
81
81
  import { ProgressBarCellValue as ProgressBarCellValue_2 } from './experimental';
82
+ import { ProgressSeriesCellValue } from './types/progressSeries';
82
83
  import { Props as Props_5 } from './types';
83
84
  import { PropsWithChildren } from 'react';
84
85
  import { Provider } from 'react';
@@ -3855,6 +3856,10 @@ declare const defaultTranslations: {
3855
3856
  readonly description: "Try a different date or fewer filters";
3856
3857
  };
3857
3858
  };
3859
+ readonly progressSeries: {
3860
+ readonly noData: "No data";
3861
+ readonly canceled: "Canceled";
3862
+ };
3858
3863
  readonly select: {
3859
3864
  readonly noResults: "No results found";
3860
3865
  readonly loadingMore: "Loading...";
@@ -5960,6 +5965,85 @@ export declare const F0NumberInput: ForwardRefExoticComponent<Omit<F0NumberInput
5960
5965
 
5961
5966
  export declare type F0NumberInputProps = Omit<NumberInputInternalProps, (typeof privateProps_4)[number]>;
5962
5967
 
5968
+ /**
5969
+ * @experimental This is an experimental component, use it at your own risk.
5970
+ */
5971
+ export declare const F0ProgressSeries: WithDataTestIdReturnType_2<ForwardRefExoticComponent<F0ProgressSeriesProps & RefAttributes<HTMLDivElement>>>;
5972
+
5973
+ /**
5974
+ * One progress bar in the series — e.g. a period (Q1, Jan, 2026…). Each bar is
5975
+ * an independent progress bar (its own track + proportional fill), unlike a
5976
+ * category bar where the segments are parts of a single whole.
5977
+ */
5978
+ export declare interface F0ProgressSeriesBar {
5979
+ /**
5980
+ * Attained value. `undefined` (or a non-finite value / `max <= 0`) renders an
5981
+ * empty/future bar: track only, no fill.
5982
+ */
5983
+ value: number | undefined;
5984
+ /** Target. Defaults to 100. */
5985
+ max?: number;
5986
+ /**
5987
+ * f0 chart color token for the fill. Defaults to `"categorical-1"`. Ignored
5988
+ * when `canceled` is set.
5989
+ */
5990
+ color?: F0ProgressSeriesColor;
5991
+ /** Renders a hatched grey bar (e.g. a cancelled period). */
5992
+ canceled?: boolean;
5993
+ /** Title shown under the bar (e.g. "Q1", "Jan", "2026"). Optional. */
5994
+ label?: string;
5995
+ /**
5996
+ * Short text shown under the bar next to the label. Optional; defaults to the
5997
+ * computed percentage (which may exceed 100%). Pass "" to hide it.
5998
+ */
5999
+ caption?: string;
6000
+ /** Tooltip text. Defaults to `label · value / max (percentage)`. */
6001
+ tooltip?: string;
6002
+ }
6003
+
6004
+ export declare type F0ProgressSeriesColor = (typeof f0ProgressSeriesColors)[number];
6005
+
6006
+ /**
6007
+ * The `--chart-*` tokens `getColor` can resolve (see `f0-core`'s `base.css`).
6008
+ * Same set as `F0SegmentedBar`'s `SegmentColorToken`; the two are not shared yet
6009
+ * because `kits/F0DataChart` already owns the `ChartColorToken` name for a
6010
+ * different palette (`baseColors`). Unifying them is tracked separately.
6011
+ */
6012
+ export declare const f0ProgressSeriesColors: readonly ["categorical-1", "categorical-2", "categorical-3", "categorical-4", "categorical-5", "categorical-6", "categorical-7", "categorical-8", "feedback-positive", "feedback-neutral", "feedback-negative"];
6013
+
6014
+ /** Shared by the component and the `progressSeries` value-display cell. */
6015
+ export declare interface F0ProgressSeriesOptions {
6016
+ /** 1..N bars (N up to 12: half-yearly = 2, quarterly = 4, monthly = 12). */
6017
+ bars: F0ProgressSeriesBar[];
6018
+ /**
6019
+ * Max labels rendered under the row. When there are more bars than this, the
6020
+ * labels are spread evenly (e.g. 12 bars → indices 0, 3, 6, 9). Defaults to 4.
6021
+ */
6022
+ maxLabels?: number;
6023
+ /** Hide the per-bar tooltips. */
6024
+ hideTooltip?: boolean;
6025
+ /**
6026
+ * Formats `value`/`max` in the default tooltip — the component only knows raw
6027
+ * numbers, so pass this to render currencies, separators, units…
6028
+ * Defaults to `String(value)`.
6029
+ */
6030
+ formatValue?: (value: number) => string;
6031
+ /**
6032
+ * Renders a skeleton (same height as the loaded bar) instead of the series
6033
+ * while the data is still loading.
6034
+ */
6035
+ loading?: boolean;
6036
+ }
6037
+
6038
+ export declare interface F0ProgressSeriesProps extends F0ProgressSeriesOptions, WithDataTestIdProps {
6039
+ /** Bar height. Defaults to `"md"`. */
6040
+ size?: F0ProgressSeriesSize;
6041
+ }
6042
+
6043
+ export declare type F0ProgressSeriesSize = (typeof f0ProgressSeriesSizes)[number];
6044
+
6045
+ export declare const f0ProgressSeriesSizes: readonly ["sm", "md", "lg"];
6046
+
5963
6047
  /**
5964
6048
  * @experimental This is an experimental component, use it at your own risk
5965
6049
  */
@@ -7224,7 +7308,7 @@ export declare type InfiniteScrollPaginatedResponse<TRecord> = BasePaginatedResp
7224
7308
  */
7225
7309
  export declare const Input: ForwardRefExoticComponent<Omit<F0TextInputProps, "ref"> & RefAttributes<HTMLInputElement>>;
7226
7310
 
7227
- declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> & Pick<InputFieldProps<string>, "label" | "onChange" | "size" | "icon" | "role" | "onFocus" | "onBlur" | "transparent" | "status" | "loading" | "disabled" | "maxLength" | "required" | "error" | "append" | "hideLabel" | "hint" | "labelIcon" | "onClickContent" | "readonly" | "clearable" | "autocomplete" | "onClear" | "isEmpty" | "emptyValue" | "hideMaxLength" | "appendTag" | "lengthProvider" | "buttonToggle"> & React_2.RefAttributes<HTMLInputElement>>;
7311
+ declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> & Pick<InputFieldProps<string>, "label" | "onChange" | "size" | "icon" | "role" | "onFocus" | "onBlur" | "transparent" | "status" | "loading" | "disabled" | "maxLength" | "required" | "error" | "append" | "hideLabel" | "hint" | "isEmpty" | "labelIcon" | "onClickContent" | "readonly" | "clearable" | "autocomplete" | "onClear" | "emptyValue" | "hideMaxLength" | "appendTag" | "lengthProvider" | "buttonToggle"> & React_2.RefAttributes<HTMLInputElement>>;
7228
7312
 
7229
7313
  declare const INPUTFIELD_SIZES: readonly ["sm", "md"];
7230
7314
 
@@ -10938,6 +11022,7 @@ declare const valueDisplayRenderers: {
10938
11022
  readonly person: (args: PersonCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
10939
11023
  readonly percentage: (args: PercentageCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element | null;
10940
11024
  readonly progressBar: (args: ProgressBarCellValue, _meta: ValueDisplayRendererContext) => JSX_2.Element | null;
11025
+ readonly progressSeries: (args: ProgressSeriesCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
10941
11026
  readonly barSeries: (args: BarSeriesCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
10942
11027
  readonly categoryBarChart: (args: CategoryBarChartCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
10943
11028
  readonly hourDistribution: (args: HourDistributionCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;