@factorialco/f0-react 2.43.0 → 2.45.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/f0.d.ts CHANGED
@@ -1572,13 +1572,13 @@ export declare type BorderStyleToken = "solid" | "dashed" | "dotted" | "double"
1572
1572
  /** Border width tokens */
1573
1573
  export declare type BorderWidthToken = "none" | "default" | "thick";
1574
1574
 
1575
- export declare type BoxShadowToken = "none" | "md" | "lg" | "xl";
1575
+ export declare type BoxShadowToken = "none" | "sm" | "md" | "lg" | "xl";
1576
1576
 
1577
1577
  declare type BoxVariantProps = VariantProps<typeof boxVariants>;
1578
1578
 
1579
1579
  declare const boxVariants: (props?: ({
1580
1580
  zIndex?: "0" | "auto" | "10" | "20" | "50" | "40" | "30" | undefined;
1581
- boxShadow?: "none" | "lg" | "md" | "xl" | undefined;
1581
+ boxShadow?: "none" | "lg" | "md" | "sm" | "xl" | undefined;
1582
1582
  divider?: "x" | "y" | undefined;
1583
1583
  dividerColor?: "info" | "bold" | "default" | "secondary" | "critical" | "warning" | "positive" | "promote" | "selected" | "critical-bold" | "info-bold" | "warning-bold" | "positive-bold" | "selected-bold" | undefined;
1584
1584
  overflow?: "hidden" | "auto" | "scroll" | "visible" | undefined;
@@ -2045,6 +2045,22 @@ declare type CardAvatarVariant = AvatarVariant | {
2045
2045
  } | {
2046
2046
  type: "icon";
2047
2047
  icon: IconType;
2048
+ } | {
2049
+ type: "module";
2050
+ module: ModuleId;
2051
+ } | {
2052
+ type: "alert";
2053
+ variant: AlertAvatarProps["type"];
2054
+ } | {
2055
+ type: "date";
2056
+ date: Date;
2057
+ } | {
2058
+ type: "pulse";
2059
+ firstName: string;
2060
+ lastName: string;
2061
+ src?: string;
2062
+ pulse?: Pulse;
2063
+ onPulseClick: () => void;
2048
2064
  };
2049
2065
 
2050
2066
  /**
@@ -2259,6 +2275,33 @@ declare const cardPropertyRenderers: {
2259
2275
 
2260
2276
  declare type CardPropertyType = keyof typeof cardPropertyRenderers;
2261
2277
 
2278
+ declare interface CardRowConfirmAction {
2279
+ onClick: () => void;
2280
+ /** Accessible label and tooltip. Defaults to "Confirm" / "Reject". */
2281
+ label?: string;
2282
+ disabled?: boolean;
2283
+ }
2284
+
2285
+ /**
2286
+ * Container breakpoint at which the card row switches between its inline and its
2287
+ * stacked (actions-on-their-own-line) layout. `never` keeps it inline at every
2288
+ * width.
2289
+ */
2290
+ declare type CardRowStackAt = "sm" | "md" | "lg" | "never";
2291
+
2292
+ /**
2293
+ * Resolved state shown at the trailing edge in place of the actions: a coloured
2294
+ * icon (e.g. `Check` for accepted, `Cross` for rejected) carrying the outcome.
2295
+ */
2296
+ declare interface CardRowStatus {
2297
+ /** The icon to render (e.g. `Check` for accepted, `Cross` for rejected). */
2298
+ icon: IconType;
2299
+ /** Colour family. */
2300
+ variant: StatusVariant;
2301
+ /** Accessible label; the icon carries meaning, so this is required. */
2302
+ label: string;
2303
+ }
2304
+
2262
2305
  declare interface CardSecondaryAction {
2263
2306
  label: string;
2264
2307
  icon?: IconType;
@@ -6850,6 +6893,98 @@ compact?: boolean;
6850
6893
 
6851
6894
  export declare type F0CardProps = Omit<CardInternalProps, (typeof privateProps_3)[number]>;
6852
6895
 
6896
+ export declare const F0CardRow: WithDataTestIdReturnType_3<ForwardRefExoticComponent<F0CardRowProps & RefAttributes<HTMLDivElement>> & {
6897
+ Skeleton: ({ compact }: {
6898
+ compact?: boolean;
6899
+ }) => JSX_2.Element;
6900
+ }>;
6901
+
6902
+ export declare interface F0CardRowProps {
6903
+ /**
6904
+ * The primary line of text.
6905
+ */
6906
+ title: string;
6907
+ /**
6908
+ * Optional secondary line shown beneath the title (wraps across multiple
6909
+ * lines when long).
6910
+ */
6911
+ description?: string;
6912
+ /**
6913
+ * Optional avatar rendered at a fixed `lg` size on the left (the size is not
6914
+ * configurable). Accepts any avatar type in the system: person, company, team,
6915
+ * file, flag, icon, emoji, module, alert, date, pulse. Types without a `lg`
6916
+ * variant (date, pulse) render at their intrinsic size.
6917
+ */
6918
+ avatar?: CardAvatarVariant;
6919
+ /**
6920
+ * The primary action button, shown at the trailing edge of the row.
6921
+ */
6922
+ primaryAction?: CardPrimaryAction;
6923
+ /**
6924
+ * Secondary actions (buttons) or a single link, shown before the primary action.
6925
+ */
6926
+ secondaryActions?: CardSecondaryAction[] | CardSecondaryLink;
6927
+ /**
6928
+ * Overflow (⋯) menu actions, rendered as the trailing control of the row.
6929
+ */
6930
+ otherActions?: DropdownItem[];
6931
+ /**
6932
+ * Confirm/reject variant: renders an icon-only ✗ (reject) + ✓ (confirm) pair
6933
+ * instead of the standard actions. Provide either or both.
6934
+ */
6935
+ confirmAction?: CardRowConfirmAction;
6936
+ /**
6937
+ * Reject (✗) action of the confirm/reject variant. See {@link confirmAction}.
6938
+ */
6939
+ rejectAction?: CardRowConfirmAction;
6940
+ /**
6941
+ * Resolved-state icon shown at the trailing edge in place of any actions — the
6942
+ * outcome of a confirm/reject row, e.g.
6943
+ * `{ icon: Check, variant: "positive", label: "Accepted" }`.
6944
+ * Takes precedence over the action props.
6945
+ */
6946
+ status?: CardRowStatus;
6947
+ /**
6948
+ * Strikes through and dims the title/description, marking the row's subject as
6949
+ * void or closed (e.g. a rejected request). Purely presentational — pair it
6950
+ * with the matching `status` tag at the call site.
6951
+ */
6952
+ inactive?: boolean;
6953
+ /**
6954
+ * Compact layout: tighter padding and smaller controls.
6955
+ */
6956
+ compact?: boolean;
6957
+ /**
6958
+ * Container width at which the actions drop to their own line (below it) vs.
6959
+ * sit inline (at/above it). `never` keeps them inline at every width.
6960
+ * @default "never"
6961
+ */
6962
+ stackAt?: CardRowStackAt;
6963
+ /**
6964
+ * When set, the whole row becomes a link to this href.
6965
+ */
6966
+ link?: string;
6967
+ /**
6968
+ * Stretch to fill the height of its container.
6969
+ */
6970
+ fullHeight?: boolean;
6971
+ /**
6972
+ * Alert banner displayed above the row with a coloured header strip and matching
6973
+ * border. Supports info, warning, critical and positive variants.
6974
+ * Use `visible` + `onDismiss` for controlled dismiss behaviour.
6975
+ */
6976
+ alert?: CardAlertProps;
6977
+ /**
6978
+ * Called when the row is clicked.
6979
+ */
6980
+ onClick?: () => void;
6981
+ /**
6982
+ * Disables the full-row overlay link so a parent can manage drag-and-drop while
6983
+ * still allowing click navigation via `onClick`.
6984
+ */
6985
+ disableOverlayLink?: boolean;
6986
+ }
6987
+
6853
6988
  declare interface F0CardSelectConfig {
6854
6989
  options: CardSelectOption[];
6855
6990
  hideLabel?: boolean;
@@ -12909,6 +13044,10 @@ declare type Props_3 = {
12909
13044
 
12910
13045
  declare type Props_4 = {} & Pick<BaseHeaderProps, "avatar" | "title" | "description" | "primaryAction" | "secondaryActions" | "otherActions" | "metadata" | "status" | "deactivated" | "showBottomBorder">;
12911
13046
 
13047
+ declare type Pulse = (typeof pulses)[number];
13048
+
13049
+ declare const pulses: readonly ["superNegative", "negative", "neutral", "positive", "superPositive"];
13050
+
12912
13051
  export declare type QuestionActionParams = {
12913
13052
  questionId: string;
12914
13053
  type: ActionType;