UNPKG

@hitachivantara/uikit-react-core

Version:

Core React components for the NEXT Design System.

42 lines (41 loc) 1.45 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const jsxRuntime = require("react/jsx-runtime"); const React = require("react"); const uikitReactUtils = require("@hitachivantara/uikit-react-utils"); const LoadingContainer_styles = require("./LoadingContainer.styles.cjs"); const Loading = require("../Loading/Loading.cjs"); const HvLoadingContainer = React.forwardRef(function HvLoadingContainer2(props, ref) { const { children, className, classes: classesProp, hidden, small, label, "aria-label": ariaLabelProp, opacity, ...others } = uikitReactUtils.useDefaultProps("HvLoadingContainer", props); const { classes, cx } = LoadingContainer_styles.useClasses(classesProp); const ariaLabel = ariaLabelProp || typeof label === "string" && label || "Loading"; return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cx(classes.root, className), ...others, children: [ /* @__PURE__ */ jsxRuntime.jsx( Loading.HvLoading, { className: classes.loading, role: "progressbar", small, label, hidden, "aria-label": ariaLabel, style: uikitReactUtils.mergeStyles(void 0, { "--opacity": opacity && `${opacity * 100}%` }) } ), children ] }); }); exports.loadingContainerClasses = LoadingContainer_styles.staticClasses; exports.HvLoadingContainer = HvLoadingContainer;