{"_id":"@aurolabs/auro-back-to-top","_rev":"10-07e1e61c41f5f30e54ca1786c7853f2f","name":"@aurolabs/auro-back-to-top","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.2":{"//":["================================================================================","# To work within the development environment, run the following tasks","  1. $ npm run dev","  2. $ npm run serve","  3. Go to http://localhost:8000","================================================================================"],"name":"@aurolabs/auro-back-to-top","version":"1.0.2","description":"Auro custom auro-back-to-top element","author":{"name":"Product design and research"},"repository":{"type":"git","url":"git+https://github.com/AlaskaAirlines/auro-back-to-top.git"},"main":"index.js","license":"Apache-2.0","dependencies":{"lit-element":"^2.4.0","chalk":"^4.1.0"},"peerDependencies":{"@alaskaairux/design-tokens":"^3.1.0","@alaskaairux/webcorestylesheets":"^3.0.0","@alaskaairux/icons":"^4.4.3","@webcomponents/webcomponentsjs":"^2.5.0","focus-visible":"^5.2.0"},"devDependencies":{"@alaskaairux/design-tokens":"^3.1.0","@alaskaairux/icons":"^4.4.3","@alaskaairux/webcorestylesheets":"^3.0.0","@babel/core":"^7.12.17","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.12.17","@babel/preset-env":"^7.12.17","@babel/runtime":"^7.12.18","@commitlint/cli":"^11.0.0","@commitlint/config-conventional":"^11.0.0","@open-wc/testing":"^2.5.32","@open-wc/testing-karma":"^4.0.9","@rollup/plugin-alias":"^3.1.2","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^17.1.0","@rollup/plugin-node-resolve":"^11.2.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.10","@web/dev-server":"^0.1.8","@webcomponents/webcomponentsjs":"^2.5.0","autoprefixer":"^10.2.4","babel-loader":"^8.2.2","compression":"^1.7.4","concat":"^1.0.3","copyfiles":"^2.4.1","core-js":"^3.9.0","eslint":"^7.20.0","eslint-plugin-lit":"^1.3.0","focus-visible":"^5.2.0","husky":"^5.1.1","lodash":"^4.17.21","marked":"^2.0.0","nodemon":"^2.0.7","npm-run-all":"^4.1.5","postcss":"^8.2.6","postcss-custom-properties":"^11.0.0","postcss-discard-comments":"^4.0.2","postcss-remove-rules":"^1.0.0","postcss-selector-replace":"^1.0.2","prismjs":"^1.23.0","rollup":"^2.39.0","rollup-plugin-minify-html-literals":"^1.2.5","rollup-plugin-serve":"^1.1.0","rollup-plugin-terser":"^7.0.2","semantic-release":"^17.3.9","sinon":"^9.2.4","stylelint":"^13.11.0","stylelint-config-standard":"^20.0.0","wc-sass-render":"^1.2.3","web-component-analyzer":"^1.1.6","webpack-merge":"^5.7.3","whatwg-fetch":"^3.6.1","yaml-lint":"^1.2.4"},"browserslist":["last 2 Chrome versions","last 2 iOS major versions","ie 11","last 2 Firefox versions","last 2 Edge versions","last 2 Safari major versions"],"scripts":{"build":"npm run ciBuild","apiBuild":"wca analyze 'src/auro-back-to-top.js' --outFiles docs/api.md","bundler":"rollup -c","bundle:test":"rollup -c -w","postinstall":"node packageScripts/postinstall.js","cssLint":"stylelint \"./src/*.css\"","dev":"npm run sassBuild:watch","distJS":"copyfiles -u 1 -V './src/**/*.js' ./dist","sassRender":"sass-render src/*.css -t ./scripts/staticStyles-template.js","sweep":"rm -rf ./temp ./demo/css ./demo/fonts ./dist ./src/tokens | rm ./src/*.css ./src/*-css.js","esLint":"eslint src/auro-*.js","lint":"npm-run-all cssLint esLint","test":"karma start --coverage","test:watch":"karma start --auto-watch=true --single-run=false","test:ci":"npm-run-all test lint","ciBuild":"npm-run-all sassBuild sassRender cssLint distJS bundler postinstall apiBuild","sassBuild":"npm-run-all sassBuild:demo sassBuild:component postCss:component sassRender","sassBuild:dev":"npm-run-all sassBuild:demo sassBuild:component postCss:component sassRender","sassBuild:demo":"node-sass ./demo/sass/ --output ./demo/css/","sassBuild:component":"node-sass ./src/ --output ./src/","sassBuild:watch":"nodemon -e scss --watch src --exec npm run sassBuild:dev","postCss:component":"node ./scripts/postCss.js","serve":"web-dev-server --open demo/ --node-resolve --watch","demo:rmBuild":"rm -rf ./build","demo:newBuild":"mkdir ./build && mkdir ./build/css && mkdir ./build/demo","demo:copyDemo":"copyfiles -u 1 -V './demo/demo.md' ./build/demo","demo:copyIndex":"copyfiles -u 1 -V './demo/index.html' ./build","demo:updateIndex":"node ./scripts/prepForBuild","demo:build":"npm-run-all ciBuild demo:rmBuild demo:newBuild demo:copyIndex demo:copyDemo demo:updateIndex"},"husky":{"hooks":{"pre-commit":"npm-run-all test lint bundler postinstall","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"release":{"branches":["main"],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/changelog",{"changelogFile":"./CHANGELOG.md","changelogTitle":"# Semantic Release Automated Changelog"}],"@semantic-release/npm",["@semantic-release/git",{"assets":["./CHANGELOG.md","package.json"]}],"@semantic-release/github"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"publishConfig":{"access":"public"},"keywords":["alaska airlines","auro","design system","web components"],"gitHead":"b8d6ce39cc5f5591e64cde9789a80cc4505a5e2e","bugs":{"url":"https://github.com/AlaskaAirlines/auro-back-to-top/issues"},"homepage":"https://github.com/AlaskaAirlines/auro-back-to-top#readme","_id":"@aurolabs/auro-back-to-top@1.0.2","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-5ShjPXYHtWm5lYIGLEPR7BGIbOOPnvomL/OABV//xVxD/fYHTpFHnfqKh0gO6G00xl+6Vj5+0GypOd/StrwK8Q==","shasum":"8580bdc56d0156199d06d68500be35f99fe1ce5f","tarball":"https://registry.npmjs.org/@aurolabs/auro-back-to-top/-/auro-back-to-top-1.0.2.tgz","fileCount":17,"unpackedSize":333264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOYCaCRA9TVsSAnZWagAAu9QQAJxMtPd53KyjjW0xT6zV\nNyVJG9upOmGvE12wLv1xgQ4qfsYPQWTTzjamfn3QXY7k2+4E/EQRBEOgh0eR\naGj6wSjhXZB+MhxQRhc5yQQv7ajifQ0n2bI5vv1Kq6AF36aQs8bjedIB4K5O\nxI0QBaACa2ID633YjMjGpV9dGtLndPeAknT+lC2pTWCartWwZ1RmxjzKPILD\nX6vWWUys/MMcqcTJhtf6pEv5gPvPftFvJ+NNSzaCeOlJpKYdWwqaWiPfQv08\nzItB9YlvoVuOBfOujoB9fetKSwxvhYGl0dHc0H9zFrhkqyVRTH3tNLtdAij4\n5GWoQgzoa1j8wo+ipZzU1PjZctJ3h8jCua2RHA4UV1Ofjf6Y3sxzE4slSbZ/\nYNIkVIyO2Q68/cGhV+P/6XfMrCELSyrwby3+3n3jBlW74v/ar6s66R6NyuUs\nxN9qjwp8etdLf7aMLpwB39mPXKtKDxihCpmwPGFyGbzNQatGZAynrIQLxoIw\nK1/oOl8nE+visxo+tJk8RAMYItedULR328QeAu3GURc88FApYR5Rql48+WUq\nd/mcJElkmqVw62kEGkUkLyv8KQ6OgsSxpgixAj8Wt/u98YZbFpTFBAxurYCB\nsERe/lWp/a1Ngzg48ktDpdqWZKhq0b1OimKsu355flTResx+CoTR1OOXNVii\nBIT3\r\n=oLZw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEOpFWyNFi38cpnZdKwlP7U2EsLRLQRz5qLmpO9j+r9QAiAwafo+Ny9pZcvrA0nW2+3ij6khEhopt3Rq7PrAkPsu4g=="}]},"_npmUser":{"name":"dale.sande","email":"dale.sande@alaskaair.com"},"directories":{},"maintainers":[{"name":"blackfalcon","email":"dale.sande@gmail.com"},{"name":"dale.sande","email":"dale.sande@alaskaair.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auro-back-to-top_1.0.2_1614381209582_0.5434441763838309"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0":{"//":["================================================================================","# To work within the development environment, run the following tasks","  1. $ npm run dev","  2. $ npm run serve","  3. Go to http://localhost:8000","================================================================================"],"name":"@aurolabs/auro-back-to-top","version":"1.1.0","description":"Auro custom auro-back-to-top element","author":{"name":"Product design and research"},"repository":{"type":"git","url":"git+https://github.com/AlaskaAirlines/auro-back-to-top.git"},"main":"index.js","license":"Apache-2.0","dependencies":{"lit-element":"^2.4.0","chalk":"^4.1.0"},"peerDependencies":{"@alaskaairux/design-tokens":"^3.1.0","@alaskaairux/webcorestylesheets":"^3.0.0","@alaskaairux/icons":"^4.4.3","@webcomponents/webcomponentsjs":"^2.5.0","focus-visible":"^5.2.0"},"devDependencies":{"@alaskaairux/design-tokens":"^3.1.0","@alaskaairux/icons":"^4.4.3","@alaskaairux/webcorestylesheets":"^3.0.0","@babel/core":"^7.12.17","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.12.17","@babel/preset-env":"^7.12.17","@babel/runtime":"^7.12.18","@commitlint/cli":"^11.0.0","@commitlint/config-conventional":"^11.0.0","@open-wc/testing":"^2.5.32","@open-wc/testing-karma":"^4.0.9","@rollup/plugin-alias":"^3.1.2","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^17.1.0","@rollup/plugin-node-resolve":"^11.2.0","@semantic-release/changelog":"^5.0.1","@semantic-release/git":"^9.0.0","@semantic-release/npm":"^7.0.10","@web/dev-server":"^0.1.8","@webcomponents/webcomponentsjs":"^2.5.0","autoprefixer":"^10.2.4","babel-loader":"^8.2.2","compression":"^1.7.4","concat":"^1.0.3","copyfiles":"^2.4.1","core-js":"^3.9.0","eslint":"^7.20.0","eslint-plugin-lit":"^1.3.0","focus-visible":"^5.2.0","husky":"^5.1.1","lodash":"^4.17.21","marked":"^2.0.0","nodemon":"^2.0.7","npm-run-all":"^4.1.5","postcss":"^8.2.6","postcss-custom-properties":"^11.0.0","postcss-discard-comments":"^4.0.2","postcss-remove-rules":"^1.0.0","postcss-selector-replace":"^1.0.2","prismjs":"^1.23.0","rollup":"^2.39.0","rollup-plugin-minify-html-literals":"^1.2.5","rollup-plugin-serve":"^1.1.0","rollup-plugin-terser":"^7.0.2","semantic-release":"^17.3.9","sinon":"^9.2.4","stylelint":"^13.11.0","stylelint-config-standard":"^20.0.0","wc-sass-render":"^1.2.3","web-component-analyzer":"^1.1.6","webpack-merge":"^5.7.3","whatwg-fetch":"^3.6.1","yaml-lint":"^1.2.4"},"browserslist":["last 2 Chrome versions","last 2 iOS major versions","ie 11","last 2 Firefox versions","last 2 Edge versions","last 2 Safari major versions"],"scripts":{"build":"npm run ciBuild","apiBuild":"wca analyze 'src/auro-back-to-top.js' --outFiles docs/api.md","bundler":"rollup -c","bundle:test":"rollup -c -w","postinstall":"node packageScripts/postinstall.js","cssLint":"stylelint \"./src/*.css\"","dev":"npm run sassBuild:watch","distJS":"copyfiles -u 1 -V './src/**/*.js' ./dist","sassRender":"sass-render src/*.css -t ./scripts/staticStyles-template.js","sweep":"rm -rf ./temp ./demo/css ./demo/fonts ./dist ./src/tokens | rm ./src/*.css ./src/*-css.js","esLint":"eslint src/auro-*.js","lint":"npm-run-all cssLint esLint","test":"karma start --coverage","test:watch":"karma start --auto-watch=true --single-run=false","test:ci":"npm-run-all test lint","ciBuild":"npm-run-all sassBuild sassRender cssLint distJS bundler postinstall apiBuild","sassBuild":"npm-run-all sassBuild:demo sassBuild:component postCss:component sassRender","sassBuild:dev":"npm-run-all sassBuild:demo sassBuild:component postCss:component sassRender","sassBuild:demo":"node-sass ./demo/sass/ --output ./demo/css/","sassBuild:component":"node-sass ./src/ --output ./src/","sassBuild:watch":"nodemon -e scss --watch src --exec npm run sassBuild:dev","postCss:component":"node ./scripts/postCss.js","serve":"web-dev-server --open demo/ --node-resolve --watch","demo:rmBuild":"rm -rf ./build","demo:newBuild":"mkdir ./build && mkdir ./build/css && mkdir ./build/demo","demo:copyDemo":"copyfiles -u 1 -V './demo/demo.md' ./build/demo","demo:copyIndex":"copyfiles -u 1 -V './demo/index.html' ./build","demo:updateIndex":"node ./scripts/prepForBuild","demo:build":"npm-run-all ciBuild demo:rmBuild demo:newBuild demo:copyIndex demo:copyDemo demo:updateIndex"},"husky":{"hooks":{"pre-commit":"npm-run-all test lint bundler postinstall","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"release":{"branches":["main"],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/changelog",{"changelogFile":"./CHANGELOG.md","changelogTitle":"# Semantic Release Automated Changelog"}],"@semantic-release/npm",["@semantic-release/git",{"assets":["./CHANGELOG.md","package.json"]}],"@semantic-release/github"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"publishConfig":{"access":"public"},"keywords":["alaska airlines","auro","design system","web components"],"gitHead":"a8e1640b32310db786df4e27719924845fc9061c","bugs":{"url":"https://github.com/AlaskaAirlines/auro-back-to-top/issues"},"homepage":"https://github.com/AlaskaAirlines/auro-back-to-top#readme","_id":"@aurolabs/auro-back-to-top@1.1.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-idV3aV96RDnua2ET608PRMEyN17HXAIlMLPNIwpPNeR/T3asucQjXFiSKr9sKJAgmwM7/8LjYNDUGZi9W5hb6w==","shasum":"3d5f505e1198b8df66fbbffe924f3d6008a2cca4","tarball":"https://registry.npmjs.org/@aurolabs/auro-back-to-top/-/auro-back-to-top-1.1.0.tgz","fileCount":18,"unpackedSize":2758182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh12EWCRA9TVsSAnZWagAAvKUP/iWExK2/Sl7aDb9/zEWY\nGvxlM37FWE5LluziYczvPAhlQpR3nB2oowHwPIBO3noSLEqqD0nin32Y/VjM\nFVWGG+WJJqrFyuWfMh51lu8yjaOxOeNCMzIUlS8bWkmqYGDYeg1Sk63zvD6G\nBn2iBrK6LLKOfF72M0KtWEYnoMBIAfhbkKMj/XkhaHY2ZZsHKuKi33oA8i3p\ni6fvofy0LP3Adn5JRB7J82uTqbSamOhksWLL5iDnvqbfqycEkuGViF96XYvo\n4j8F07CqZ7ELZtDf9ynhf9+ogo2IGgbW01GGXCLZBrC+tXvhIk1+wuWMuVRX\nyJZ7w6xgk8UfGnaNsx+uL6CMboVhUZNmk2hodEAyC8J2tB7wMWMUKrjdEt+G\ntc46/qzDwDCaPahciBHbiQti4P8YDAB9Ydf/9tNNXjuCzRy/Q4WsmBSx+vJH\n+URRQQQx/GMEnv00Mv3+IzpIKO17jAMDfg4rQXc7nWloeIO0eqxk+qm7TkIR\neXnmZyVQhZ5bT5Jrwc1fUbJTfHb9NdGQ7MDfUN9tgU2PHRCxkDBs9S35UuMC\nvxJRMecIChvnVN2JrIwx+OLwSujv+Bqx7ku7yfjmoTt+SrLGgfjLioYvuFKp\nqSqleE+8XUxVDAwQcf0/+BaD2CoySFaPITwJGtxIOLOWevYmPPjST+Qej1Xi\n7op+\r\n=3X1r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSm2v3D6vFfZZNOc1+oGBfyx3mwOEMSbHPUV7TKFbuCwIgIMWPFtnaYj0qGYLxkhxsOnMXLyf+4RdFv6hIkux+HXo="}]},"_npmUser":{"name":"dale.sande","email":"dale.sande@alaskaair.com"},"directories":{},"maintainers":[{"name":"blackfalcon","email":"dale.sande@gmail.com"},{"name":"dale.sande","email":"dale.sande@alaskaair.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auro-back-to-top_1.1.0_1615395586421_0.19272377440548105"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2021-02-26T23:13:29.345Z","1.0.2":"2021-02-26T23:13:29.736Z","modified":"2023-08-09T22:59:28.846Z","1.1.0":"2021-03-10T16:59:46.748Z"},"maintainers":[{"email":"dale.sande@gmail.com","name":"blackfalcon"},{"email":"dale.sande@alaskaair.com","name":"dale.sande"}],"description":"Auro custom auro-back-to-top element","homepage":"https://github.com/AlaskaAirlines/auro-back-to-top#readme","keywords":["alaska airlines","auro","design system","web components"],"repository":{"type":"git","url":"git+https://github.com/AlaskaAirlines/auro-back-to-top.git"},"author":{"name":"Product design and research"},"bugs":{"url":"https://github.com/AlaskaAirlines/auro-back-to-top/issues"},"license":"Apache-2.0","readme":"# Back-to-top\n\n`<auro-back-to-top>` is a [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) for the purpose of helping visitors quickly return to page top.\n\n![demo showing the button scroll into view and button click to return to top](docs/demo_auro-back-to-top.GIF)\n\n## UI development browser support\n\nFor the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)\n\n## Install\n\n[![Test and publish](https://github.com/AlaskaAirlines/auro-back-to-top/actions/workflows/testPublish.yml/badge.svg?branch=main)](https://github.com/AlaskaAirlines/auro-back-to-top/actions/workflows/testPublish.yml)\n[![See it on NPM!](https://img.shields.io/npm/v/@aurolabs/auro-back-to-top?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurolabs/auro-back-to-top)\n[![License](https://img.shields.io/npm/l/@aurolabs/auro-back-to-top?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)\n\n```shell\n$ npm i @aurolabs/auro-back-to-top\n```\n\nInstalling as a direct, dev or peer dependency is up to the user installing the package. If you are unsure as to what type of dependency you should use, consider reading this [stack overflow](https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies) answer.\n\n### Design Token CSS Custom Property dependency\n\nThe use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).\n\n### CSS Custom Property fallbacks\n\n[CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) are [not supported](https://auro.alaskaair.com/support/custom-properties) in older browsers. For this, fallback properties are pre-generated and included with the npm.\n\nAny update to the Auro Design Tokens will be immediately reflected with browsers that support CSS custom properties, legacy browsers will require updated components with pre-generated fallback properties.\n\n### Define dependency in project component\n\nDefining the component dependency within each component that is using the `<auro-back-to-top>` component.\n\n```javascript\nimport \"@aurolabs/auro-back-to-top\";\n```\n\n**Reference component in HTML**\n\n```html\n<auro-back-to-top></auro-back-to-top>\n```\n\n## Install bundled assets from CDN\n\nIn cases where the project is not able to process JS assets, there are pre-processed assets available for use. Two bundles are available -- `auro-back-to-top__bundled.js` for modern browsers and `auro-back-to-top__bundled.es5.js` for legacy browsers (including IE11).\n\nSince the legacy bundle includes many polyfills that are not needed by modern browsers, we recommend you load these bundles using [differential serving](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/) so that the browser only loads the bundle it needs. To accomplish this, the script tag for the modern bundle should have `type=\"module\"` and the script tag for the legacy bundle should have the `nomodule` attribute. See the example below.\n\n**NOTE:** Be sure to replace `@latest` in the URL with the version of the asset you want. @latest is NOT aware of any MAJOR releases, use at your own risk.\n\n```html\n<link rel=\"stylesheet\" href=\"https://unpkg.com/@alaskaairux/design-tokens@latest/dist/tokens/CSSCustomProperties.css\" />\n<link rel=\"stylesheet\" href=\"https://unpkg.com/@alaskaairux/webcorestylesheets@latest/dist/bundled/essentials.css\" />\n\n<script src=\"https://unpkg.com/@aurolabs/auro-back-to-top@latest/dist/auro-back-to-top__bundled.js\" type=\"module\"></script>\n<script src=\"https://unpkg.com/@aurolabs/auro-back-to-top@latest/dist/auro-back-to-top__bundled.es5.js\" nomodule></script>\n```\n\n## auro-back-to-top use cases\n\nThe `<auro-back-to-top>` element should be used in situations where users may:\n\n* informational pages with many sections\n* pages with infinite scroll\n\n## API Code Examples\n\nDefault (fixed positioning):\n\n```html\n<auro-back-to-top focus-id=\"top\"></auro-back-to-top>\n```\n\nThe most important--and required--attribute to this element is `focus-id`. This is the id of an focusable element at the top of the page. When the trigger button is clicked to go back to top, the element will shift focus to the target element and scroll to its top position. A useful way to think of this is a reverse of the \"Skip to main\" affordance.\n\nAnchors or buttons are examples of focusable elements, but more likely the target is a `<div>`, `<main>`, `<section>` or other non-focusable element. To these, you'll need to add the `tabindex` attribute with a value of -1. This will allow the element to receive focus so your user can resume tabbing from the top of the page, but it will keep the target element out of the default tab order so users don't stumble into it at the start of the page.\n\n```html\n<main id=\"top\" tabindex=\"-1\">\n    ...\n    <auro-back-to-top focus-id=\"top\"></auro-back-to-top>\n</main>\n```\n\nAdjust how soon or delayed the button shows either by where you include the element in your document or with the `rootmargintop` property:\n\n```html\n<!-- delay showing the button until after user scrolls 3vh + 1vh (reference element out-of-screen) -->\n<auro-back-to-top focus-id=\"top\" offset=\"3vh\"></auro-back-to-top>\n```\n\nTo display inline:\n\n```html\n<auro-back-to-top focus-id=\"top\" inline></auro-back-to-top>\n```\n\nFor i18n support:\n\n```html\n<auro-back-to-top focus-id=\"top\">volver arriba</auro-back-to-top>\n```\n\nYou can customize what renders in the button:\n\n```html\n<auro-back-to-top focus-id=\"top\" inline>zoom zoom! 🚀</auro-back-to-top>\n```\n\n## Possible issues and workarounds\n\nIssues with `auro-back-to-top` element and its fixed-position button may trace back to stacking context. For a good time learning about how the browser decides where to position elements and stacking contexts, the [MDN documentation on `position`](https://developer.mozilla.org/en-US/docs/Web/CSS/position) is a great start.\n\n### **The button does not become visible at the expected scroll height**\n\nTo know when to show and hide the fixed button, `auro-back-to-top` uses a reference element positioned absolutely to `top`. Placing the `auro-back-to-top` as the last content node in the `body` is encouraged. If not possible, look for parent nodes with `position` set other than the default, static. \n\n### **The button scrolls _under_ elements on the page**\n\nThe fixed button applies a high `z-index` to improve its odds of rendering above content but it can still lose. The suggestion above can help here, too: placing the `auro-back-to-top` as the last content node in the `body`. If not possible, inspect the `position` and `z-index` styles applied to elements it scrolls under, use negative z-index if necessary to allow the button to scroll over top.\n\n### Why is my page too tall?\n\nIf you set a high offset, for example `offset=\"42vh\"`, this will increase the total height of your content. Set `offset` value reasonably and check at different breakpoints so that it never calculates as taller than the content height.\n\n## Development\n\nIn order to develop against this project, if you are not part of the core team, you will be required to fork the project prior to submitting a pull request.\n\nPlease be sure to review the [contribution guidelines](https://auro.alaskaair.com/getting-started/developers/contributing) for this project. Please make sure to **pay special attention** to the **conventional commits** section of the document.\n\n### Start development environment\n\nOnce the project has been cloned to your local resource and you have installed all the dependencies you will need to open two different shell sessions. One is for the **npm tasks**, the second is to run the **server**.\n\n```shell\n// shell terminal one\n$ npm run dev\n\n// shell terminal two\n$ npm run serve\n```\n\nOpen [localhost:8000](http://localhost:8000/)\n\n### Testing\nAutomated tests are required for every Auro component. See `.\\test\\auro-back-to-top.test.js` for the tests for this component. Run `npm test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.\n\n### Demo deployment\n\nTo deploy a demo version of the component for review, run `npm run demo:build` to create a `./build` directory that can be pushed to any static server.\n","readmeFilename":"README.md"}