UNPKG

@payfit/unity-components

Version:

45 lines (44 loc) 1.25 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/components/action-bar/parts/ActionBarRoot.tsx var r = t({ base: [ "uy:left-1/2 uy:-translate-x-1/2 uy:z-10", "uy:duration-200 uy:ease-out", "uy:bottom-[calc(var(--uy-spacing-200)+var(--uy-spacing-offset-bottom))]", "uy:starting:opacity-0" ], variants: { isVisible: { true: ["uy:animate-slide-up-fade-in"], false: [ "uy:animate-slide-down-fade-out", "uy:pointer-events-none", "uy:opacity-0", "uy:translate-y-10" ] }, position: { absolute: ["uy:absolute"], fixed: ["uy:fixed"] } } }), i = e(({ children: e, offsetBottom: t = 0, isVisible: i = !1, position: a = "absolute", ...o }, s) => { let c = typeof t == "number" ? t : t.replace("$", ""), l = typeof t == "number" ? `calc(var(--uy-spacing)*${c})` : `var(--uy-spacing-${c})`; return /* @__PURE__ */ n("div", { ref: s, className: r({ isVisible: i, position: a }), ...o, style: { "--uy-spacing-offset-bottom": l }, tabIndex: -1, inert: i ? void 0 : "", children: e }); }); i.displayName = "ActionBarRoot"; //#endregion export { i as ActionBarRoot, r as actionBarRoot };