{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"1bb075d00e457bd1c1fdade69d3c475b67cfbb46","tarball":"https://registry.npmjs.org/@material/floating-label/-/floating-label-12.0.0-canary.ccce99cd6.0.tgz","fileCount":34,"integrity":"sha512-V7AkoIl0pAcsKu1RyGox66O/tj9s8b3Cyw69WIMpd6QBcBxNsw1BjtxZ7qWelbtEEY6HPqUbNxdcSANN17uDnw==","signatures":[{"sig":"MEYCIQDmQH0kdVPs3h+7RZ4NOw9Stbu4BdZtLF35LA2BUzDePQIhANPqXmqy1YqwFZ/kjwgNo8jycgmkwnegdqfjzH9s61Oq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpbPXCRA9TVsSAnZWagAAcUQQAIN+WFmgTiJoaZtP64hl\nquozLja8daYzXzMp5AyRkuOOX4VylTIlHbcN5i9lHHf6RRWq9gpCh7+x4mCB\nY7/FO+Lw/WCNDQ7Buu+pTZPRKF65KBxOWu51QpRroMXYoUjG/yP4H13s50QO\nTWcPHTv5YrK+7LTy4GT4fiDJAsIVlFxR7HwWMvkg15qfm1jjo7xdOOieUBDV\n7XoRim+ZKcHHkKsujULsXUTYdf8jIeInl+oXjINsg/SJ4jsrOpHmsadh/y4B\n02LjNt8zePHNPXvNLfXm9MgUJ5vSh/I+fW4xjMnuGxjO8nfNX6ezWOm40eov\nuY7ejhSBZ35oWfRRcBKEJXCACiewj3HnNPf27LGG37QmzRhQ7zkjnE41s8ts\nNUsAgJKLeU5fpLMccW9XHqShA/8Ac/ZWkJ6buYo6EJownI9CcnyNvJ9Ux58H\nB3BfBbNncn467jHUA8FBT3GsLMslP7HOZ3DHFNYcrhiX1AlXdtwpIZuxFaPA\nZe6YjkAh5Mrnt5+Ar0dqN8TszRZC0XtEz43p6eHLNONiR0epXoy6JeTxQf9v\nZzVN0tQANqRCXbkkuffb5dU8lAKumOFCcZaU9Jrmep+Re2isrzACFGltMK9d\npeZlqseymmNTZElrNzGW18W637f6oxoBwbCGv+thyiceSLbl/Aoq6hoK3Cz6\n/7TP\r\n=vJWZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/mdc.floatingLabel.js","name":"@material/floating-label","types":"dist/mdc.floatingLabel.d.ts","module":"index.js","readme":"<!--docs:\ntitle: \"Floating Label\"\nlayout: detail\nsection: components\nexcerpt: \"An animated text caption for a Text Field or Select.\"\npath: /catalog/input-controls/floating-label/\n-->\n\n# Floating Label\n\nFloating labels display the type of input a field requires. Every Text Field and Select should have a label, except for full-width text fields, which use the input's `placeholder` attribute instead. Labels are aligned with the input line and always visible. They can be resting (when a field is inactive and empty) or floating. The label is a text caption or description for the Text Field.\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-text-fields#text-fields-layout\">Material Design guidelines: Text Fields Layout</a>\n  </li>\n  <li class=\"icon-list-item icon-list-item--spec\">\n    <a href=\"https://material-components.github.io/material-components-web-catalog/#/component/text-field\">Demo with Text Field</a>\n  </li>\n</ul>\n\n## Installation\n\n```\nnpm install @material/floating-label\n```\n\n## Basic Usage\n\n### HTML Structure\n\n```html\n<span class=\"mdc-floating-label\" id=\"my-label-id\">Hint text</span>\n```\n\n### Styles\n\n```scss\n@use \"@material/floating-label/mdc-floating-label\";\n```\n\n### JavaScript Instantiation\n\n```js\nimport {MDCFloatingLabel} from '@material/floating-label';\n\nconst floatingLabel = new MDCFloatingLabel(document.querySelector('.mdc-floating-label'));\n```\n\n## Style Customization\n\n### CSS Classes\n\nCSS Class | Description\n--- | ---\n`mdc-floating-label` | Mandatory.\n`mdc-floating-label--float-above` | Indicates the label is floating in the floating position.\n`mdc-floating-label--shake` | Shakes the label.\n`mdc-floating-label--required` | Indicates the label is required and adds an asterisk.\n\n### Sass Mixins\n\nMixin | Description\n--- | ---\n`ink-color($color)` | Customizes the ink color of the label.\n`fill-color($color)` | Customizes the fill color of the label.\n`shake-keyframes($modifier, $positionY, $positionX, $scale)` | Generates a CSS `@keyframes` at-rule for an invalid label shake. Used in conjunction with the `shake-animation` mixin.\n`shake-animation($modifier)` | Applies shake keyframe animation to label.\n`float-position($positionY, $positionX, $scale)` | Sets position of label when floating.\n`max-width($max-width)` | Sets the max width of the label.\n`float-transition($duration-ms, $timing-function)` | Customizes the duration and optional timing function for the \"float\" transition.\n\n## `MDCFloatingLabel` Properties and Methods\n\nMethod Signature | Description\n--- | ---\n`shake(shouldShake: boolean) => void` | Proxies to the foundation's `shake()` method.\n`float(shouldFloat: boolean) => void` | Proxies to the foundation's `float()` method.\n`setRequired(isRequired: boolean) => void` | Proxies to the foundation's `setRequired()` method.\n`getWidth() => number` | Proxies to the foundation's `getWidth()` method.\n\n## Usage Within Frameworks\n\nIf you are using a JavaScript framework, such as React or Angular, you can create a Floating Label 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### `MDCFloatingLabelAdapter`\n\nMethod Signature | Description\n--- | ---\n`addClass(className: string) => void` | Adds a class to the label element.\n`removeClass(className: string) => void` | Removes a class from the label element.\n`getWidth() => number` | Returns the width of the label element.\n`registerInteractionHandler(evtType: string, handler: EventListener) => void` | Registers an event listener for a given event.\n`deregisterInteractionHandler(evtType: string, handler: EventListener) => void` | Deregisters an event listener for a given event.\n\n### `MDCFloatingLabelFoundation`\n\nMethod Signature | Description\n--- | ---\n`shake(shouldShake: boolean)` | Shakes or stops shaking the label, depending on the value of `shouldShake`.\n`float(shouldFloat: boolean)` | Floats or docks the label, depending on the value of `shouldFloat`.\n`setRequired(isRequired: boolean)` | Styles the label as required, depending on the value of `isRequired`.\n`getWidth() => number` | Returns the width of the label element.\n","gitHead":"5d475a1522350d9dadb5fe3597683fa7f4851b83","license":"MIT","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","floatinglabel","floating label"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-floating-label"},"_npmVersion":"lerna/3.20.2/node@v10.24.1+x64 (linux)","description":"The Material Components for the web floating-label 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.24.1","dependencies":{"tslib":"^2.1.0","@material/dom":"12.0.0-canary.ccce99cd6.0","@material/rtl":"12.0.0-canary.ccce99cd6.0","@material/base":"12.0.0-canary.ccce99cd6.0","@material/theme":"12.0.0-canary.ccce99cd6.0","@material/animation":"12.0.0-canary.ccce99cd6.0","@material/typography":"12.0.0-canary.ccce99cd6.0","@material/feature-targeting":"12.0.0-canary.ccce99cd6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/floating-label_12.0.0-canary.ccce99cd6.0_1621472214647_0.7381794290996495","host":"s3://npm-registry-packages"},"_id":"@material/floating-label@12.0.0-canary.ccce99cd6.0","version":"12.0.0-canary.ccce99cd6.0"}