@payfit/unity-components 3.9.7 → 3.9.8
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/esm/ai-kit.js +25 -19
- package/dist/esm/core/components/card/Card.d.ts +30 -0
- package/dist/esm/core/components/card/Card.js +27 -21
- package/dist/esm/core/components/card/parts/CardTitle.d.ts +1 -4
- package/dist/esm/core/components/card/parts/CardTitle.js +15 -14
- package/dist/esm/core/components/definition-list/DefinitionList.context.d.ts +5 -1
- package/dist/esm/core/components/definition-list/DefinitionList.context.js +6 -2
- package/dist/esm/core/components/definition-list/DefinitionList.d.ts +12 -2
- package/dist/esm/core/components/definition-list/DefinitionList.js +34 -16
- package/dist/esm/core/components/definition-list/parts/DefinitionItem.js +50 -15
- package/dist/esm/core/components/definition-list/parts/DefinitionListGroup.d.ts +15 -0
- package/dist/esm/core/components/definition-list/parts/DefinitionListGroup.js +41 -0
- package/dist/esm/core/index.d.ts +1 -0
- package/dist/esm/core/index.js +139 -138
- package/dist/esm/index.js +152 -151
- package/dist/esm/modules/ai-kit/components/proposal-card/ProposalCard.context.d.ts +7 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/ProposalCard.context.js +10 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/ProposalCard.d.ts +30 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/ProposalCard.js +35 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/ProposalCard.variants.d.ts +55 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/ProposalCard.variants.js +31 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardActions.d.ts +7 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardActions.js +18 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardContent.d.ts +9 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardContent.js +19 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardHeader.d.ts +12 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardHeader.js +44 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardSubtitle.d.ts +7 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardSubtitle.js +16 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardTitle.d.ts +7 -0
- package/dist/esm/modules/ai-kit/components/proposal-card/parts/ProposalCardTitle.js +23 -0
- package/dist/esm/modules/ai-kit/index.d.ts +6 -0
- package/package.json +7 -7
- package/src/agent-references/component-catalog.json +24 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useProposalCardContext as e } from "../ProposalCard.context.js";
|
|
2
|
+
import { proposalCard as t } from "../ProposalCard.variants.js";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { DisclosurePanel as i } from "react-aria-components/Disclosure";
|
|
6
|
+
//#region src/modules/ai-kit/components/proposal-card/parts/ProposalCardContent.tsx
|
|
7
|
+
var a = n(({ children: n, ...a }, o) => {
|
|
8
|
+
let { isExpandable: s } = e(), { content: c } = t();
|
|
9
|
+
return r(s ? i : "div", {
|
|
10
|
+
ref: o,
|
|
11
|
+
className: c(),
|
|
12
|
+
"data-unity-slot": "proposal-card.content",
|
|
13
|
+
...a,
|
|
14
|
+
children: n
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
a.displayName = "AIProposalCardContent";
|
|
18
|
+
//#endregion
|
|
19
|
+
export { a as AIProposalCardContent };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from 'react-aria-components/Button';
|
|
3
|
+
export interface AIProposalCardHeaderProps extends Omit<ButtonProps, 'children' | 'className' | 'slot'> {
|
|
4
|
+
/** Header content, typically AIProposalCardSubtitle and AIProposalCardTitle. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Heading level used for historical proposal headers. @default 3 */
|
|
7
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
+
/** Overrides the accessible name of the historical-proposal disclosure trigger. */
|
|
9
|
+
disclosureLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Renders the status/title header and historical-proposal disclosure control. */
|
|
12
|
+
export declare const AIProposalCardHeader: import('react').ForwardRefExoticComponent<AIProposalCardHeaderProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Icon as e } from "../../../../../core/components/icon/Icon.js";
|
|
2
|
+
import { useProposalCardContext as t } from "../ProposalCard.context.js";
|
|
3
|
+
import { proposalCard as n } from "../ProposalCard.variants.js";
|
|
4
|
+
import { forwardRef as r, useContext 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 { Heading as c } from "react-aria-components/Heading";
|
|
8
|
+
import { DisclosureStateContext as l } from "react-aria-components/Disclosure";
|
|
9
|
+
//#region src/modules/ai-kit/components/proposal-card/parts/ProposalCardHeader.tsx
|
|
10
|
+
var u = r(({ children: r, disclosureLabel: u, level: d = 3, ...f }, p) => {
|
|
11
|
+
let { isExpandable: m } = t(), { header: h, headerContent: g, disclosureHeader: _, disclosureIcon: v } = n({ isExpanded: i(l)?.isExpanded });
|
|
12
|
+
return m ? /* @__PURE__ */ a(c, {
|
|
13
|
+
level: d,
|
|
14
|
+
children: /* @__PURE__ */ o(s, {
|
|
15
|
+
ref: p,
|
|
16
|
+
"aria-label": u,
|
|
17
|
+
className: _(),
|
|
18
|
+
"data-unity-slot": "proposal-card.header",
|
|
19
|
+
slot: "trigger",
|
|
20
|
+
...f,
|
|
21
|
+
children: [/* @__PURE__ */ a("span", {
|
|
22
|
+
className: g(),
|
|
23
|
+
children: r
|
|
24
|
+
}), /* @__PURE__ */ a(e, {
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
className: v(),
|
|
27
|
+
role: "presentation",
|
|
28
|
+
src: "CaretDownOutlined"
|
|
29
|
+
})]
|
|
30
|
+
})
|
|
31
|
+
}) : /* @__PURE__ */ a("div", {
|
|
32
|
+
ref: p,
|
|
33
|
+
className: h(),
|
|
34
|
+
"data-unity-slot": "proposal-card.header",
|
|
35
|
+
...f,
|
|
36
|
+
children: /* @__PURE__ */ a("div", {
|
|
37
|
+
className: g(),
|
|
38
|
+
children: r
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
u.displayName = "AIProposalCardHeader";
|
|
43
|
+
//#endregion
|
|
44
|
+
export { u as AIProposalCardHeader };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export interface AIProposalCardSubtitleProps extends Omit<ComponentPropsWithoutRef<'p'>, 'children' | 'className'> {
|
|
3
|
+
/** Consumer-provided lifecycle copy, such as “Ready for review”. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/** Renders low-emphasis proposal status or supporting copy. */
|
|
7
|
+
export declare const AIProposalCardSubtitle: import('react').ForwardRefExoticComponent<AIProposalCardSubtitleProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { proposalCard as e } from "../ProposalCard.variants.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/modules/ai-kit/components/proposal-card/parts/ProposalCardSubtitle.tsx
|
|
5
|
+
var r = t(({ children: t, ...r }, i) => {
|
|
6
|
+
let { subtitle: a } = e();
|
|
7
|
+
return /* @__PURE__ */ n("p", {
|
|
8
|
+
ref: i,
|
|
9
|
+
className: a(),
|
|
10
|
+
...r,
|
|
11
|
+
children: t
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
r.displayName = "AIProposalCardSubtitle";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as AIProposalCardSubtitle };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export interface AIProposalCardTitleProps extends PropsWithChildren {
|
|
3
|
+
/** The heading level for a pending proposal title. @default 3 */
|
|
4
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
}
|
|
6
|
+
/** Supplies the AIProposalCard's visible title and Card accessible label. */
|
|
7
|
+
export declare const AIProposalCardTitle: import('react').ForwardRefExoticComponent<AIProposalCardTitleProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useCardContext as e } from "../../../../../core/components/card/Card.context.js";
|
|
2
|
+
import { CardTitle as t } from "../../../../../core/components/card/parts/CardTitle.js";
|
|
3
|
+
import { useProposalCardContext as n } from "../ProposalCard.context.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/modules/ai-kit/components/proposal-card/parts/ProposalCardTitle.tsx
|
|
7
|
+
var a = r(({ children: r, level: a = 3 }, o) => {
|
|
8
|
+
let { isExpandable: s } = n(), { titleId: c } = e();
|
|
9
|
+
return s ? /* @__PURE__ */ i("span", {
|
|
10
|
+
ref: o,
|
|
11
|
+
className: "uy:typography-h3 uy:text-content-neutral uy:leading-none",
|
|
12
|
+
"data-unity-slot": "card.title",
|
|
13
|
+
id: c,
|
|
14
|
+
children: r
|
|
15
|
+
}) : /* @__PURE__ */ i(t, {
|
|
16
|
+
ref: o,
|
|
17
|
+
level: a,
|
|
18
|
+
children: r
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
a.displayName = "AIProposalCardTitle";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { a as AIProposalCardTitle };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export { AIButton, type AIButtonProps } from './components/ai-button/AIButton.js';
|
|
2
|
+
export { AIProposalCard, type AIProposalCardProps, type AIProposalCardState, } from './components/proposal-card/ProposalCard.js';
|
|
3
|
+
export { AIProposalCardHeader, type AIProposalCardHeaderProps, } from './components/proposal-card/parts/ProposalCardHeader.js';
|
|
4
|
+
export { AIProposalCardSubtitle, type AIProposalCardSubtitleProps, } from './components/proposal-card/parts/ProposalCardSubtitle.js';
|
|
5
|
+
export { AIProposalCardTitle, type AIProposalCardTitleProps, } from './components/proposal-card/parts/ProposalCardTitle.js';
|
|
6
|
+
export { AIProposalCardContent, type AIProposalCardContentProps, } from './components/proposal-card/parts/ProposalCardContent.js';
|
|
7
|
+
export { AIProposalCardActions, type AIProposalCardActionsProps, } from './components/proposal-card/parts/ProposalCardActions.js';
|
|
2
8
|
export { PayfitAIBrand, type PayfitAIBrandProps, } from './components/payfit-ai-brand/PayfitAIBrand.js';
|
|
3
9
|
export { AITriggerButton, type AITriggerButtonBrandSlotProps, type AITriggerButtonProps, } from './components/ai-trigger-button/AITriggerButton.js';
|
|
4
10
|
export { AIComposerAttachment, type AIComposerAttachmentProps, } from './components/ai-composer/parts/AIComposerAttachment.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.8",
|
|
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.
|
|
106
|
+
"@payfit/unity-illustrations": "3.9.8",
|
|
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.
|
|
136
|
-
"@payfit/unity-themes": "3.9.
|
|
135
|
+
"@payfit/unity-icons": "3.9.8",
|
|
136
|
+
"@payfit/unity-themes": "3.9.8",
|
|
137
137
|
"@storybook/react-vite": "^10",
|
|
138
138
|
"@tanstack/react-query": "^5",
|
|
139
139
|
"@tanstack/form-core": "1.33.5",
|
|
@@ -157,9 +157,9 @@
|
|
|
157
157
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
158
158
|
"@payfit/storybook-addon-datadog-rum": "0.0.0-use.local",
|
|
159
159
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
160
|
-
"@payfit/unity-icons": "3.9.
|
|
161
|
-
"@payfit/unity-illustrations": "3.9.
|
|
162
|
-
"@payfit/unity-themes": "3.9.
|
|
160
|
+
"@payfit/unity-icons": "3.9.8",
|
|
161
|
+
"@payfit/unity-illustrations": "3.9.8",
|
|
162
|
+
"@payfit/unity-themes": "3.9.8",
|
|
163
163
|
"@payfit/vite-configs": "0.0.0-use.local",
|
|
164
164
|
"@storybook/addon-a11y": "10.6.0",
|
|
165
165
|
"@storybook/addon-designs": "11.1.4",
|
|
@@ -124,6 +124,30 @@
|
|
|
124
124
|
],
|
|
125
125
|
"title": "AIOutcomeCard"
|
|
126
126
|
},
|
|
127
|
+
{
|
|
128
|
+
"description": "Presents a proposed AI operation, its details, and person-owned decision actions.",
|
|
129
|
+
"docsHref": "?path=/docs/ai-kit-aiproposalcard--docs",
|
|
130
|
+
"id": "ai-kit-aiproposalcard",
|
|
131
|
+
"keywords": [
|
|
132
|
+
"ai",
|
|
133
|
+
"proposal",
|
|
134
|
+
"confirmation",
|
|
135
|
+
"review",
|
|
136
|
+
"decision"
|
|
137
|
+
],
|
|
138
|
+
"preview": {
|
|
139
|
+
"type": "story",
|
|
140
|
+
"story": "pending",
|
|
141
|
+
"storyId": "ai-kit-aiproposalcard--pending"
|
|
142
|
+
},
|
|
143
|
+
"related": [],
|
|
144
|
+
"section": "components",
|
|
145
|
+
"tags": [
|
|
146
|
+
"type:component",
|
|
147
|
+
"category:information"
|
|
148
|
+
],
|
|
149
|
+
"title": "AIProposalCard"
|
|
150
|
+
},
|
|
127
151
|
{
|
|
128
152
|
"description": "Toggles a PayFit AI assistant surface with branded, accessible toggle-button semantics.",
|
|
129
153
|
"docsHref": "?path=/docs/ai-kit-aitriggerbutton--docs",
|