{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"faefac82c833fd63f6d324da73a94e784c11e248","tarball":"https://registry.npmjs.org/@material/top-app-bar/-/top-app-bar-4.0.0-canary.1.tgz","fileCount":39,"integrity":"sha512-D7ZXThjNHd59Mdpv6aix+nSg/tr7PHZB0m2TbJSrqYj8nz3N2Wnc8rMy/FkuDSd84ywNytBiWHbA1Q0T1K42dA==","signatures":[{"sig":"MEQCICmVpzaBLbU+jn8uRkg1gZzxp87HxVUkAEJ0zsJs7MjSAiAC3nC4swvGcgeBGehltiL0aexbHYkUDm9XS4nOwRoWNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":448206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddrQzCRA9TVsSAnZWagAAXvoQAIkqA7Ml7R0KfFmx8khh\n5oT3yado54a6dq0lZtfn80R0HCl5Z+zc2TgV+auFxKc0C/sBq2akSF+jfcxf\nlfZxF7XAuWBY5a1QhslHGM7i+QOPKOFh92UsK8iGAi7FQwLKRxueKyYdP/Sm\ndktrQy3qNErh6P/bhucUn2w1Xl5D/SnojeLujRA3+tRhh3kv4i3CE8GoXqT1\nKfaWEUkKQG5A973oywGEqerv0Sr7sVATtGlGSjMQqGa9WrMHp0YHldor/lnj\nVh/a8wbpVMjLZZ84Ds20Z9zzLHCFREUFDUltAFVoru7RqU3lLsKQIw6JVS5Q\nDJpJhdHQOOXB/wvJLiQA3yeAOgDdh5Bc2MY4ML2Na6SCalql77HQxFbbrK/k\n4YLlITTB+10qk8sG8I3BoGc7Xb1kWodD37N+lrt0Z5yUscyBISFSt3HWiwNV\nOlwrFPV3UoEwpfFrl3ldr1jSB2mtU9IwMOOMW9aG0J1CqhwSec0rOwhRR9qC\n1sc6ArfknIdklSAVkncNtjGaDVVPte6CqnPgSwT+/Dd75IwEp58JLY/uBrR3\nATzZIciM3LkhzgCraz9VYTMD/NMkgvCkVkunhodC4fgYKVg0Y9cWNyH7/The\n9hCJcXIZ29OKhDofFDm2AYPGk/uyH1tGWDtxKVQb3WdPG3Xe8XpN2zX5zSUi\nZslo\r\n=NRLJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.topAppBar.js","name":"@material/top-app-bar","types":"dist/mdc.topAppBar.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Top App Bar\"\nlayout: detail\nsection: components\nexcerpt: \"A container for items such as application title, navigation icon, and action items.\"\niconId: toolbar\npath: /catalog/top-app-bar/\n-->\n\n# Top App Bar\n\n<!--<div class=\"article__asset\">\n  <a class=\"article__asset-link\"\n     href=\"https://material-components.github.io/material-components-web-catalog/#/component/top-app-bar\">\n    <img src=\"{{ site.rootpath }}/images/mdc_web_screenshots/top-app-bar.png\"\n         width=\"494\" alt=\"Top App Bar screenshot\">\n  </a>\n</div>-->\n\nMDC Top App Bar acts as a container for items such as application title, navigation icon, and action items.\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-app-bar-top\">Material Design guidelines: Top app bar</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/top-app-bar\">Demo</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/top-app-bar\n```\n\n## Basic Usage\n\n### HTML Structure\n\n```html\n<header class=\"mdc-top-app-bar\">\n  <div class=\"mdc-top-app-bar__row\">\n    <section class=\"mdc-top-app-bar__section mdc-top-app-bar__section--align-start\">\n      <button class=\"material-icons mdc-top-app-bar__navigation-icon mdc-icon-button\">menu</button>\n      <span class=\"mdc-top-app-bar__title\">Title</span>\n    </section>\n  </div>\n</header>\n```\n\n> NOTE: Please see note below about `mdc-icon-button` in the [Top App Bar With Action Items](#top-app-bar-with-action-items) section.\n\n#### Menu 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### Styles\n\n```scss\n@import \"@material/top-app-bar/mdc-top-app-bar\";\n@import \"@material/icon-button/mdc-icon-button\";\n```\n\n### JavaScript Instantiation\n\n```js\nimport {MDCTopAppBar} from '@material/top-app-bar';\n\n// Instantiation\nconst topAppBarElement = document.querySelector('.mdc-top-app-bar');\nconst topAppBar = new MDCTopAppBar(topAppBarElement);\n```\n\n> See [Importing the JS component](../../docs/importing-js.md) for more information on how to import JavaScript.\n\n## Variants\n\n### Top App Bar With Action Items\n\nTop app bars can contain action items which are placed on the side opposite the navigation icon. You must also attach the `mdc-icon-button` class to both the `mdc-top-app-bar__navigation-icon` and the `mdc-top-app-bar__action-item` elements in order to get the correct styles applied. For further documentation on icons, please see the [mdc-icon-button docs](../mdc-icon-button/README.md).\n\n```html\n<header class=\"mdc-top-app-bar\">\n  <div class=\"mdc-top-app-bar__row\">\n    <section class=\"mdc-top-app-bar__section mdc-top-app-bar__section--align-start\">\n      <button class=\"material-icons mdc-top-app-bar__navigation-icon mdc-icon-button\">menu</button>\n      <span class=\"mdc-top-app-bar__title\">Title</span>\n    </section>\n    <section class=\"mdc-top-app-bar__section mdc-top-app-bar__section--align-end\" role=\"toolbar\">\n      <button class=\"material-icons mdc-top-app-bar__action-item mdc-icon-button\" aria-label=\"Download\">file_download</button>\n      <button class=\"material-icons mdc-top-app-bar__action-item mdc-icon-button\" aria-label=\"Print this page\">print</button>\n      <button class=\"material-icons mdc-top-app-bar__action-item mdc-icon-button\" aria-label=\"Bookmark this page\">bookmark</button>\n    </section>\n  </div>\n</header>\n```\n\n### Short\n\nShort top app bars are top app bars that can collapse to the navigation icon side when scrolled.\n\n```html\n<header class=\"mdc-top-app-bar mdc-top-app-bar--short\">\n  <div class=\"mdc-top-app-bar__row\">\n    <section class=\"mdc-top-app-bar__section mdc-top-app-bar__section--align-start\">\n      <button class=\"material-icons mdc-top-app-bar__navigation-icon mdc-icon-button\">menu</button>\n      <span class=\"mdc-top-app-bar__title\">Title</span>\n    </section>\n    <section class=\"mdc-top-app-bar__section mdc-top-app-bar__section--align-end\" role=\"toolbar\">\n      <button class=\"material-icons mdc-top-app-bar__action-item mdc-icon-button\" aria-label=\"Bookmark this page\">bookmark</button>\n    </section>\n  </div>\n</header>\n```\n\n> Short top app bars should be used with no more than 1 action item.\n\n### Short - Always Closed\n\nShort top app bars can be configured to always appear collapsed by applying the `mdc-top-app-bar--short-collapsed` before instantiating the component :\n\n```html\n<header class=\"mdc-top-app-bar mdc-top-app-bar--short mdc-top-app-bar--short-collapsed\">\n  ...\n</header>\n```\n\n### Fixed\n\nFixed top app bars stay at the top of the page and elevate above the content when scrolled.\n\n```html\n<header class=\"mdc-top-app-bar mdc-top-app-bar--fixed\">\n  ...\n</header>\n```\n\n### Prominent\n\nThe prominent top app bar is taller.\n\n```html\n<header class=\"mdc-top-app-bar mdc-top-app-bar--prominent\">\n  ...\n</header>\n```\n\n### Dense\n\nThe dense top app bar is shorter.\n\n```html\n<header class=\"mdc-top-app-bar mdc-top-app-bar--dense\">\n  ...\n</header>\n```\n\n## Style Customization\n\n### CSS Classes\n\nClass | Description\n--- | ---\n`mdc-top-app-bar` | Mandatory.\n`mdc-top-app-bar--fixed` | Class used to style the top app bar as a fixed top app bar.\n`mdc-top-app-bar--fixed-adjust` | Class used to style the content below the standard and fixed top app bar to prevent the top app bar from covering it.\n`mdc-top-app-bar--prominent` | Class used to style the top app bar as a prominent top app bar.\n`mdc-top-app-bar--prominent-fixed-adjust` | Class used to style the content below the prominent top app bar to prevent the top app bar from covering it.\n`mdc-top-app-bar--dense` | Class used to style the top app bar as a dense top app bar.\n`mdc-top-app-bar--dense-fixed-adjust` | Class used to style the content below the dense top app bar to prevent the top app bar from covering it.\n`mdc-top-app-bar--dense-prominent-fixed-adjust` | Class used to style the content below the top app bar when styled as both dense and prominent, to prevent the top app bar from covering it.\n`mdc-top-app-bar--short` | Class used to style the top app bar as a short top app bar.\n`mdc-top-app-bar--short-collapsed` | Class used to indicate the short top app bar is collapsed.\n`mdc-top-app-bar--short-fixed-adjust` | Class used to style the content below the short top app bar to prevent the top app bar from covering it.\n\n### Sass Mixins\n\nMixin | Description\n--- | ---\n`mdc-top-app-bar-ink-color($color)` | Sets the ink color of the top app bar.\n`mdc-top-app-bar-icon-ink-color($color)` | Sets the ink color of the top app bar icons.\n`mdc-top-app-bar-fill-color($color)` | Sets the fill color of the top app bar.\n`mdc-top-app-bar-fill-color-accessible($color)` | Sets the fill color of the top app bar and automatically sets a high-contrast ink color.\n`mdc-top-app-bar-short-shape-radius($radius, $rtl-reflexive)` | Sets the rounded shape to short top app bar variant (when it is collapsed) with given radius size. Set `$rtl-reflexive` to true to flip radius values in RTL context, defaults to true.\n\n## `MDCTopAppBar` Properties and Methods\n\nMethod Signature | Description\n--- | ---\n`setScrollTarget(target: element) => void` | Sets scroll target to different DOM node (default is window).\n\n### Events\n\nEvent Name | Event Data Structure | Description\n--- | --- | ---\n`MDCTopAppBar:nav` | None | Emits when the navigation icon is clicked.\n\n## Usage within Web Frameworks\n\nIf you are using a JavaScript framework, such as React or Angular, you can create a Top App 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### `MDCTopAppBarAdapter`\n\nMethod Signature | Description\n--- | ---\n`addClass(className: string) => void` | Adds a class to the root element of the component.\n`removeClass(className: string) => void` | Removes a class from the root element of the component.\n`hasClass(className: string) => boolean` | Checks if the root element of the component has the given className.\n`setStyle(property: string, value: string) => void` | Sets the specified CSS property to the given value on the root element.\n`getTopAppBarHeight() => number` | Gets the height in px of the top app bar.\n`getViewportScrollY() => number` | Gets the number of pixels that the content of body is scrolled from the top of the page.\n`getTotalActionItems() => number` | Gets the number of action items in the top app bar.\n`notifyNavigationIconClicked() => void` | Emits a custom event `MDCTopAppBar:nav` when the navigation icon is clicked.\n\n### Foundations\n\n#### `MDCTopAppBarBaseFoundation`, `MDCTopAppBarFoundation`, `MDCFixedTopAppBarFoundation` and `MDCShortTopAppBarFoundation`\n\nAll foundations provide the following methods:\n\nMethod Signature | Description\n--- | ---\n`handleTargetScroll() => void` | Handles `scroll` event on specified scrollTarget (defaults to `window`).\n`handleWindowResize() => void` | Handles `resize` event on window.\n`handleNavigationClick() => void` | Handles `click` event on navigation icon.\n\n#### `MDCShortTopAppBarFoundation`\n\nIn addition to the methods above, the short variant provides the following public methods and properties:\n\nMethod Signature | Description\n--- | ---\n`setAlwaysCollapsed(value: boolean) => void` | When `value` is `true`, sets the short top app bar to always be collapsed.\n`getAlwaysCollapsed() => boolean` | Gets if the short top app bar is in the \"always collapsed\" state.\n\nProperty | Value Type | Description\n--- | --- | ---\n`isCollapsed` | `boolean` (read-only) | Indicates whether the short top app bar is in the collapsed state.\n","gitHead":"edc72a4d7d6a61d61620fd05a80e2491e518bccf","license":"MIT","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","top app bar","top-app-bar","topappbar"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-top-app-bar"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"The Material Components for the web top app bar component","directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"aomarks","email":"aomarks@google.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"sideEffects":false,"_nodeVersion":"8.16.0","dependencies":{"tslib":"^1.9.3","@material/rtl":"^4.0.0-canary.1","@material/base":"^4.0.0-canary.1","@material/shape":"^4.0.0-canary.1","@material/theme":"^4.0.0-canary.1","@material/ripple":"^4.0.0-canary.1","@material/animation":"^4.0.0-canary.1","@material/elevation":"^4.0.0-canary.1","@material/typography":"^4.0.0-canary.1","@material/icon-button":"^4.0.0-canary.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/top-app-bar_4.0.0-canary.1_1568060466849_0.06077650110263488","host":"s3://npm-registry-packages"},"_id":"@material/top-app-bar@4.0.0-canary.1","version":"4.0.0-canary.1"}