Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
"use client";
|
|
import {
|
|
useImage
|
|
} from "./chunk-DSOLHU5M.mjs";
|
|
|
|
// src/image.tsx
|
|
import { cloneElement } from "react";
|
|
import { forwardRef } from "@heroui/system";
|
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
var Image = forwardRef((props, ref) => {
|
|
const {
|
|
Component,
|
|
domRef,
|
|
slots,
|
|
classNames,
|
|
isBlurred,
|
|
isZoomed,
|
|
fallbackSrc,
|
|
removeWrapper,
|
|
disableSkeleton,
|
|
getImgProps,
|
|
getWrapperProps,
|
|
getBlurredImgProps
|
|
} = useImage({
|
|
...props,
|
|
ref
|
|
});
|
|
const img = /* @__PURE__ */ jsx(Component, { ref: domRef, ...getImgProps() });
|
|
if (removeWrapper) {
|
|
return img;
|
|
}
|
|
const zoomed = /* @__PURE__ */ jsx("div", { className: slots.zoomedWrapper({ class: classNames == null ? void 0 : classNames.zoomedWrapper }), children: img });
|
|
if (isBlurred) {
|
|
return /* @__PURE__ */ jsxs("div", { ...getWrapperProps(), children: [
|
|
isZoomed ? zoomed : img,
|
|
cloneElement(img, getBlurredImgProps())
|
|
] });
|
|
}
|
|
if (isZoomed || !disableSkeleton || fallbackSrc) {
|
|
return /* @__PURE__ */ jsxs("div", { ...getWrapperProps(), children: [
|
|
" ",
|
|
isZoomed ? zoomed : img
|
|
] });
|
|
}
|
|
return img;
|
|
});
|
|
Image.displayName = "HeroUI.Image";
|
|
var image_default = Image;
|
|
|
|
export {
|
|
image_default
|
|
};
|