UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

61 lines (59 loc) 1.71 kB
import { ProgressBar_default } from "./chunk-LDBWF6EA.mjs"; import { Modal_default } from "./chunk-TNLGS7SB.mjs"; import { Text_default } from "./chunk-IMCIR6TJ.mjs"; // src/components/ProgressModal/ProgressModal.tsx import { jsx, jsxs } from "react/jsx-runtime"; var ProgressModal = ({ isOpen, onClose, message, image, imageAlt, accessibleName, progress, size = "sm" }) => { const isIndeterminate = progress === void 0; const resolvedAccessibleName = typeof message === "string" ? message : accessibleName ?? "Carregando"; const resolvedAlt = imageAlt ?? resolvedAccessibleName; return /* @__PURE__ */ jsx( Modal_default, { isOpen, onClose, title: /* @__PURE__ */ jsx("span", { className: "sr-only", children: resolvedAccessibleName }), size, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-6 py-2", children: [ image && /* @__PURE__ */ jsx( "img", { src: image, alt: resolvedAlt, className: "w-60 h-60 object-contain" } ), /* @__PURE__ */ jsx(Text_default, { size: "md", className: "text-text-950 text-center", children: message }), /* @__PURE__ */ jsx("div", { className: isIndeterminate ? "w-full animate-pulse" : "w-full", children: /* @__PURE__ */ jsx( ProgressBar_default, { value: progress ?? 60, size: "medium", variant: "blue", showPercentage: !isIndeterminate } ) }) ] }) } ); }; var ProgressModal_default = ProgressModal; export { ProgressModal_default }; //# sourceMappingURL=chunk-PVXR3XWY.mjs.map