{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"ec86c97ba83e5783b8b461a1260c2408a3710d64","tarball":"https://registry.npmjs.org/@material/tab-bar/-/tab-bar-14.0.0-canary.7d8ea4624.0.tgz","fileCount":37,"integrity":"sha512-zV+z5c8Q5tx27ox29+bPHBFQ5eF9nMHVpYm1jrnJvxCfpAl70VuKRWXl77DOZk0ONHn/SqklyJh9w1EXTRxTew==","signatures":[{"sig":"MEUCIF1SEH29bAzseSrVFbKZ6vprlN9oqzYWKi0a8LPws/H9AiEArWZUSJgNWQR7wXUvEYHNusuUf2pVEm2KzXkwATG6wLQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":572489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs6sACRA9TVsSAnZWagAAz/MP/2o/w/gQshxn1CggTzD6\nleMX67RqIvUR8qcP+DCQ3u05nRpXC/QudVBHlCMoU7qZ3QPQDzVeZyG+/fr6\nxGHPoY/gHGb6XOFw/1/rcA/dTRykKuuNz+daeZgLB9KQbEnVdlAxpc3r7L0D\nQv68VuTA9V9gU7jCnClR1Elqe8AzyLJWuPpYgFZcVoEYN117NcI5dHoDjNEL\nOpiC8Gt6sz8v/8v5WcTpvUeDRcqWTuG2ZKhmdxVSMjexmVwhsHFUn9bhu5aZ\ni2JxwvmrJMBspdw/n9IzCdZpy3YTC1OeUNlRMBdjyCXMVeEfK5jsrEriLtWX\nXy5SOWI20aabgN5/vQo4xnFwwXKG4Ek9N2cIhBJjMvVMTY6m5+NDwgpKehPM\nb+TMpQZFDz2NjnP9O/VeWY9zHOKov17RQBWcQRxB+BZIZ9CgqIq3zxLhlWs0\ncDyrteHQxgYDWnRz32OUknzBYAXDlMDgm27ZjJGQu4GlZuruMIyn6ug3XR77\nNlZllINFuiUwXYhFuyI0ZONH2kU+vK6fHHDhiEAn9OjaCOxqyni9F0b+Urqh\nCSLyDfMJLD+ft+g8Ni5pRcEVe0WtkzUIUbvDcqsSZ3iu30Kwh74BM0aRDgdx\nQFXk47QWcQ5d0YxyOJ4fTjvbA3KYsZT/QEixqzMjGLpuUB8H4xpg9O38k2EK\ngpen\r\n=pOy1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.tabBar.js","name":"@material/tab-bar","module":"index.js","readme":"<!--docs:\ntitle: \"Tab Bar\"\nlayout: detail\nsection: components\nexcerpt: \"Manages a set of Tabs.\"\niconId: tabs\npath: /catalog/tabs/tab-bar/\n-->\n\n# Tab Bar\n\nTabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.\nThe Tab Bar contains the Tab Scroller and Tab components.\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\">Material Design guidelines: 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-bar\n```\n\n## Basic Usage\n\n### HTML Structure\n\n```html\n<div class=\"mdc-tab-bar\" role=\"tablist\">\n  <div class=\"mdc-tab-scroller\">\n    <div class=\"mdc-tab-scroller__scroll-area\">\n      <div class=\"mdc-tab-scroller__scroll-content\">\n        <button class=\"mdc-tab mdc-tab--active\" role=\"tab\" aria-selected=\"true\" tabindex=\"0\">\n          <span class=\"mdc-tab__content\">\n            <span class=\"mdc-tab__icon material-icons\" aria-hidden=\"true\">favorite</span>\n            <span class=\"mdc-tab__text-label\">Favorites</span>\n          </span>\n          <span class=\"mdc-tab-indicator mdc-tab-indicator--active\">\n            <span class=\"mdc-tab-indicator__content mdc-tab-indicator__content--underline\"></span>\n          </span>\n          <span class=\"mdc-tab__ripple\"></span>\n          <div class=\"mdc-tab__focus-ring\"></div>\n        </button>\n      </div>\n    </div>\n  </div>\n</div>\n```\n\n### Styles\n\n```scss\n@use \"@material/tab-bar/mdc-tab-bar\";\n@use \"@material/tab-scroller/mdc-tab-scroller\";\n@use \"@material/tab-indicator/mdc-tab-indicator\";\n@use \"@material/tab/mdc-tab\";\n```\n\n### JavaScript Instantiation\n\n```js\nimport {MDCTabBar} from '@material/tab-bar';\n\nconst tabBar = new MDCTabBar(document.querySelector('.mdc-tab-bar'));\n```\n\n> See [Importing the JS component](../../docs/importing-js.md) for more information on how to import JavaScript.\n\n## Variants\n\nMDC Tab Bar does not have any variants; however, its subcomponents do. See the [Tab Scroller](../mdc-tab-scroller),\n[Tab](../mdc-tab), and [Tab Indicator](../mdc-tab-indicator) documentation for more information.\n\n### Tab Icons\n\nWe recommend using [Material Icons](https://material.io/tools/icons/) from Google Fonts:\n\n```html\n<head>\n  <link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/icon?family=Material+Icons\">\n</head>\n```\n\nHowever, you can also use SVG, [Font Awesome](https://fontawesome.com/), or any other icon library you wish.\n\n## Style Customization\n\n### CSS Classes\n\nCSS Class | Description\n--- | ---\n`mdc-tab-bar` | Mandatory.\n\n### Sass Mixins\n\nTo customize the width of the tab bar, use the following mixin.\n\nMixin | Description\n--- | ---\n`width($width)` | Customizes the width of the tab bar.\n`density($density-scale)` | Sets density scale to default tab bar variant. Use `stacked-density` mixin for stacked variant. Supported density scales `-4`, `-3`, `-2`, `-1` and `0`.\n`stacked-density($density-scale)` | Sets density scale to stacked tab bar variant. Supported density scales `-4`, `-3`, `-2`, `-1` and `0`.\n`tab-scroller-transition($duration-ms, $timing-function)` | Sets the CSS transition for the tab scrolling animation. This mixin is a proxy to `mdc-tab-scroller-transition` mixin.\n\n\n## `MDCTabBar` Properties and Methods\n\nProperty | Value Type | Description\n--- | --- | ---\n`focusOnActivate` | `boolean` (write-only) | Sets whether tabs focus themselves when activated. Defaults to `true`.\n`useAutomaticActivation` | `boolean` (write-only) | Sets how tabs activate in response to keyboard interaction. Automatic (`true`) activates as soon as a tab is focused with arrow keys; manual (`false`) activates only when the user presses space/enter. The default is automatic (`true`).\n\nMethod Signature | Description\n--- | ---\n`activateTab(index: number) => void` | Activates the tab at the given index.\n`scrollIntoView(index: number) => void` | Scrolls the tab at the given index into view.\n\nEvent Name | Event Data Structure | Description\n--- | --- | ---\n`MDCTabBar:activated` | `{\"detail\": {\"index\": number}}` | Emitted when a Tab is activated with the index of the activated Tab. Listen for this to update content when a Tab becomes active.\n\n## Usage within Web Frameworks\n\nIf you are using a JavaScript framework, such as React or Angular, you can create a Tab Bar 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### `MDCTabBarAdapter`\n\nMethod Signature | Description\n--- | ---\n`scrollTo(scrollX: number) => void` | Scrolls the Tab Scroller to the given position.\n`incrementScroll(scrollXIncrement: number) => void` | Increments the Tab Scroller by the given value.\n`getScrollPosition() => number` | Returns the scroll position of the Tab Scroller.\n`getScrollContentWidth() => number` | Returns the width of the Tab Scroller's scroll content element.\n`getOffsetWidth() => number` | Returns the offsetWidth of the root element.\n`isRTL() => boolean` | Returns if the text direction is RTL.\n`setActiveTab(index: number) => void` | Sets the tab at the given index to be activated.\n`activateTabAtIndex(index: number, clientRect: ClientRect) => void` | Activates the Tab at the given index with the given clientRect.\n`deactivateTabAtIndex(index) => void` | Deactivates the Tab at the given index.\n`focusTabAtIndex(index: number) => void` | Focuses the Tab at the given index.\n`getTabIndicatorClientRectAtIndex(index: number) => ClientRect` | Returns the client rect of the Tab at the given index.\n`getTabDimensionsAtIndex(index) => MDCTabDimensions` | Returns the dimensions of the Tab at the given index.\n`getTabListLength() => number` | Returns the number of child Tab components.\n`getPreviousActiveTabIndex() => number` | Returns the index of the previously active Tab.\n`getFocusedTabIndex() => number` | Returns the index of the focused Tab.\n`getIndexOfTabById(id: string) => number` | Returns the index of the given Tab ID.\n`notifyTabActivated(index: number) => void` | Emits the `MDCTabBar:activated` event.\n\n### `MDCTabBarFoundation`\n\nMethod Signature | Description\n--- | ---\n`activateTab(index: number) => void` | Activates the tab at the given index.\n`setUseAutomaticActivation(useAutomaticActivation: boolean) => void` | Sets how tabs activate in response to keyboard interaction. Automatic (`true`) activates as soon as a tab is focused with arrow keys; manual (`false`) activates only when the user presses space/enter.\n`handleKeyDown(evt: Event) => void` | Handles the logic for the `\"keydown\"` event.\n`handleTabInteraction(evt: Event) => void` | Handles the logic for the `\"MDCTab:interacted\"` event.\n`scrollIntoView(index: number) => void` | Scrolls the Tab at the given index into view.\n","gitHead":"c5733baaefa11aaca3bd6f32fb2ac29c20894738","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","bar"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-tab-bar"},"_npmVersion":"lerna/3.20.2/node@v14.18.1+x64 (linux)","description":"The Material Components for the web tab bar component","directories":{},"maintainers":[{"name":"yefim","email":"hi@yef.im"},{"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":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@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":"14.18.1","dependencies":{"tslib":"^2.1.0","@material/tab":"14.0.0-canary.7d8ea4624.0","@material/base":"14.0.0-canary.7d8ea4624.0","@material/theme":"14.0.0-canary.7d8ea4624.0","@material/density":"14.0.0-canary.7d8ea4624.0","@material/animation":"14.0.0-canary.7d8ea4624.0","@material/elevation":"14.0.0-canary.7d8ea4624.0","@material/typography":"14.0.0-canary.7d8ea4624.0","@material/tab-scroller":"14.0.0-canary.7d8ea4624.0","@material/tab-indicator":"14.0.0-canary.7d8ea4624.0","@material/feature-targeting":"14.0.0-canary.7d8ea4624.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/tab-bar_14.0.0-canary.7d8ea4624.0_1639164672476_0.41078434371611783","host":"s3://npm-registry-packages"},"_id":"@material/tab-bar@14.0.0-canary.7d8ea4624.0","version":"14.0.0-canary.7d8ea4624.0"}