@payfit/unity-components 3.1.12 → 3.1.14
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 +3 -1
- package/dist/esm/modules/ai-kit/components/ai-composer/parts/AIComposerAttachment.d.ts +19 -0
- package/dist/esm/modules/ai-kit/components/ai-composer/parts/AIComposerAttachment.js +67 -0
- package/dist/esm/modules/ai-kit/components/ai-composer/parts/AIComposerAttachmentsGroup.d.ts +5 -0
- package/dist/esm/modules/ai-kit/components/ai-composer/parts/AIComposerAttachmentsGroup.js +27 -0
- package/dist/esm/modules/ai-kit/index.d.ts +2 -0
- package/i18n/en-GB.json +3 -1
- package/i18n/es-ES.json +3 -1
- package/i18n/fr-FR.json +3 -1
- package/package.json +7 -7
package/dist/esm/ai-kit.js
CHANGED
|
@@ -2,4 +2,6 @@ import { aiGradientEffect as e, aiGradientSurfaceEffect as t } from "./modules/a
|
|
|
2
2
|
import { AIButton as n } from "./modules/ai-kit/components/ai-button/AIButton.js";
|
|
3
3
|
import { PayfitAIBrand as r } from "./modules/ai-kit/components/payfit-ai-brand/PayfitAIBrand.js";
|
|
4
4
|
import { AITriggerButton as i } from "./modules/ai-kit/components/ai-trigger-button/AITriggerButton.js";
|
|
5
|
-
|
|
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
|
+
export { n as AIButton, a as AIComposerAttachment, o as AIComposerAttachmentsGroup, i as AITriggerButton, r as PayfitAIBrand, e as aiGradientEffect, t as aiGradientSurfaceEffect };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UnityIcon } from '@payfit/unity-icons';
|
|
3
|
+
import { TagProps } from 'react-aria-components/TagGroup';
|
|
4
|
+
export type AIComposerAttachmentProps = Omit<TagProps, 'children' | 'className' | 'style'> & {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Icon displayed before the attachment name. */
|
|
7
|
+
icon: UnityIcon;
|
|
8
|
+
/** Maximum number of characters displayed in the attachment name. */
|
|
9
|
+
maxCharactersTruncation?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const AIComposerAttachment: import('react').ForwardRefExoticComponent<Omit<TagProps, "children" | "className" | "style"> & {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** Icon displayed before the attachment name. */
|
|
15
|
+
icon: UnityIcon;
|
|
16
|
+
/** Maximum number of characters displayed in the attachment name. */
|
|
17
|
+
maxCharactersTruncation?: number;
|
|
18
|
+
className?: string;
|
|
19
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Icon as e } from "../../../../../components/icon/Icon.js";
|
|
2
|
+
import { CircularIconButton as t } from "../../../../../components/icon-button/CircularIconButton.js";
|
|
3
|
+
import { Text as n } from "../../../../../components/text/Text.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { uyMerge as i, uyTv as a } from "@payfit/unity-themes";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { useIntl as c } from "react-intl";
|
|
8
|
+
import { Tag as l } from "react-aria-components/TagGroup";
|
|
9
|
+
//#region src/modules/ai-kit/components/ai-composer/parts/AIComposerAttachment.tsx
|
|
10
|
+
var u = a({
|
|
11
|
+
base: [
|
|
12
|
+
"uy:group",
|
|
13
|
+
"uy:inline-flex uy:min-w-0 uy:items-center uy:justify-center uy:gap-25",
|
|
14
|
+
"uy:rounded-pill uy:bg-surface-neutral-lowest-enabled uy:pl-75 uy:pr-25 uy:text-content-neutral-enabled",
|
|
15
|
+
"uy:enabled:hover:bg-surface-neutral-lowest-hover uy:enabled:hover:text-content-neutral-hover",
|
|
16
|
+
"uy:enabled:active:bg-surface-neutral-lowest-active uy:enabled:active:text-content-neutral-active",
|
|
17
|
+
"uy:data-[hovered=\"true\"]:bg-surface-neutral-lowest-hover uy:data-[hovered=\"true\"]:text-content-neutral-hover",
|
|
18
|
+
"uy:data-[active=\"true\"]:bg-surface-neutral-lowest-active uy:data-[active=\"true\"]:text-content-neutral-active",
|
|
19
|
+
"uy:data-[pressed=\"true\"]:bg-surface-neutral-lowest-pressed uy:data-[pressed=\"true\"]:text-content-neutral-pressed",
|
|
20
|
+
"uy:data-[focus-visible=\"true\"]:text-content-neutral-focus",
|
|
21
|
+
"uy:data-[focus-visible=\"true\"]:outline-2 uy:data-[focus-visible=\"true\"]:outline-solid uy:data-[focus-visible=\"true\"]:outline-utility-focus-ring uy:data-[focus-visible=\"true\"]:outline-offset-2",
|
|
22
|
+
"uy:data-[disabled=\"true\"]:bg-surface-neutral-lowest-disabled uy:data-[disabled=\"true\"]:text-content-neutral-disabled"
|
|
23
|
+
],
|
|
24
|
+
slots: {
|
|
25
|
+
label: "uy:min-w-0 uy:flex-1 uy:truncate",
|
|
26
|
+
removeButton: "uy:data-[disabled=\"true\"]:bg-surface-neutral-lowest-disabled"
|
|
27
|
+
}
|
|
28
|
+
}), d = r(({ children: r, icon: a, isDisabled: d, maxCharactersTruncation: f = 12, className: p, ...m }, h) => {
|
|
29
|
+
let g = c(), _ = u();
|
|
30
|
+
return /* @__PURE__ */ s(l, {
|
|
31
|
+
ref: h,
|
|
32
|
+
...m,
|
|
33
|
+
isDisabled: d,
|
|
34
|
+
className: i(_.base(), p),
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ o(e, {
|
|
37
|
+
src: a,
|
|
38
|
+
size: 20,
|
|
39
|
+
color: d ? "content.neutral.lowest.disabled" : "content.neutral.lowest",
|
|
40
|
+
role: "presentation",
|
|
41
|
+
"aria-hidden": "true"
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ o(n, {
|
|
44
|
+
asElement: "span",
|
|
45
|
+
className: _.label(),
|
|
46
|
+
isTruncated: !0,
|
|
47
|
+
maxWidthCh: f,
|
|
48
|
+
variant: "bodySmallStrong",
|
|
49
|
+
children: r
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ o(t, {
|
|
52
|
+
className: _.removeButton(),
|
|
53
|
+
isDisabled: d,
|
|
54
|
+
asElement: "button",
|
|
55
|
+
icon: "CloseOutlined",
|
|
56
|
+
slot: "remove",
|
|
57
|
+
title: g.formatMessage({
|
|
58
|
+
id: "unity:module:ai-kit:composer:attachment:remove",
|
|
59
|
+
defaultMessage: "Remove Attachment"
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
d.displayName = "AIComposerAttachment";
|
|
66
|
+
//#endregion
|
|
67
|
+
export { d as AIComposerAttachment };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactElement, RefAttributes } from 'react';
|
|
2
|
+
import { TagGroupProps, TagListProps } from 'react-aria-components/TagGroup';
|
|
3
|
+
type AIComposerAttachmentsGroupProps<T> = Omit<TagGroupProps, 'children' | 'className' | 'style'> & Omit<TagListProps<T>, 'className' | 'style'>;
|
|
4
|
+
export declare const AIComposerAttachmentsGroup: <T>(props: AIComposerAttachmentsGroupProps<T> & RefAttributes<HTMLDivElement>) => ReactElement | null;
|
|
5
|
+
export type { AIComposerAttachmentsGroupProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import { uyTv as t } from "@payfit/unity-themes";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { useIntl as r } from "react-intl";
|
|
5
|
+
import { TagGroup as i, TagList as a } from "react-aria-components/TagGroup";
|
|
6
|
+
//#region src/modules/ai-kit/components/ai-composer/parts/AIComposerAttachmentsGroup.tsx
|
|
7
|
+
var o = t({ slots: { base: ["uy:flex uy:flex-wrap uy:items-start uy:gap-50"] } }), s = e(({ children: e, items: t, onRemove: s, renderEmptyState: c, "aria-label": l, ...u }, d) => {
|
|
8
|
+
let f = r(), { base: p } = o();
|
|
9
|
+
return /* @__PURE__ */ n(i, {
|
|
10
|
+
ref: d,
|
|
11
|
+
...u,
|
|
12
|
+
selectionMode: "none",
|
|
13
|
+
onRemove: s,
|
|
14
|
+
"aria-label": l ?? f.formatMessage({
|
|
15
|
+
id: "unity:module:ai-kit:composer:attachment-group",
|
|
16
|
+
defaultMessage: "Attachments"
|
|
17
|
+
}),
|
|
18
|
+
children: /* @__PURE__ */ n(a, {
|
|
19
|
+
items: t,
|
|
20
|
+
renderEmptyState: c,
|
|
21
|
+
className: p(),
|
|
22
|
+
children: e
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { s as AIComposerAttachmentsGroup };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { AIButton, type AIButtonProps } from './components/ai-button/AIButton.js';
|
|
2
2
|
export { PayfitAIBrand, type PayfitAIBrandProps, } from './components/payfit-ai-brand/PayfitAIBrand.js';
|
|
3
3
|
export { AITriggerButton, type AITriggerButtonBrandSlotProps, type AITriggerButtonProps, } from './components/ai-trigger-button/AITriggerButton.js';
|
|
4
|
+
export { AIComposerAttachment, type AIComposerAttachmentProps, } from './components/ai-composer/parts/AIComposerAttachment.js';
|
|
5
|
+
export { AIComposerAttachmentsGroup, type AIComposerAttachmentsGroupProps, } from './components/ai-composer/parts/AIComposerAttachmentsGroup.js';
|
|
4
6
|
export { aiGradientEffect, aiGradientSurfaceEffect, } from './utils/ai-gradient-effect.js';
|
package/i18n/en-GB.json
CHANGED
|
@@ -149,5 +149,7 @@
|
|
|
149
149
|
"unity:layout:funnel:skip-links:main-content": "Main content",
|
|
150
150
|
"unity:layout:funnel:skip-links:sidebar": "Sidebar",
|
|
151
151
|
"unity:layout:funnel:skip-links:footer": "Footer",
|
|
152
|
-
"unity:layout:funnel:sidebar:aria-label": "Process steps"
|
|
152
|
+
"unity:layout:funnel:sidebar:aria-label": "Process steps",
|
|
153
|
+
"unity:module:ai-kit:composer:attachment-group": "Attachments",
|
|
154
|
+
"unity:module:ai-kit:composer:attachment:remove": "Remove Attachment"
|
|
153
155
|
}
|
package/i18n/es-ES.json
CHANGED
|
@@ -149,5 +149,7 @@
|
|
|
149
149
|
"unity:layout:funnel:skip-links:main-content": "Contenido principal",
|
|
150
150
|
"unity:layout:funnel:skip-links:sidebar": "Barra lateral",
|
|
151
151
|
"unity:layout:funnel:skip-links:footer": "Pie de página",
|
|
152
|
-
"unity:layout:funnel:sidebar:aria-label": "Pasos del proceso"
|
|
152
|
+
"unity:layout:funnel:sidebar:aria-label": "Pasos del proceso",
|
|
153
|
+
"unity:module:ai-kit:composer:attachment-group": "Ficheros adjuntos",
|
|
154
|
+
"unity:module:ai-kit:composer:attachment:remove": "Eliminar"
|
|
153
155
|
}
|
package/i18n/fr-FR.json
CHANGED
|
@@ -150,5 +150,7 @@
|
|
|
150
150
|
"unity:layout:funnel:skip-links:main-content": "Contenu principal",
|
|
151
151
|
"unity:layout:funnel:skip-links:sidebar": "Barre latérale",
|
|
152
152
|
"unity:layout:funnel:skip-links:footer": "Pied de page",
|
|
153
|
-
"unity:layout:funnel:sidebar:aria-label": "Étapes du processus"
|
|
153
|
+
"unity:layout:funnel:sidebar:aria-label": "Étapes du processus",
|
|
154
|
+
"unity:module:ai-kit:composer:attachment-group": "Fichiers joints",
|
|
155
|
+
"unity:module:ai-kit:composer:attachment:remove": "Supprimer"
|
|
154
156
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.14",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@hookform/resolvers": "5.2.1",
|
|
78
78
|
"@internationalized/date": "3.12.4",
|
|
79
79
|
"minimatch": "10.2.5",
|
|
80
|
-
"@payfit/unity-illustrations": "3.1.
|
|
80
|
+
"@payfit/unity-illustrations": "3.1.14",
|
|
81
81
|
"@radix-ui/react-avatar": "1.2.6",
|
|
82
82
|
"@radix-ui/react-slot": "1.3.3",
|
|
83
83
|
"@react-aria/interactions": "3.28.1",
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
113
|
"@hookform/devtools": "^4",
|
|
114
|
-
"@payfit/unity-icons": "3.1.
|
|
115
|
-
"@payfit/unity-themes": "3.1.
|
|
114
|
+
"@payfit/unity-icons": "3.1.14",
|
|
115
|
+
"@payfit/unity-themes": "3.1.14",
|
|
116
116
|
"@storybook/react-vite": "^10",
|
|
117
117
|
"@tanstack/react-query": "^5",
|
|
118
118
|
"@tanstack/react-router": "^1.131",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
132
132
|
"@payfit/storybook-addon-datadog-rum": "0.0.0-use.local",
|
|
133
133
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
134
|
-
"@payfit/unity-icons": "3.1.
|
|
135
|
-
"@payfit/unity-illustrations": "3.1.
|
|
136
|
-
"@payfit/unity-themes": "3.1.
|
|
134
|
+
"@payfit/unity-icons": "3.1.14",
|
|
135
|
+
"@payfit/unity-illustrations": "3.1.14",
|
|
136
|
+
"@payfit/unity-themes": "3.1.14",
|
|
137
137
|
"@payfit/vite-configs": "0.0.0-use.local",
|
|
138
138
|
"@storybook/addon-a11y": "10.6.0",
|
|
139
139
|
"@storybook/addon-designs": "11.1.4",
|