UNPKG

@payfit/unity-components

Version:

39 lines (38 loc) • 1.34 kB
import { ScrollArea as e } from "../../../../../core/components/scroll-area/ScrollArea.js"; import { forwardRef as t } from "react"; import { uyTv as n } from "@payfit/unity-themes"; import { jsx as r } from "react/jsx-runtime"; import { useIntl as i } from "react-intl"; import { TagGroup as a, TagList as o } from "react-aria-components/TagGroup"; //#region src/modules/ai-kit/components/ai-composer/parts/AIComposerAttachmentsGroup.tsx var s = n({ slots: { scrollArea: "uy:w-full uy:min-w-0 uy:[contain:paint]", base: ["uy:flex uy:w-full uy:min-w-0 uy:flex-nowrap uy:items-start uy:gap-50 uy:mb-125 uy:p-50"] } }), c = t(({ children: t, items: n, onRemove: c, renderEmptyState: l, "aria-label": u, ...d }, f) => { let p = i(), { base: m, scrollArea: h } = s(); return /* @__PURE__ */ r(a, { ref: f, ...d, className: "uy:w-full uy:min-w-0", selectionMode: "none", onRemove: c, "aria-label": u ?? p.formatMessage({ id: "unity:module:ai-kit:composer:attachment-group", defaultMessage: "Attachments" }), children: /* @__PURE__ */ r(e, { axis: "inline", fade: "both", className: h(), children: /* @__PURE__ */ r(o, { "data-unity-slot": "attachments", items: n, renderEmptyState: l, className: m(), children: t }) }) }); }); //#endregion export { c as AIComposerAttachmentsGroup };