{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"f96a16f7fa6030ac934481465c2e86f8e77e274f","tarball":"https://registry.npmjs.org/@material/tab-scroller/-/tab-scroller-10.0.0-canary.b2faa116a.0.tgz","fileCount":52,"integrity":"sha512-1G0qQZ42qvMkBm58QBjLzxUebtOuWzsmxL2eCfosTKNgSNlAh9k94udIVOWGH9Yvm15OV85zIi/B7sUXr2R37Q==","signatures":[{"sig":"MEUCIGzEDEfqlOFELATZzzR0WK9127es6wrLTTumdPnIdklUAiEA3Hprf6lf3/DiLouk3HDXsSwsLCcGHJG+AtRoEyuZpvk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":322407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBzK0CRA9TVsSAnZWagAAWVUP/RDIeOPNgoWUPrJEYaI9\nxDx+UntNBG/e+XkrnG0u8ZpTtqUYue6vE0/srqqjv//W48whgknScECFXR4T\nMqf3GYdqw/by6S0hAWLrT7OOyFNqxB+IhcKJkblmFQG1PtPiv3kKVDEXB6Xx\nxJZwupjbJ6EhYqtmoG25mp3875LIZlG4GSQnlMkyoS1Xqpq23TjsMcrmyPAt\niADksYqWkv9I8JY/z7uue+tkBl8/aejjfVuWGVifKclqnxENHtTrZRxVhUgh\nio15P8i2xdt55eO1GzMjkDoCt6XP4ghG1ogkAoOxBUntHm0g1fMlDr+FaN5A\nMZlFR+lnfOE6Fy2D7QV8anOd0NPvDAwVfCSXmE3l1qspqU1dpkeOQAIrHj/R\nR95/ZG7uSeW0X/tXzcp/YDcULR0kvKMm/u72CSXMv4alK155w2MsqNn+T1jg\n8L+zlOMbP0xpLAqs/XmCrnlJutFEY4yA1nu7cBN2XEyZhfkhNOzGkZkMfhdk\nYOo9AlvFmW2ok4G9nR1pN8IAOZqJyV9BBBtIueem4blW8wM+2o25lLYEt9We\noKsR+G6XogkpFkqzT/ZBt6iGE1mjTkiQWFfXDmKGqYvMniN7FoQwIXlGmH3B\nZdtuH/Sg9MlTazqgrJ2MqWr1rDNu/J2NtFSdipIg14lSWZwMC/yiNefhZpaN\ndtIN\r\n=G1q+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.tabScroller.js","name":"@material/tab-scroller","types":"dist/mdc.tabScroller.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Tab Scroller\"\nlayout: detail\nsection: components\nexcerpt: \"Allows for smooth native and animated scrolling of tabs.\"\niconId: tabs\npath: /catalog/tabs/scroller/\n-->\n\n# Tab Scroller\n\nA Tab Scroller allows for smooth native and animated scrolling of tabs.\n\n## Design & API Documentation\n\n<ul class=\"icon-list\">\n  <li class=\"icon-list-item icon-list-item--spec\">\n    <a href=\"https://material.io/go/design-tabs#scrollable-tabs\">Material Design guidelines: Scrollable Tabs</a>\n  </li>\n  <li class=\"icon-list-item icon-list-item--link\">\n    <a href=\"https://material-components.github.io/material-components-web-catalog/#/component/tabs\">Demo</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/tab-scroller\n```\n\n## Basic Usage\n\n### HTML Structure\n\n```html\n<div class=\"mdc-tab-scroller\">\n  <div class=\"mdc-tab-scroller__scroll-area\">\n    <div class=\"mdc-tab-scroller__scroll-content\"></div>\n  </div>\n</div>\n```\n\n### Styles\n\n```scss\n@use \"@material/tab-scroller/mdc-tab-scroller\";\n```\n\n### JavaScript Instantiation\n\n```js\nimport {MDCTabScroller} from '@material/tab-scroller';\n\nconst tabScroller = new MDCTabScroller(document.querySelector('.mdc-tab-scroller'));\n```\n\n> See [Importing the JS component](../../docs/importing-js.md) for more information on how to import JavaScript.\n\n## Style Customization\n\n### CSS Classes\n\nCSS Class | Description\n--- | ---\n`mdc-tab-scroller` | Mandatory. Contains the tab scroller content.\n`mdc-tab-scroller__scroll-area` | Mandatory. Denotes the scrolling area.\n`mdc-tab-scroller__scroll-content` | Mandatory. Denotes the scrolling content.\n`mdc-tab-scroller--align-start` | Optional. Sets the elements inside the scroll content element to be aligned to the start of the scroll content element.\n`mdc-tab-scroller--align-end` | Optional. Sets the elements inside the scroll content element to be aligned to the end of the scroll content element.\n`mdc-tab-scroller--align-center` | Optional. Sets the elements inside the scroll content element to be aligned to the center of the scroll content element.\n\n> _NOTE_: The `align` modifier classes are only applicable when the contents do not meet or exceed the width of the Tab Scroller and Tab Bar (i.e., most commonly, when `mdc-tab--min-width` is used on each tab).\n\n### Sass Mixins\n\nMixin | Description\n--- | ---\n`transition($duration-ms, $timing-function)` | Sets the scroll animation duration and, optionally, the timing function.\n\n## `MDCTabScroller` Methods\n\nMethod Signature | Description\n--- | ---\n`scrollTo(scrollX: number) => void` | Scrolls to the scrollX value.\n`incrementScroll(scrollX: number) => void` | Increments the current scroll value by the scrollX value using animation.\n`incrementScrollImmediate(scrollX: number) => void` | Increments the current scroll value by the scrollX value without animation.\n`getScrollPosition() => number` | Returns the current visual scroll position.\n`getScrollContentWidth() => number` | Returns the width of the scroll content element.\n\n## Usage within Web Frameworks\n\nIf you are using a JavaScript framework, such as React or Angular, you can create a Tab Scroller for your framework. Depending on your needs, you can use the _Simple Approach: Wrapping MDC Web Vanilla Components_, or the _Advanced Approach: Using Foundations and Adapters_. Please follow the instructions [here](../../docs/integrating-into-frameworks.md).\n\n### `MDCTabScrollerAdapter`\n\nMethod Signature | Description\n--- | ---\n`eventTargetMatchesSelector(eventTarget: EventTarget, selector: string) => boolean` | Returns `true` if the given event target satisfies the given CSS selector.\n`addClass(className: string) => void` | Adds a class to the root element.\n`addScrollAreaClass(className: string) => void` | Adds a class to the scroll area element.\n`removeClass(className: string) => void` | Removes a class from the root element.\n`setScrollAreaStyleProperty(property: string, value: string) => void` | Sets the given style property on the scroll area element.\n`setScrollContentStyleProperty(property: string, value: string) => void` | Sets the given style property on the scroll content element.\n`getScrollContentStyleValue(property: string) => string` | Returns the given style property value on the scroll content element.\n`setScrollAreaScrollLeft(scrollLeft: number) => void` | Sets the scroll area element's `scrollLeft`.\n`getScrollAreaScrollLeft() => number` | Returns the scroll area element's `scrollLeft`.\n`getScrollContentOffsetWidth() => number` | Returns the scroll content element's `offsetWidth`.\n`getScrollAreaOffsetWidth() => number` | Returns the scroll area element's `offsetWidth`.\n`computeScrollAreaClientRect() => ClientRect` | Returns the bounding client rect of the scroll area element.\n`computeScrollContentClientRect() => ClientRect` | Returns the bounding client rect of the scroll content element.\n`computeHorizontalScrollbarHeight() => number` | Returns the height of the browser's horizontal scrollbars (in px).\n\n#### `util` Functions\n\nMDC Tab Scroller provides a `util` module with functions to help implement adapter methods.\n\nFunction Signature | Description\n--- | ---\n`computeHorizontalScrollbarHeight(document: Document) => number` | Returns the height of the browser's horizontal scrollbars (in px).\n\n### `MDCTabScrollerFoundation`\n\nMethod Signature | Description\n--- | ---\n`getRTLScroller() => MDCTabScrollerRTL` | Creates an RTL Scroller instance for the current browser.\n`getScrollPosition() => number` | Returns the current visual scroll position.\n`handleInteraction() => void` | Responds to mouse, pointer, touch, and keyboard events.\n`handleTransitionEnd(evt: Event) => void` | Responds to a `transitionend` event on the `mdc-tab-scroller__scroll-content` element.\n`incrementScroll(scrollX: number) => void` | Increments the current scroll value by the `scrollX` value.\n`scrollTo(scrollX: number) => void` | Scrolls to the `scrollX` value.\n\n### `MDCTabScrollerRTL`\n\nAbstract class with three concrete implementations depending on the browser:\n\n* `MDCTabScrollerRTLDefault`\n* `MDCTabScrollerRTLNegative`\n* `MDCTabScrollerRTLReverse`\n\nMethod Signature | Description\n--- | ---\n`getAnimatingScrollPosition(scrollX: number, translateX: number) => number` | Returns the current scroll position during animation.\n`getScrollPositionRTL(translateX: number) => number` | Returns the number of px the user has scrolled horizontally, relative to the leading edge.\n`incrementScrollRTL(scrollX: number) => MDCTabScrollerAnimation` | Returns an object containing the values required to animate from the current scroll position to a new scroll position.\n`scrollToRTL(scrollX: number) => MDCTabScrollerAnimation` | Scrolls content horizontally to the given position in an RTL-friendly way.\n","gitHead":"8c83e6751cbdbda8095b6ae0686196398066d600","license":"MIT","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","tab","scroller"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-tab-scroller"},"_npmVersion":"lerna/3.20.2/node@v10.23.1+x64 (linux)","description":"The Material Components for the web tab scroller component","directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"tslib":"^1.9.3","@material/dom":"10.0.0-canary.b2faa116a.0","@material/tab":"10.0.0-canary.b2faa116a.0","@material/base":"10.0.0-canary.b2faa116a.0","@material/animation":"10.0.0-canary.b2faa116a.0","@material/feature-targeting":"10.0.0-canary.b2faa116a.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/tab-scroller_10.0.0-canary.b2faa116a.0_1611084467653_0.5290185615435445","host":"s3://npm-registry-packages"},"_id":"@material/tab-scroller@10.0.0-canary.b2faa116a.0","version":"10.0.0-canary.b2faa116a.0"}