UNPKG

@payfit/unity-components

Version:

40 lines (39 loc) • 1.39 kB
import { forwardRef as e } from "react"; import { uyTv as t } from "@payfit/unity-themes"; import { jsx as n } from "react/jsx-runtime"; import { useIntl as r } from "react-intl"; import { TagGroup as i, TagList as a } from "react-aria-components/TagGroup"; //#region src/modules/ai-kit/components/ai-composer/parts/AIComposerAttachmentsGroup.tsx var o = t({ slots: { clip: "uy:w-full uy:min-w-0 uy:overflow-hidden 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", "uy:overflow-x-auto uy:overflow-y-hidden uy:scrollbar-thin", "uy:scrollbar:h-1 uy:scrollbar-thumb:rounded-pill uy:scrollbar-thumb:bg-surface-neutral-low" ] } }), s = e(({ children: e, items: t, onRemove: s, renderEmptyState: c, "aria-label": l, ...u }, d) => { let f = r(), { base: p, clip: m } = o(); return /* @__PURE__ */ n(i, { ref: d, ...u, className: "uy:w-full uy:min-w-0", selectionMode: "none", onRemove: s, "aria-label": l ?? f.formatMessage({ id: "unity:module:ai-kit:composer:attachment-group", defaultMessage: "Attachments" }), children: /* @__PURE__ */ n("div", { className: m(), children: /* @__PURE__ */ n(a, { "data-unity-slot": "attachments", items: t, renderEmptyState: c, className: p(), children: e }) }) }); }); //#endregion export { s as AIComposerAttachmentsGroup };