{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"fac6475f5058fddf2ef5d386f74dd39521d09601","tarball":"https://registry.npmjs.org/@material/shape/-/shape-1.0.0-0.tgz","fileCount":5,"integrity":"sha512-nSj8HGCVzpWS0msLOZSmnAMgpuOPdkEYHBinlfxEVClMox6QWPtLOkAWMhWsyzX5rx2CKHq8D2UYjFtRiujiww==","signatures":[{"sig":"MEUCIQCrV/TYjk/kphDck593dYi8aeajiWGOm4T2u4MaBPC8ywIgKp4bvTJhtNTR6gOTKkYk6TSCj7Mafe/XHOy6NtWiFJo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdyRJCRA9TVsSAnZWagAABCEP/22+oOxBO55ocFb+LYdF\nQuGxXDgcQ8iVeLDYbLIBBzA/pD3Bb0BJDiGJCYZbCk/oyyiK7yvD6Ed4ILr7\nCDVJEjFIyM0yQsvJWCZsuNFvQusqeTP7Ll/88cuGS5yRYKJh9iCcVAgdjxBJ\nXeJW2L0PblI887y47XLUN6ZPCtRCw8pNUnntrPI4ZxK64tV6FeUA4s1dcJbG\nLo4mRb2PPQVy3s727V50V84qImj4LcQ6icc217AWNwVN47JxOuEG9096iYB3\nC6Mk+D1HF3ueih7zH96VLcHd+7MG5XqFKFOlio66bZ2qQ01G8TaqdPGUwhHb\nOjC+Qr1i3iyE6IB9KwnUwaV4hOvnulhlP7rx626+cUU5xn5UU28OJf+RS0qe\netIDnfsdoh/XhafNTnenTm0+6RSCJ3F1h5cBAsY5Gx/Pey89ElUvFCq3hgUJ\nkG9uc1bWbhBKpDtgtOUMfTSOUplBzqqslbHxX3aXCDCoPyZlhpF6+tyjqxGt\nBZOpZmcxx0Ie5mLs3vTYSOiqb2O+uqbsrOtB0++npn7cOgA7HdhEqd6922d6\nhn+L69f59vBlSVUpnhhKI/Z2YaLq7LliHfdc80SpN/UrVA2NQMD5ZD3wFeag\n4j9zgRqUAKh6XedKjenxU3A7H3RJD4v9mqk93RRfZWH2KqZGf9EN6PrqwIKh\nrWpX\r\n=QCxk\r\n-----END PGP SIGNATURE-----\r\n"},"name":"@material/shape","readme":"<!--docs:\ntitle: \"Shape\"\nlayout: detail\nsection: components\nexcerpt: \"Shapes direct attention, identify components, communicate state, and express brand.\"\npath: /catalog/shape/\n-->\n\n# Shape\n\nShapes direct attention, identify components, communicate state, and express brand.\n\n> Currently shape system for web only supports rounded corners.\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-shape\">Material Design guidelines: Shape</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/shape\n```\n\n## Basic Usage\n\n### Styles\n\n```scss\n@import \"@material/shape/mixins\";\n@import \"@material/shape/functions\";\n```\n\n## Style Customization\n\n### Sass Variables\n\nComponents are categorized as small, medium and large in shape system. Overriding below sass variables applies shape (rounded) to respective categories. For example, overriding `$mdc-shape-medium-radius` variable would apply shape to all components that belong to medium category.\n\nVariable | Description\n--- | ---\n`$mdc-shape-small-component-radius` | Rounded shape radius size for small components. Default value `4px`.\n`$mdc-shape-medium-component-radius` | Rounded shape radius size for medium components. Default value `4px`.\n`$mdc-shape-large-component-radius` | Rounded shape radius size for large components. Default value `0`.\n\nPlease refer [Material Design guidelines: Shape](https://material.io/go/design-shape) to learn about how components are categorized.\n\n### Sass Mixins\n\nMixin | Description\n--- | ---\n`mdc-shape-radius($radius, $rtl-reflexive)` | Shape API used by all other components to apply radius to appropriate corners. `$radius` can be single value or list of up to 4 radius corner values. Set `$rtl-reflexive` to true to flip the radius in RTL case, `false` by default.\n\n> Use `mdc-shape-resolve-percentage-radius` sass function to resolve percentage unit value to absolute radius value.\n\n### Sass Functions\n\nFunction | Description\n--- | ---\n`mdc-shape-flip-radius($radius)` | Flips the radius values in RTL context. `$radius` is list of 2-4 corner values.\n`mdc-shape-resolve-percentage-radius($component-height, $radius)` | Calculates the absolute radius value based on its component height. Use this for fixed height components only.\n`mdc-shape-mask-radius($radius, $masked-corners)` | Accepts radius number or list of 2-4 radius values and returns 4 value list with masked corners as mentioned in `$masked-corners`.\n`mdc-shape-prop-value($radius)` | Returns `$radius` value of shape category - `large`, `medium` or `small`. Otherwise, it returns the `$radius` itself if valid. `$radius` can be a single value or list of up to 4.\n\n### Additional Information\n\n#### Shapes for fixed height components\n\nStyles for applying shape to a fixed height component such as button looks like this:\n\n```scss\n@include mdc-shape-radius(mdc-shape-resolve-percentage-radius($mdc-button-height, $radius));\n```\n\nWhere, `$mdc-button-height` is the height of standard button and `$radius` is the size of shape. `mdc-shape-resolve-percentage-radius` function is used to resolve percentage unit value to absolute `$radius` value based on component height.\n\n#### Shapes for dynamic height components\n\nStyles for applying shapes to dynamic height component such as card looks like this:\n\n```scss\n@include mdc-shape-radius($radius);\n```\n\nWhere, `$radius` is absolute value only.\n\n#### Shapes for components on specific corners\n\nStyles for applying shapes for specific corners such as drawer looks like this:\n\n```scss\n@include mdc-shape-radius(0 $radius $radius 0, $rtl-reflexive: true);\n```\n\nWhere, only top-right & bottom-right corners are customizable and it automatically flips radius values based on RTL context when `$rtl-reflexive` is set to true.\n\n#### Component theming\n\nThe styles for applying custom shape to button component instance looks like this:\n\n```scss\n@import \"@material/button/mixins\";\n\n.my-custom-button {\n  @include mdc-button-shape-radius(50%);\n}\n```\n\nIn this example, the above styles applies 50% (pill) shape to button. It can also be absolute value (e.g., `8px`);\n\n> You would indirectly use the Shape API through respective component's mixin which takes care of applying radius to applicable corners for all its variants.\n","license":"MIT","_npmUser":{"name":"acdvorak","email":"acdvorak@gmail.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","shape"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git"},"_npmVersion":"6.8.0","description":"Shape utilities for Material Components for the web","directories":{},"maintainers":[{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"acdvorak","email":"acdvorak@gmail.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":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"material-admin","email":"lynnjepsen+npm@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"williamernest","email":"williamernest@google.com"}],"_nodeVersion":"10.14.2","dependencies":{"@material/feature-targeting":"^0.44.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/shape_1.0.0-0_1551311944685_0.5884986685395652","host":"s3://npm-registry-packages"},"_id":"@material/shape@1.0.0-0","version":"1.0.0-0"}