@payfit/unity-components 3.9.4 → 3.9.5

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 (25) hide show
  1. package/dist/esm/ai-kit.js +21 -15
  2. package/dist/esm/core/components/navigation-card/NavigationCard.context.d.ts +2 -0
  3. package/dist/esm/core/components/navigation-card/NavigationCard.context.js +3 -1
  4. package/dist/esm/core/components/navigation-card/NavigationCard.js +45 -37
  5. package/dist/esm/core/components/navigation-card/NavigationCard.variants.js +2 -2
  6. package/dist/esm/integrations/tanstack-router.js +11 -10
  7. package/dist/esm/modules/ai-kit/components/ai-outcome-card/RawAIOutcomeCard.d.ts +68 -0
  8. package/dist/esm/modules/ai-kit/components/ai-outcome-card/RawAIOutcomeCard.js +20 -0
  9. package/dist/esm/modules/ai-kit/components/ai-outcome-card/figma/AIOutcomeCard.figma.d.ts +7 -0
  10. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardAction.d.ts +21 -0
  11. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardAction.js +12 -0
  12. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardActions.d.ts +21 -0
  13. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardActions.js +10 -0
  14. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardDescription.d.ts +30 -0
  15. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardDescription.js +23 -0
  16. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardIcon.d.ts +25 -0
  17. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardIcon.js +17 -0
  18. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardTitle.d.ts +16 -0
  19. package/dist/esm/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardTitle.js +19 -0
  20. package/dist/esm/modules/ai-kit/index.d.ts +6 -0
  21. package/dist/esm/modules/tanstack-router/components/ai-outcome-card/AIOutcomeCard.d.ts +27 -0
  22. package/dist/esm/modules/tanstack-router/components/ai-outcome-card/AIOutcomeCard.js +17 -0
  23. package/dist/esm/modules/tanstack-router/index.d.ts +1 -0
  24. package/package.json +7 -7
  25. package/src/agent-references/component-catalog.json +50 -0
@@ -1,15 +1,21 @@
1
- import { aiGradientEffect as e, aiGradientSurfaceEffect as t } from "./modules/ai-kit/utils/ai-gradient-effect.js";
2
- import { AIButton as n } from "./modules/ai-kit/components/ai-button/AIButton.js";
3
- import { PayfitAIBrand as r } from "./modules/ai-kit/components/payfit-ai-brand/PayfitAIBrand.js";
4
- import { AITriggerButton as i } from "./modules/ai-kit/components/ai-trigger-button/AITriggerButton.js";
5
- import { AIComposerAttachment as a } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAttachment.js";
6
- import { AIComposerAttachmentsGroup as o } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAttachmentsGroup.js";
7
- import { AIComposer as s } from "./modules/ai-kit/components/ai-composer/AIComposer.js";
8
- import { AIComposerAction as c } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAction.js";
9
- import { AIComposerActions as l } from "./modules/ai-kit/components/ai-composer/parts/AIComposerActions.js";
10
- import { AIComposerAlert as u } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAlert.js";
11
- import { AIComposerSubmitAction as d } from "./modules/ai-kit/components/ai-composer/parts/AIComposerSubmitAction.js";
12
- import { AIComposerTextArea as f } from "./modules/ai-kit/components/ai-composer/parts/AIComposerTextArea.js";
13
- import { useAIKitFieldContext as p, useAIKitFormContext as m } from "./modules/ai-kit/hooks/ai-kit-form-context.js";
14
- import { aiKitForm as h, useAIKitForm as g } from "./modules/ai-kit/hooks/use-ai-kit-form.js";
15
- export { n as AIButton, s as AIComposer, c as AIComposerAction, l as AIComposerActions, u as AIComposerAlert, a as AIComposerAttachment, o as AIComposerAttachmentsGroup, d as AIComposerSubmitAction, f as AIComposerTextArea, i as AITriggerButton, r as PayfitAIBrand, e as aiGradientEffect, t as aiGradientSurfaceEffect, h as aiKitForm, p as useAIKitFieldContext, g as useAIKitForm, m as useAIKitFormContext };
1
+ import { RawAIOutcomeCard as e } from "./modules/ai-kit/components/ai-outcome-card/RawAIOutcomeCard.js";
2
+ import { aiGradientEffect as t, aiGradientSurfaceEffect as n } from "./modules/ai-kit/utils/ai-gradient-effect.js";
3
+ import { AIButton as r } from "./modules/ai-kit/components/ai-button/AIButton.js";
4
+ import { PayfitAIBrand as i } from "./modules/ai-kit/components/payfit-ai-brand/PayfitAIBrand.js";
5
+ import { AITriggerButton as a } from "./modules/ai-kit/components/ai-trigger-button/AITriggerButton.js";
6
+ import { AIComposerAttachment as o } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAttachment.js";
7
+ import { AIComposerAttachmentsGroup as s } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAttachmentsGroup.js";
8
+ import { AIComposer as c } from "./modules/ai-kit/components/ai-composer/AIComposer.js";
9
+ import { AIComposerAction as l } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAction.js";
10
+ import { AIComposerActions as u } from "./modules/ai-kit/components/ai-composer/parts/AIComposerActions.js";
11
+ import { AIComposerAlert as d } from "./modules/ai-kit/components/ai-composer/parts/AIComposerAlert.js";
12
+ import { AIComposerSubmitAction as f } from "./modules/ai-kit/components/ai-composer/parts/AIComposerSubmitAction.js";
13
+ import { AIComposerTextArea as p } from "./modules/ai-kit/components/ai-composer/parts/AIComposerTextArea.js";
14
+ import { useAIKitFieldContext as m, useAIKitFormContext as h } from "./modules/ai-kit/hooks/ai-kit-form-context.js";
15
+ import { aiKitForm as g, useAIKitForm as _ } from "./modules/ai-kit/hooks/use-ai-kit-form.js";
16
+ import { AIOutcomeCardIcon as v } from "./modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardIcon.js";
17
+ import { AIOutcomeCardTitle as y } from "./modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardTitle.js";
18
+ import { AIOutcomeCardDescription as b } from "./modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardDescription.js";
19
+ import { AIOutcomeCardActions as x } from "./modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardActions.js";
20
+ import { AIOutcomeCardAction as S } from "./modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardAction.js";
21
+ export { r as AIButton, c as AIComposer, l as AIComposerAction, u as AIComposerActions, d as AIComposerAlert, o as AIComposerAttachment, s as AIComposerAttachmentsGroup, f as AIComposerSubmitAction, p as AIComposerTextArea, S as AIOutcomeCardAction, x as AIOutcomeCardActions, b as AIOutcomeCardDescription, v as AIOutcomeCardIcon, y as AIOutcomeCardTitle, a as AITriggerButton, i as PayfitAIBrand, e as RawAIOutcomeCard, t as aiGradientEffect, n as aiGradientSurfaceEffect, g as aiKitForm, m as useAIKitFieldContext, _ as useAIKitForm, h as useAIKitFormContext };
@@ -2,6 +2,8 @@ export interface NavigationCardContextValue {
2
2
  id: string;
3
3
  labelId: string;
4
4
  descriptionId: string;
5
+ isHovered: boolean;
6
+ isFocused: boolean;
5
7
  }
