{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"909b1819b76026ee82866fc4b455d136af5cd099","tarball":"https://registry.npmjs.org/@material/shape/-/shape-15.0.0-canary.94ad8d986.0.tgz","fileCount":14,"integrity":"sha512-3e7jE1Af0QbA52edGU/laA4fIZD59UPVL7Rnf4EALqPMwyBiql4u4gEakr4O8jjWGzs7nS/8HpKbx3/8K/+joA==","signatures":[{"sig":"MEQCIA9OCc0GhjjwUKRN5NS770NyoSu2McomxWr4jCgZzuFMAiBD5v47XFzQcvh/7EccD0ap77icTyAVNYmq0vi/o61AuA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoLr1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1tA//dtA8Vgtqc1jZ/b7JscjYoZQnmPgHpWrKhhnAFIhTXew9LSDh\r\nPG0UaOPcqATEEpFMYLpUYwnDnu94OORn6kxyy/UCqhQMQD9IXaIpSfLbnaEE\r\nC/RR2128764WuCpTPDhW6jD+9133+Ac4yBE+aspcO4m65TcWDOz+LZZFloeG\r\n5KzwAM53MNy1Jqv2YsZBf4sXktVQpgIs3UycmLaPkzlvbp+MtQu2701IjP3j\r\nqYtlV5VM+Aku4aJ1j9YfWY9RFismw9hEYMPQ7PvoGkznvIQa16iz1kThrBDq\r\ngpVZScbv5Uyssm0+aatMehVz3GOE/BEqIcRZOWI75rHi7dAyYBrb/V2md2jG\r\nlYmLkm6ksqIonkkZ84ThKF/l9GV9eB0WSE+WR7rlLjPdVUsKdTlMHhRyAzyU\r\ns4zVsv3NzWsZ7SPzk70IHFDPs4BZ0sqP+ighAKoGBgzJQYtsdYmgJDavYlVv\r\nhZGuqjee4y56Z71ir4HqwrQMiyVJ9jbmWCKSux67zqVxTpzWWm6Q16OVmg2D\r\n9UOjMClOlN42qWcAsh9qsNRijPcK9F1QnA2ZQTJjzYO8a+GcCPGrGvoiyUNn\r\n7FXavfTaRO+opDuJ8ovxo7bigeXIG4fQQCRDLK+vti26ZvdCc6+I9/zaJN5x\r\nYBNhrNXcnGW3L28iguhvSM9588cpye7LnCY=\r\n=W3Mo\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@use \"@material/shape\";\n```\n\n## Style Customization\n\n### Sass Variables\n\nComponents are categorized as small, medium, and large in the Material shape system. Overriding the below Sass variables will change all components in their respective categories.\n\nVariable | Description\n--- | ---\n`$small-component-radius` | Rounded shape radius size for small components. Default value `4px`.\n`$medium-component-radius` | Rounded shape radius size for medium components. Default value `4px`.\n`$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**Note: Only rounded shape designs are currently supported.**\n\n### CSS Custom Properties\n\nCSS Custom Property | Description\n--- | ---\n`--mdc-shape-small` | Rounded shape radius size for small components. Default value `4px`.\n`--mdc-shape-medium` | Rounded shape radius size for small components. Default value `4px`.\n`--mdc-shape-large` | Rounded shape radius size for small components. Default value `0`.\n\n**Note: Do not use percentage values with custom properties, since they cannot be resolved by `shape.radius()` at runtime.**\n\n### Sass Mixins\n\nMixin | Description\n--- | ---\n`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### Sass Functions\n\nFunction | Description\n--- | ---\n`resolve-radius($radius, $component-height)` | Returns the resolved radius value of a shape category - `large`, `medium`, or `small`. If $radius is not a category, this function returns the value itself if valid. Valid values are numbers or percentages. `$component-height` should be provided if `$radius` may be a percentage.\n`flip-radius($radius)` | Flips the radius values in RTL context. `$radius` is list of 2-4 corner values.\n`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`unpack-radius($radius)` | Unpacks shorthand values for border-radius (i.e. lists of 1-3 values). If a list of 4 values is given, it is returned as-is.\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@use \"@material/button\";\n\n@include shape.radius($radius, $component-height: button.$height);\n```\n\nWhere `button.$height` is the height of standard button and `$radius` is the size of the shape. `shape.radius()` will resolve any percentage unit value to an absolute radius value based on the component's 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 shape.radius($radius);\n```\n\nWhere `$radius` is an 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 shape.radius(0 $radius $radius 0, $rtl-reflexive: true);\n```\n\nWhere only top-right & bottom-right corners are customizable. `shape.radius()` will automatically flip radius values based on RTL context if `$rtl-reflexive` is set to true.\n\n#### Component theming\n\nThe styles for applying custom shape to a button component looks like this:\n\n```scss\n@use \"@material/button\";\n\n.my-custom-button {\n  @include button.shape-radius(50%);\n}\n```\n\nIn this example, the above style applies a 50% pill shape to the button. It could also be an absolute value (e.g., `8px`);\n\n> The Shape API is typically used indirectly through each respective component's mixin, which takes care of setting height and applying radius to applicable corners for all of its variants.\n","gitHead":"8e8a69afb313ffa8badca57ca15ad4a464b9f718","license":"MIT","_npmUser":{"name":"abhiomkar","email":"abhiomkar@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","directory":"packages/mdc-shape"},"_npmVersion":"lerna/3.20.2/node@v14.21.1+x64 (linux)","description":"Shape utilities for Material Components for the web","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.21.1","dependencies":{"tslib":"^2.1.0","@material/rtl":"15.0.0-canary.94ad8d986.0","@material/theme":"15.0.0-canary.94ad8d986.0","@material/feature-targeting":"15.0.0-canary.94ad8d986.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/shape_15.0.0-canary.94ad8d986.0_1671478005513_0.3271793027143908","host":"s3://npm-registry-packages"},"_id":"@material/shape@15.0.0-canary.94ad8d986.0","version":"15.0.0-canary.94ad8d986.0"}