In my opinion i am not recommended to use --force or --legacy-peer-deps.it may affect other packages results in import error in all pages.u can downgrade your react->^18 version and try install that library.
or u can u simliy install via cdn check below reference: https://www.jsdelivr.com/package/npm/@atlaskit/ds-lib
or try to find similar package in npm: https://www.npmjs.com/search?q=%40atlaskit%2Fds-lib