6
8
  export declare const NavigationCardContext: import('react').Context<NavigationCardContextValue>;
7
9
  /**
@@ -3,7 +3,9 @@ import { createContext as e, useContext as t } from "react";
3
3
  var n = e({
4
4
  id: "",
5
5
  labelId: "",
6
- descriptionId: ""
6
+ descriptionId: "",
7
+ isHovered: !1,
8
+ isFocused: !1
7
9
  });
8
10
  function r() {
9
11
  return t(n);
@@ -1,53 +1,61 @@
1
1
  import { processPaddingProp as e } from "../../utils/spacing.js";
2
2
  import { NavigationCardContext as t } from "./NavigationCard.context.js";
3
3
  import { navigationCard as n } from "./NavigationCard.variants.js";
4
- import { forwardRef as r, useMemo as i } from "react";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import { Button as s } from "react-aria-components/Button";
7
- import { Link as c } from "react-aria-components/Link";
8
- import { useId as l } from "react-aria/useId";
4
+ import { forwardRef as r, useMemo as i, useState as a } from "react";
5
+ import { mergeProps as o, useFocusVisible as s, useFocusWithin as c, useHover as l } from "react-aria";
6
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ import { Button as f } from "react-aria-components/Button";
8
+ import { Link as p } from "react-aria-components/Link";
9
+ import { useId as m } from "react-aria/useId";
9
10
  //#region src/core/components/navigation-card/NavigationCard.tsx
10
- var u = r(({ children: r, asElement: u = "a", prefix: d, suffix: f, padding: p = "$300", paddingBlock: m, paddingInline: h, gap: g = "$150", ..._ }, v) => {
11
- let y = l(), b = u === "a" || "href" in _, x = _, S = {
12
- id: `unity-navigation-card-${y}`,
13
- labelId: _["aria-labelledby"] ?? `unity-navigation-card-label-${y}`,
14
- descriptionId: _["aria-describedby"] ?? `unity-navigation-card-description-${y}`
15
- }, { base: C, prefix: w, body: T, suffix: E } = i(() => n({
16
- ...e(p, m, h),
17
- gap: g
11
+ var h = r(({ children: r, asElement: h = "a", prefix: g, suffix: _, padding: v = "$300", paddingBlock: y, paddingInline: b, gap: x = "$150", ...S }, C) => {
12
+ let w = m(), [T, E] = a(!1), D = h === "a" || "href" in S, O = S, k = {
13
+ id: `unity-navigation-card-${w}`,
14
+ labelId: S["aria-labelledby"] ?? `unity-navigation-card-label-${w}`,
15
+ descriptionId: S["aria-describedby"] ?? `unity-navigation-card-description-${w}`
16
+ }, { hoverProps: A, isHovered: j } = l({ isDisabled: O.isDisabled }), { focusWithinProps: M } = c({
17
+ isDisabled: O.isDisabled,
18
+ onFocusWithinChange: E
19
+ }), { isFocusVisible: N } = s(), P = {
20
+ ...k,
21
+ isHovered: j,
22
+ isFocused: T && N
23
+ }, { base: F, prefix: I, body: L, suffix: R } = i(() => n({
24
+ ...e(v, y, b),
25
+ gap: x
18
26
  }), [
19
- p,
20
- m,
21
- h,
22
- g
23
- ]), D = b ? c : s;
24
- return /* @__PURE__ */ a(t.Provider, {
25
- value: S,
26
- children: /* @__PURE__ */ o(D, {
27
+ v,
28
+ y,
29
+ b,
30
+ x
31
+ ]), z = D ? p : f;
32
+ return /* @__PURE__ */ u(t.Provider, {
33
+ value: P,
34
+ children: /* @__PURE__ */ d(z, {
27
35
  "data-dd-privacy": "allow",
28
- id: S.id,
29
- "aria-labelledby": S.labelId,
30
- "aria-describedby": S.descriptionId,
31
- ...x,
32
- ref: v,
33
- className: C(),
36
+ id: k.id,
37
+ "aria-labelledby": k.labelId,
38
+ "aria-describedby": k.descriptionId,
39
+ ...o(O, A, M),
40
+ ref: C,
41
+ className: F(),
34
42
  children: [
35
- d && /* @__PURE__ */ a("div", {
36
- className: w(),
37
- children: d
43
+ g && /* @__PURE__ */ u("div", {
44
+ className: I(),
45
+ children: g
38
46
  }),
39
- /* @__PURE__ */ a("div", {
40
- className: T(),
47
+ /* @__PURE__ */ u("div", {
48
+ className: L(),
41
49
  children: r
42
50
  }),
43
- f && /* @__PURE__ */ a("div", {
44
- className: E(),
45
- children: f
51
+ _ && /* @__PURE__ */ u("div", {
52
+ className: R(),
53
+ children: _
46
54
  })
47
55
  ]
48
56
  })
49
57
  });
50
58
  });
51
- u.displayName = "RawNavigationCard";
59
+ h.displayName = "RawNavigationCard";
52
60
  //#endregion
53
- export { u as RawNavigationCard };
61
+ export { h as RawNavigationCard };
@@ -3,7 +3,7 @@ import { uyTv as e } from "@payfit/unity-themes";
3
3
  var t = e({
4
4
  slots: {
5
5
  base: [
6
- "uy:flex uy:flex-row uy:items-center uy:text-left",
6
+ "uy:flex uy:w-full uy:flex-row uy:items-center uy:text-left",
7
7
  "uy:rounded-lg uy:border-solid uy:border-1 uy:transition-colors uy:group",
8
8
  "uy:cursor-pointer uy:data-[disabled]:cursor-not-allowed",
9
9
  "uy:bg-surface-neutral uy:border-border-neutral",
@@ -14,7 +14,7 @@ var t = e({
14
14
  "uy:data-[disabled]:bg-surface-neutral-disabled uy:data-[disabled]:border-border-neutral-disabled"
15
15
  ],
16
16
  prefix: ["uy:w-fit uy:contents uy:grow-0 uy:shrink-1"],
17
- body: ["uy:flex-1 uy:space-y-50"],
17
+ body: ["uy:min-w-0 uy:flex-1 uy:space-y-50"],
18
18
  suffix: ["uy:w-fit uy:grow-0 uy:shrink-1"]
19
19
  },
20
20
  variants: {
@@ -10,13 +10,14 @@ import { ListView as c } from "../modules/tanstack-router/components/list-view/L
10
10
  import { ListViewItem as l } from "../modules/tanstack-router/components/list-view/parts/ListViewItem.js";
11
11
  import { MenuItem as u } from "../modules/tanstack-router/components/menu-item/MenuItem.js";
12
12
  import { NavigationCard as d } from "../modules/tanstack-router/components/navigation-card/NavigationCard.js";
13
- import { NavItem as f } from "../modules/tanstack-router/components/nav-item/NavItem.js";
14
- import { PaginationLink as p } from "../modules/tanstack-router/components/pagination/PaginationLink.js";
15
- import { PaginationNext as m } from "../modules/tanstack-router/components/pagination/PaginationNext.js";
16
- import { PaginationPrevious as h } from "../modules/tanstack-router/components/pagination/PaginationPrevious.js";
17
- import { Tab as g } from "../modules/tanstack-router/components/tabs/parts/Tab.js";
18
- import { TabPanel as _ } from "../modules/tanstack-router/components/tabs/parts/TabPanel.js";
19
- import { Tabs as v } from "../modules/tanstack-router/components/tabs/Tabs.js";
20
- import { Task as y } from "../modules/tanstack-router/components/task-menu/Task.js";
21
- import { SubTask as b } from "../modules/tanstack-router/components/task-menu/SubTask.js";
22
- export { t as Breadcrumb, r as BreadcrumbLink, e as Breadcrumbs, a as IconButtonLink, o as Link, s as LinkButton, c as ListView, l as ListViewItem, u as MenuItem, f as NavItem, d as NavigationCard, p as PaginationLink, m as PaginationNext, h as PaginationPrevious, b as SubTask, g as Tab, n as TabList, _ as TabPanel, v as Tabs, i as TanstackFormContextualLink, y as Task };
13
+ import { AIOutcomeCard as f } from "../modules/tanstack-router/components/ai-outcome-card/AIOutcomeCard.js";
14
+ import { NavItem as p } from "../modules/tanstack-router/components/nav-item/NavItem.js";
15
+ import { PaginationLink as m } from "../modules/tanstack-router/components/pagination/PaginationLink.js";
16
+ import { PaginationNext as h } from "../modules/tanstack-router/components/pagination/PaginationNext.js";
17
+ import { PaginationPrevious as g } from "../modules/tanstack-router/components/pagination/PaginationPrevious.js";
18
+ import { Tab as _ } from "../modules/tanstack-router/components/tabs/parts/Tab.js";
19
+ import { TabPanel as v } from "../modules/tanstack-router/components/tabs/parts/TabPanel.js";
20
+ import { Tabs as y } from "../modules/tanstack-router/components/tabs/Tabs.js";
21
+ import { Task as b } from "../modules/tanstack-router/components/task-menu/Task.js";
22
+ import { SubTask as x } from "../modules/tanstack-router/components/task-menu/SubTask.js";
23
+ export { f as AIOutcomeCard, t as Breadcrumb, r as BreadcrumbLink, e as Breadcrumbs, a as IconButtonLink, o as Link, s as LinkButton, c as ListView, l as ListViewItem, u as MenuItem, p as NavItem, d as NavigationCard, m as PaginationLink, h as PaginationNext, g as PaginationPrevious, x as SubTask, _ as Tab, n as TabList, v as TabPanel, y as Tabs, i as TanstackFormContextualLink, b as Task };
@@ -0,0 +1,68 @@
1
+ import { ButtonProps } from 'react-aria-components/Button';
2
+ import { LinkProps } from 'react-aria-components/Link';
3
+ type AIOutcomeCardContentProps = {
4
+ /** Renders the prescribed outcome icon in the leading card slot. */
5
+ icon: React.ReactNode;
6
+ /** Renders visual-only action content in the trailing card slot. */
7
+ actions?: React.ReactNode;
8
+ };
9
+ type AIOutcomeCardLinkProps = Omit<LinkProps, 'className' | 'style'> & AIOutcomeCardContentProps & {
10
+ asElement?: 'a';
11
+ };
12
+ type AIOutcomeCardButtonProps = Omit<ButtonProps, 'className' | 'style'> & AIOutcomeCardContentProps & {
13
+ asElement: 'button';
14
+ };
15
+ /** Props for {@link RawAIOutcomeCard}. */
16
+ export type RawAIOutcomeCardProps = AIOutcomeCardLinkProps | AIOutcomeCardButtonProps;
17
+ /**
18
+ * Gives people a clear next step after an AI-generated outcome.
19
+ * Renders one accessible card surface with a prescribed icon, composed title
20
+ * and description, and optional trailing visual actions. It can be either a native
21
+ * link or a native button.
22
+ * @param props - Link or button props, outcome content, and trailing actions.
23
+ * @param props.icon - The fixed Outcome Card icon treatment.
24
+ * @param props.actions - Visual-only content rendered at the trailing edge of
25
+ * the card.
26
+ * @param props.children - Compose `AIOutcomeCardTitle` and
27
+ * `AIOutcomeCardDescription` to name and describe the outcome.
28
+ * @see {@link RawAIOutcomeCardProps} for all available props.
29
+ * @see {@link AIOutcomeCardTitle} and {@link AIOutcomeCardDescription} for the
30
+ * accessible name and description parts.
31
+ * @example
32
+ * ```tsx
33
+ * import {
34
+ * AIOutcomeCardAction,
35
+ * AIOutcomeCardActions,
36
+ * AIOutcomeCardDescription,
37
+ * AIOutcomeCardIcon,
38
+ * AIOutcomeCardTitle,
39
+ * RawAIOutcomeCard,
40
+ * } from '@payfit/unity-components/ai-kit'
41
+ *
42
+ * export function PaidLeaveOutcome() {
43
+ * return (
44
+ * <RawAIOutcomeCard
45
+ * actions={
46
+ * <AIOutcomeCardActions>
47
+ * <AIOutcomeCardAction>View</AIOutcomeCardAction>
48
+ * </AIOutcomeCardActions>
49
+ * }
50
+ * href="/leave/requests/123"
51
+ * icon={<AIOutcomeCardIcon name="Calendar" />}
52
+ * >
53
+ * <AIOutcomeCardTitle>Paid leave</AIOutcomeCardTitle>
54
+ * <AIOutcomeCardDescription>
55
+ * View paid leave request
56
+ * </AIOutcomeCardDescription>
57
+ * </RawAIOutcomeCard>
58
+ * )
59
+ * }
60
+ * ```
61
+ * @remarks
62
+ * `AIOutcomeCardTitle` supplies the card's accessible name and
63
+ * `AIOutcomeCardDescription` supplies its accessible description. Keep
64
+ * `actions` free of links, buttons, menu triggers, and other interactive
65
+ * elements because the card is the sole interactive surface.
66
+ */
67
+ declare const RawAIOutcomeCard: import('react').ForwardRefExoticComponent<RawAIOutcomeCardProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
68
+ export { RawAIOutcomeCard };
@@ -0,0 +1,20 @@
1
+ import { RawNavigationCard as e } from "../../../../core/components/navigation-card/NavigationCard.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region src/modules/ai-kit/components/ai-outcome-card/RawAIOutcomeCard.tsx
5
+ var r = t(({ icon: t, actions: r, ...i }, a) => /* @__PURE__ */ n(e, {
6
+ ...i,
7
+ ref: a,
8
+ prefix: t,
9
+ suffix: r,
10
+ padding: {
11
+ top: "$100",
12
+ bottom: "$100",
13
+ left: "$125",
14
+ right: "$200"
15
+ },
16
+ gap: "$150"
17
+ }));
18
+ r.displayName = "RawAIOutcomeCard";
19
+ //#endregion
20
+ export { r as RawAIOutcomeCard };
@@ -0,0 +1,7 @@
1
+ import { default as figma } from 'figma';
2
+ declare const _default: {
3
+ example: figma.TemplateStringResult;
4
+ imports: string[];
5
+ id: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import { PropsWithChildren } from 'react';
2
+ /** Props for {@link AIOutcomeCardAction}. */
3
+ export type AIOutcomeCardActionProps = PropsWithChildren<Record<never, never>>;
4
+ /**
5
+ * Communicates the Outcome Card's available next step without adding visual
6
+ * weight to the outcome itself.
7
+ *
8
+ * Renders `children` with the prescribed action typography and hides the
9
+ * label from assistive technology when the parent card already exposes the
10
+ * accessible outcome name and description.
11
+ *
12
+ * Compose `AIOutcomeCardAction` inside `AIOutcomeCardActions` and pass the
13
+ * visible action label as `children`.
14
+ * @param props - The visible action label.
15
+ * @param props.children - Text that describes the next action visually.
16
+ */
17
+ declare const AIOutcomeCardAction: {
18
+ ({ children }: AIOutcomeCardActionProps): import('react/jsx-runtime').JSX.Element;
19
+ displayName: string;
20
+ };
21
+ export { AIOutcomeCardAction };
@@ -0,0 +1,12 @@
1
+ import { Text as e } from "../../../../../core/components/text/Text.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardAction.tsx
4
+ var n = ({ children: n }) => /* @__PURE__ */ t(e, {
5
+ "aria-hidden": "true",
6
+ color: "content.neutral",
7
+ variant: "action",
8
+ children: n
9
+ });
10
+ n.displayName = "AIOutcomeCardAction";
11
+ //#endregion
12
+ export { n as AIOutcomeCardAction };
@@ -0,0 +1,21 @@
1
+ import { HTMLAttributes, PropsWithChildren } from 'react';
2
+ /** Props for {@link AIOutcomeCardActions}. */
3
+ export type AIOutcomeCardActionsProps = PropsWithChildren<Pick<HTMLAttributes<HTMLDivElement>, 'children' | 'className'>>;
4
+ /**
5
+ * Keeps Outcome Card actions aligned without taking space from the outcome
6
+ * title and description.
7
+ *
8
+ * Renders `children` in a horizontal, spaced suffix container.
9
+ *
10
+ * Pass `AIOutcomeCardActions` through the parent card's `actions` prop and
11
+ * compose visual-only trailing labels as `children`. The parent card is the
12
+ * sole interactive surface, so do not nest links, buttons, or menu triggers.
13
+ * @param props - Suffix content and an optional `className`.
14
+ * @param props.children - One or more visual-only trailing action labels.
15
+ * @param props.className - Additional classes merged with the suffix layout.
16
+ */
17
+ declare const AIOutcomeCardActions: {
18
+ ({ children, className, }: AIOutcomeCardActionsProps): import('react/jsx-runtime').JSX.Element;
19
+ displayName: string;
20
+ };
21
+ export { AIOutcomeCardActions };
@@ -0,0 +1,10 @@
1
+ import { uyTv as e } from "@payfit/unity-themes";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardActions.tsx
4
+ var n = e({ base: "uy:flex uy:items-center uy:gap-100" }), r = ({ children: e, className: r }) => /* @__PURE__ */ t("div", {
5
+ className: n({ className: r }),
6
+ children: e
7
+ });
8
+ r.displayName = "AIOutcomeCardActions";
9
+ //#endregion
10
+ export { r as AIOutcomeCardActions };
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import { TextProps } from '../../../../../core/components/text/Text.js';
3
+ /** Props for {@link AIOutcomeCardDescription}. */
4
+ export type AIOutcomeCardDescriptionProps = Omit<TextProps, 'children' | 'variant' | 'color' | 'className' | 'isTruncated' | 'style'> & {
5
+ children: ReactNode | ((renderProps: {
6
+ isHovered: boolean;
7
+ isFocused: boolean;
8
+ }) => ReactNode);
9
+ };
10
+ /**
11
+ * Adds supporting context to an Outcome Card without competing with its title.
12
+ *
13
+ * Renders `children` in the prescribed small body typography and connects the
14
+ * text to the parent card through `aria-describedby`. A function child also
15
+ * receives the card's hover and focus-visible state.
16
+ *
17
+ * Compose `AIOutcomeCardDescription` inside `RawAIOutcomeCard`. Pass static
18
+ * `children` for persistent context, or a render function that reads
19
+ * `isHovered` and `isFocused` to change the visible description.
20
+ * @param props - Text attributes and static or state-aware `children`.
21
+ * @param props.children - Description content, or a function receiving
22
+ * `isHovered` and `isFocused`.
23
+ */
24
+ declare const AIOutcomeCardDescription: import('react').ForwardRefExoticComponent<Omit<TextProps, "color" | "children" | "className" | "style" | "variant" | "isTruncated"> & {
25
+ children: ReactNode | ((renderProps: {
26
+ isHovered: boolean;
27
+ isFocused: boolean;
28
+ }) => ReactNode);
29
+ } & import('react').RefAttributes<HTMLElement>>;
30
+ export { AIOutcomeCardDescription };
@@ -0,0 +1,23 @@
1
+ import { Text as e } from "../../../../../core/components/text/Text.js";
2
+ import { useNavigationCardContext as t } from "../../../../../core/components/navigation-card/NavigationCard.context.js";
3
+ import { forwardRef as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardDescription.tsx
6
+ var i = n(({ children: n, ...i }, a) => {
7
+ let { descriptionId: o, isFocused: s, isHovered: c } = t(), l = typeof n == "function" ? n({
8
+ isHovered: c,
9
+ isFocused: s
10
+ }) : n;
11
+ return /* @__PURE__ */ r(e, {
12
+ ...i,
13
+ ref: a,
14
+ id: o,
15
+ color: "content.neutral.low",
16
+ isTruncated: !0,
17
+ variant: "bodySmall",
18
+ children: l
19
+ });
20
+ });
21
+ i.displayName = "AIOutcomeCardDescription";
22
+ //#endregion
23
+ export { i as AIOutcomeCardDescription };
@@ -0,0 +1,25 @@
1
+ /** Props for {@link AIOutcomeCardIcon}. */
2
+ export interface AIOutcomeCardIconProps {
3
+ /**
4
+ * Selects the canonical Unity icon without its visual variant suffix.
5
+ * `AIOutcomeCardIcon` always renders the outlined 24px treatment.
6
+ */
7
+ name: string;
8
+ }
9
+ /**
10
+ * Makes AI outcomes scannable without creating another interactive target.
11
+ *
12
+ * Renders a decorative, fixed-size icon tile using the outlined 24px Unity
13
+ * icon treatment and neutral tokens.
14
+ *
15
+ * Pass the canonical icon `name` without the `Outlined` suffix, such as
16
+ * `Calendar`. The component applies the icon variant, size, color, and
17
+ * `aria-hidden` treatment.
18
+ * @param props - The canonical Unity icon name.
19
+ * @param props.name - Icon name without the `Outlined` suffix.
20
+ */
21
+ declare const AIOutcomeCardIcon: {
22
+ ({ name }: AIOutcomeCardIconProps): import('react/jsx-runtime').JSX.Element;
23
+ displayName: string;
24
+ };
25
+ export { AIOutcomeCardIcon };
@@ -0,0 +1,17 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Icon as t } from "@payfit/unity-icons";
3
+ //#region src/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardIcon.tsx
4
+ var n = ({ name: n }) => /* @__PURE__ */ e("div", {
5
+ "aria-hidden": "true",
6
+ className: "uy:flex uy:size-600 uy:items-center uy:justify-center uy:rounded-md uy:bg-surface-neutral-low",
7
+ children: /* @__PURE__ */ e(t, {
8
+ "aria-hidden": "true",
9
+ color: "content.neutral",
10
+ role: "presentation",
11
+ size: 24,
12
+ src: `${n}Outlined`
13
+ })
14
+ });
15
+ n.displayName = "AIOutcomeCardIcon";
16
+ //#endregion
17
+ export { n as AIOutcomeCardIcon };
@@ -0,0 +1,16 @@
1
+ import { TextProps } from '../../../../../core/components/text/Text.js';
2
+ /** Props for {@link AIOutcomeCardTitle}. */
3
+ export type AIOutcomeCardTitleProps = Omit<TextProps, 'variant' | 'color' | 'className' | 'isTruncated' | 'style'>;
4
+ /**
5
+ * Names an Outcome Card so people and assistive technology can identify it.
6
+ *
7
+ * Renders `children` with the prescribed strong body typography and connects
8
+ * that text to the parent card through `aria-labelledby`.
9
+ *
10
+ * Compose one `AIOutcomeCardTitle` inside `RawAIOutcomeCard` and pass the
11
+ * outcome name as `children`.
12
+ * @param props - Text attributes and the title `children`.
13
+ * @param props.children - The outcome name announced as the card's label.
14
+ */
15
+ declare const AIOutcomeCardTitle: import('react').ForwardRefExoticComponent<AIOutcomeCardTitleProps & import('react').RefAttributes<HTMLElement>>;
16
+ export { AIOutcomeCardTitle };
@@ -0,0 +1,19 @@
1
+ import { Text as e } from "../../../../../core/components/text/Text.js";
2
+ import { useNavigationCardContext as t } from "../../../../../core/components/navigation-card/NavigationCard.context.js";
3
+ import { forwardRef as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/modules/ai-kit/components/ai-outcome-card/parts/AIOutcomeCardTitle.tsx
6
+ var i = n((n, i) => {
7
+ let { labelId: a } = t();
8
+ return /* @__PURE__ */ r(e, {
9
+ ...n,
10
+ ref: i,
11
+ id: a,
12
+ color: "content.neutral",
13
+ isTruncated: !0,
14
+ variant: "bodyStrong"
15
+ });
16
+ });
17
+ i.displayName = "AIOutcomeCardTitle";
18
+ //#endregion
19
+ export { i as AIOutcomeCardTitle };
@@ -13,3 +13,9 @@ export { AIComposerTextArea, type AIComposerTextAreaProps, } from './components/
13
13
  export { aiGradientEffect, aiGradientSurfaceEffect, } from './utils/ai-gradient-effect.js';
14
14
  export { aiKitForm, useAIKitForm } from './hooks/use-ai-kit-form.js';
15
15
  export { useAIKitFieldContext, useAIKitFormContext, } from './hooks/ai-kit-form-context.js';
16
+ export { RawAIOutcomeCard, type RawAIOutcomeCardProps, } from './components/ai-outcome-card/RawAIOutcomeCard.js';
17
+ export { AIOutcomeCardIcon, type AIOutcomeCardIconProps, } from './components/ai-outcome-card/parts/AIOutcomeCardIcon.js';
18
+ export { AIOutcomeCardTitle, type AIOutcomeCardTitleProps, } from './components/ai-outcome-card/parts/AIOutcomeCardTitle.js';
19
+ export { AIOutcomeCardDescription, type AIOutcomeCardDescriptionProps, } from './components/ai-outcome-card/parts/AIOutcomeCardDescription.js';
20
+ export { AIOutcomeCardActions, type AIOutcomeCardActionsProps, } from './components/ai-outcome-card/parts/AIOutcomeCardActions.js';
21
+ export { AIOutcomeCardAction, type AIOutcomeCardActionProps, } from './components/ai-outcome-card/parts/AIOutcomeCardAction.js';
@@ -0,0 +1,27 @@
1
+ import { RegisteredRouter, ValidateLinkOptions } from '@tanstack/react-router';
2
+ import { RawAIOutcomeCardProps } from '../../../ai-kit/components/ai-outcome-card/RawAIOutcomeCard.js';
3
+ type AIOutcomeCardRouterProps<TRouter extends RegisteredRouter = RegisteredRouter, TOptions = unknown> = Omit<RawAIOutcomeCardProps, 'asElement' | 'href'> & ValidateLinkOptions<TRouter, TOptions>;
4
+ type AIOutcomeCardButtonProps = Omit<RawAIOutcomeCardProps, 'asElement' | 'href'> & {
5
+ onPress: NonNullable<RawAIOutcomeCardProps['onPress']>;
6
+ };
7
+ /** Props for the TanStack Router-aware {@link AIOutcomeCard}. */
8
+ export type AIOutcomeCardProps<TRouter extends RegisteredRouter = RegisteredRouter, TOptions = unknown> = AIOutcomeCardRouterProps<TRouter, TOptions> | AIOutcomeCardButtonProps;
9
+ /**
10
+ * Connects an AI Outcome Card to typed TanStack Router navigation.
11
+ *
12
+ * Preserves the raw card's visual, accessibility, and button contracts while
13
+ * adding a route-aware link form.
14
+ *
15
+ * Pass `to` and TanStack Router link options to navigate within the registered
16
+ * router. Omit `to`, set `asElement="button"`, and pass `onPress` when the
17
+ * card performs an in-place action instead.
18
+ * @param props - Typed router link options or raw button props.
19
+ * @param props.to - The typed TanStack Router destination for the link form.
20
+ * @param props.onPress - Button activation handler when the card is an action.
21
+ * @see {@link AIOutcomeCardProps} for all available props.
22
+ */
23
+ declare function AIOutcomeCard<TRouter extends RegisteredRouter = RegisteredRouter, TOptions = unknown>(props: AIOutcomeCardProps<TRouter, TOptions>): import('react/jsx-runtime').JSX.Element;
24
+ declare namespace AIOutcomeCard {
25
+ var displayName: string;
26
+ }
27
+ export { AIOutcomeCard };
@@ -0,0 +1,17 @@
1
+ import { RawAIOutcomeCard as e } from "../../../ai-kit/components/ai-outcome-card/RawAIOutcomeCard.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { createLink as n } from "@tanstack/react-router";
4
+ //#region src/modules/tanstack-router/components/ai-outcome-card/AIOutcomeCard.tsx
5
+ var r = n(e);
6
+ function i(n) {
7
+ return "to" in n || "href" in n ? /* @__PURE__ */ t(r, {
8
+ ...n,
9
+ asElement: "a"
10
+ }) : /* @__PURE__ */ t(e, {
11
+ ...n,
12
+ asElement: "button"
13
+ });
14
+ }
15
+ i.displayName = "AIOutcomeCard";
16
+ //#endregion
17
+ export { i as AIOutcomeCard };
@@ -9,6 +9,7 @@ export * from './components/list-view/ListView.js';
9
9
  export * from './components/list-view/parts/ListViewItem.js';
10
10
  export * from './components/menu-item/MenuItem.js';
11
11
  export * from './components/navigation-card/NavigationCard.js';
12
+ export * from './components/ai-outcome-card/AIOutcomeCard.js';
12
13
  export * from './components/nav-item/NavItem.js';
13
14
  export * from './components/pagination/PaginationLink.js';
14
15
  export * from './components/pagination/PaginationNext.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "3.9.4",
3
+ "version": "3.9.5",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -103,7 +103,7 @@
103
103
  "@formatjs/intl": "4.1.12",
104
104
  "@internationalized/date": "3.12.4",
105
105
  "minimatch": "10.2.5",
106
- "@payfit/unity-illustrations": "3.9.4",
106
+ "@payfit/unity-illustrations": "3.9.5",
107
107
  "@radix-ui/react-avatar": "1.2.6",
108
108
  "@radix-ui/react-slot": "1.3.3",
109
109
  "@react-aria/interactions": "3.28.1",
@@ -132,8 +132,8 @@
132
132
  "zod": "4.6.5"
133
133
  },
134
134
  "peerDependencies": {
135
- "@payfit/unity-icons": "3.9.4",
136
- "@payfit/unity-themes": "3.9.4",
135
+ "@payfit/unity-icons": "3.9.5",
136
+ "@payfit/unity-themes": "3.9.5",
137
137
  "@storybook/react-vite": "^10",
138
138
  "@tanstack/react-query": "^5",
139
139
  "@tanstack/form-core": "1.33.5",
@@ -156,9 +156,9 @@
156
156
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
157
157
  "@payfit/storybook-addon-datadog-rum": "0.0.0-use.local",
158
158
  "@payfit/storybook-config": "0.0.0-use.local",
159
- "@payfit/unity-icons": "3.9.4",
160
- "@payfit/unity-illustrations": "3.9.4",
161
- "@payfit/unity-themes": "3.9.4",
159
+ "@payfit/unity-icons": "3.9.5",
160
+ "@payfit/unity-illustrations": "3.9.5",
161
+ "@payfit/unity-themes": "3.9.5",
162
162
  "@payfit/vite-configs": "0.0.0-use.local",
163
163
  "@storybook/addon-a11y": "10.6.0",
164
164
  "@storybook/addon-designs": "11.1.4",
@@ -49,6 +49,56 @@
49
49
  ],
50
50
  "title": "AIComposer"
51
51
  },
52
+ {
53
+ "description": "Presents an AI outcome as a composed card that leads to a destination or triggers a next step.",
54
+ "docsHref": "?path=/docs/ai-kit-aioutcomecard--docs",
55
+ "id": "ai-kit-aioutcomecard",
56
+ "keywords": [
57
+ "ai",
58
+ "outcome",
59
+ "card",
60
+ "task",
61
+ "navigation",
62
+ "action"
63
+ ],
64
+ "preview": {
65
+ "type": "story",
66
+ "story": "primary",
67
+ "storyId": "ai-kit-aioutcomecard--primary"
68
+ },
69
+ "related": [],
70
+ "section": "components",
71
+ "tags": [
72
+ "type:component",
73
+ "category:navigation"
74
+ ],
75
+ "title": "AIOutcomeCard"
76
+ },
77
+ {
78
+ "description": "AIOutcomeCard integrates AI Kit outcomes with TanStack Router navigation patterns.",
79
+ "docsHref": "?path=/docs/library-integrations-reference-tanstack-router-aioutcomecard--docs",
80
+ "id": "library-integrations-reference-tanstack-router-aioutcomecard",
81
+ "keywords": [
82
+ "tanstack-router",
83
+ "ai-outcome-card",
84
+ "outcome",
85
+ "card",
86
+ "router-link"
87
+ ],
88
+ "preview": {
89
+ "type": "story",
90
+ "story": "basic-navigation",
91
+ "storyId": "library-integrations-reference-tanstack-router-aioutcomecard--basic-navigation"
92
+ },
93
+ "related": [],
94
+ "section": "integrations",
95
+ "tags": [
96
+ "type:integration",
97
+ "category:navigation",
98
+ "behavior:navigation"
99
+ ],
100
+ "title": "AIOutcomeCard"
101
+ },
52
102
  {
53
103
  "description": "Toggles a PayFit AI assistant surface with branded, accessible toggle-button semantics.",
54
104
  "docsHref": "?path=/docs/ai-kit-aitriggerbutton--docs",