Files
NapCatQQ/.pnpm-store/v3/files/f8/094659e0f0e1d50bc300033bfe250948ee0e8320e3c0c0b810d134f5a6af7bee98ad955028753224b4ec76a6fcd6eac9def49489ae426f0c2a02b29a2fe76b
TanTan e311ca3275
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
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

58 lines
2.3 KiB
Plaintext

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/use-spinner.ts
var use_spinner_exports = {};
__export(use_spinner_exports, {
useSpinner: () => useSpinner
});
module.exports = __toCommonJS(use_spinner_exports);
var import_system_rsc = require("@heroui/system-rsc");
var import_theme = require("@heroui/theme");
var import_shared_utils = require("@heroui/shared-utils");
var import_react = require("react");
function useSpinner(originalProps) {
const [props, variantProps] = (0, import_system_rsc.mapPropsVariants)(originalProps, import_theme.spinner.variantKeys);
const { children, className, classNames, label: labelProp, ...otherProps } = props;
const slots = (0, import_react.useMemo)(() => (0, import_theme.spinner)({ ...variantProps }), [(0, import_shared_utils.objectToDeps)(variantProps)]);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const label = labelProp || children;
const ariaLabel = (0, import_react.useMemo)(() => {
if (label && typeof label === "string") {
return label;
}
return !otherProps["aria-label"] ? "Loading" : "";
}, [children, label, otherProps["aria-label"]]);
const getSpinnerProps = (0, import_react.useCallback)(
() => ({
"aria-label": ariaLabel,
className: slots.base({
class: baseStyles
}),
...otherProps
}),
[ariaLabel, slots, baseStyles, otherProps]
);
return { label, slots, classNames, getSpinnerProps };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useSpinner
});