UNPKG

@nextcloud/vue

Version:
63 lines (62 loc) 1.9 kB
import '../assets/NcLoadingIcon-C7S2_wmi.css'; import { n as normalizeComponent } from "../chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs"; const _sfc_main = { name: "NcLoadingIcon", props: { /** * Specify the size of the loading icon. */ size: { type: Number, default: 20 }, /** * The appearance of the loading icon. * 'auto' adjusts to the Nextcloud color scheme, * 'light' and 'dark' are static. */ appearance: { type: String, validator(value) { return ["auto", "light", "dark"].includes(value); }, default: "auto" }, /** * Specify what is loading. */ name: { type: String, default: "" } }, computed: { colors() { const colors = ["#777", "#CCC"]; if (this.appearance === "light") { return colors; } else if (this.appearance === "dark") { return colors.reverse(); } return ["var(--color-loading-light)", "var(--color-loading-dark)"]; } } }; var _sfc_render = function render() { var _vm = this, _c = _vm._self._c; return _c("span", { staticClass: "material-design-icon loading-icon", attrs: { "aria-label": _vm.name, "role": "img" } }, [_c("svg", { attrs: { "width": _vm.size, "height": _vm.size, "viewBox": "0 0 24 24" } }, [_c("path", { attrs: { "fill": _vm.colors[0], "d": "M12,4V2A10,10 0 1,0 22,12H20A8,8 0 1,1 12,4Z" } }), _c("path", { attrs: { "fill": _vm.colors[1], "d": "M12,4V2A10,10 0 0,1 22,12H20A8,8 0 0,0 12,4Z" } }, [_vm.name ? _c("title", [_vm._v(_vm._s(_vm.name))]) : _vm._e()])])]); }; var _sfc_staticRenderFns = []; var __component__ = /* @__PURE__ */ normalizeComponent( _sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "94ff8098" ); const NcLoadingIcon = __component__.exports; export { NcLoadingIcon as default }; //# sourceMappingURL=NcLoadingIcon.mjs.map