UNPKG

@payfit/unity-components

Version:

57 lines (56 loc) • 2.71 kB
import { forwardRef as e } from "react"; import { uyTv as t } from "@payfit/unity-themes"; import { jsx as n } from "react/jsx-runtime"; //#region src/core/components/attachment/Attachment.tsx var r = t({ base: [ "uy:group/attachment uy:relative uy:flex uy:min-w-0 uy:items-center uy:gap-100", "uy:border uy:border-solid uy:bg-surface-neutral-enabled uy:text-content-neutral", "uy:has-[[data-unity-slot=attachment-trigger][data-focus-visible=true]]:outline-2 uy:has-[[data-unity-slot=attachment-trigger][data-focus-visible=true]]:outline-solid", "uy:has-[[data-unity-slot=attachment-trigger][data-focus-visible=true]]:outline-offset-2 uy:has-[[data-unity-slot=attachment-trigger][data-focus-visible=true]]:outline-utility-focus-ring" ], variants: { size: { default: ["uy:rounded-200", "uy:p-100 uy:pr-150"], small: ["uy:rounded-150", "uy:p-75 uy:pr-125"] }, state: { enabled: [ "uy:border-border-neutral", "uy:has-[[data-unity-slot=attachment-trigger][data-hovered=true]]:border-border-neutral-hover", "uy:has-[[data-unity-slot=attachment-trigger][data-hovered=true]]:bg-surface-neutral-hover", "uy:has-[[data-unity-slot=attachment-trigger][data-pressed=true]]:border-border-neutral-pressed", "uy:has-[[data-unity-slot=attachment-trigger][data-pressed=true]]:bg-surface-neutral-pressed" ], completed: [ "uy:border-border-neutral", "uy:has-[[data-unity-slot=attachment-trigger][data-hovered=true]]:border-border-neutral-hover", "uy:has-[[data-unity-slot=attachment-trigger][data-hovered=true]]:bg-surface-neutral-hover", "uy:has-[[data-unity-slot=attachment-trigger][data-pressed=true]]:border-border-neutral-pressed", "uy:has-[[data-unity-slot=attachment-trigger][data-pressed=true]]:bg-surface-neutral-pressed" ], processing: [ "uy:border-border-neutral", "uy:has-[[data-unity-slot=attachment-trigger][data-hovered=true]]:border-border-neutral-hover", "uy:has-[[data-unity-slot=attachment-trigger][data-hovered=true]]:bg-surface-neutral-hover", "uy:has-[[data-unity-slot=attachment-trigger][data-pressed=true]]:border-border-neutral-pressed", "uy:has-[[data-unity-slot=attachment-trigger][data-pressed=true]]:bg-surface-neutral-pressed" ], error: ["uy:border-border-danger", "uy:has-[[data-unity-slot=attachment-trigger][data-hovered=true]]:bg-surface-danger-lowest-hover"] } } }), i = e(({ state: e, size: t = "default", children: i, ...a }, o) => /* @__PURE__ */ n("div", { ...a, ref: o, "data-unity-component": "attachment", "data-state": e, "data-size": t, className: r({ state: e, size: t }), children: i })); i.displayName = "Attachment"; //#endregion export { i as Attachment };